26 #ifndef __GyotoScreen_H_ 27 #define __GyotoScreen_H_ 32 #if defined HAVE_BOOST_ARRAY_HPP 33 # include <boost/array.hpp> 34 # define GYOTO_ARRAY boost::array 36 # include <boost/version.hpp> 37 # if BOOST_VERSION >= 106400 38 # include <boost/serialization/boost_array.hpp> 39 # include <boost/serialization/array_wrapper.hpp> 47 T& operator[](
size_t c) {
return buf[c] ; }
182 double azimuthal_fov_;
197 std::string mask_filename_;
202 enum anglekind_e { equatorial_angles=0, rectilinear=1, spherical_angles=2};
203 typedef int anglekind_t;
260 void setProjection(
const double paln,
261 const double inclination,
262 const double argument);
264 void setProjection(
const double distance,
266 const double inclination,
267 const double argument);
273 void distance(
double dist);
279 void dMax(
double dist);
286 void distance(
double dist,
const std::string &unit);
293 void inclination(
double);
300 void inclination(
double,
const std::string &unit);
304 void PALN(
double,
const std::string &unit);
306 void argument(
double);
308 void argument(
double,
const std::string &unit);
319 void freqObs(
double fo);
328 void freqObs(
double fo,
const std::string &unit);
333 double freqObs()
const ;
340 double freqObs(
const std::string &unit)
const;
351 void setObserverPos(
const double pos[4]);
352 void observerKind(
const std::string &kind);
353 std::string observerKind()
const;
354 void setFourVel(
const double coord[4]);
356 void setScreen1(
const double coord[4]);
358 void setScreen2(
const double coord[4]);
360 void setScreen3(
const double coord[4]);
370 int coordKind()
const;
376 double distance()
const;
382 double distance(
const std::string&)
const;
395 double inclination()
const;
402 double inclination(
const std::string&)
const;
405 double PALN(
const std::string&)
const;
406 double argument()
const;
407 double argument(
const std::string&)
const;
416 double time(
const std::string &)
const;
419 void time(
double,
const std::string &);
425 double fieldOfView()
const;
428 double fieldOfView(std::string
const &unit)
const;
431 void fieldOfView(
double);
434 void fieldOfView(
double,
const std::string &unit);
437 double azimuthalFieldOfView()
const;
440 void azimuthalFieldOfView(
double ff);
443 void dangle1(
double);
445 void dangle1(
double,
const std::string &unit);
447 double dangle1()
const;
449 double dangle1(std::string
const &unit)
const;
451 void dangle2(
double);
453 void dangle2(
double,
const std::string &unit);
455 double dangle2()
const;
457 double dangle2(std::string
const &unit)
const;
461 void anglekind(std::string
const&);
462 std::string anglekind()
const;
465 size_t resolution()
const;
467 void resolution(
size_t);
474 void mask(
double const *
const mm,
size_t resolution=0);
477 double const * mask()
const ;
478 void maskFile(std::string
const &fname);
479 std::string maskFile()
const;
480 # ifdef GYOTO_USE_CFITSIO 483 void fitsReadMask(std::string
const &fname);
486 void fitsWriteMask(std::string
const &fname);
494 bool operator()(
size_t,
size_t);
509 void getObserverPos(
double dest[4])
const;
515 void getFourVel(
double dest[4])
const;
517 void fourVel(std::vector<double>
const &);
518 std::vector<double> fourVel()
const;
519 void screenVector1(std::vector<double>
const &);
520 std::vector<double> screenVector1()
const;
521 void screenVector2(std::vector<double>
const &);
522 std::vector<double> screenVector2()
const;
523 void screenVector3(std::vector<double>
const &);
524 std::vector<double> screenVector3()
const;
530 void getScreen1(
double dest[4])
const;
536 void getScreen2(
double dest[4])
const;
542 void getScreen3(
double dest[4])
const;
554 void getRayCoord(
double x,
double y,
double dest[8])
const;
565 void getRayTriad(
double coord[8],
566 double Ephi[4],
double Etheta[4])
const;
577 void getRayCoord(
const size_t i,
const size_t j,
double dest[8])
const;
579 void coordToSky(
const double pos[4],
double dest[3])
const;
582 void coordToXYZ(
const double pos[4],
double dest[3])
const;
585 void computeBaseVectors() ;
590 std::ostream& print(std::ostream&)
const ;
591 std::ostream& printBaseVectors(std::ostream&)
const ;
614 #ifdef GYOTO_USE_XERCES 643 virtual void begin() =0;
645 virtual bool valid() =0;
647 virtual size_t size()=0;
649 virtual size_t operator*()
const ;
651 virtual double angle()
const ;
660 virtual size_t index()
const=0;
684 virtual void begin() =0;
686 virtual bool valid() =0;
688 virtual size_t size()=0;
704 virtual void begin();
705 virtual bool valid();
706 virtual size_t size();
722 virtual void begin();
723 virtual bool valid();
724 virtual size_t size();
732 virtual void begin();
733 virtual bool valid();
734 virtual size_t size();
740 const size_t mi_, ma_, d_, sz_;
744 Range(
size_t mi,
size_t ma,
size_t d);
749 size_t operator*()
const ;
750 virtual size_t index()
const ;
760 Indices (
size_t const*
const buf,
size_t sz);
766 size_t operator*()
const ;
767 virtual size_t index()
const ;
777 Angles (
double const*
const buf,
size_t sz);
783 double angle()
const ;
784 virtual size_t index()
const ;
799 double angle()
const ;
800 virtual size_t index()
const ;
1D specifier for an angle that is repeated.
Definition: GyotoScreen.h:788
SmartPointer< Spectrometer::Generic > spectro_
Gyoto::Spectrometer::Generic subclass instance used for quantities Spectrum and BinSpectrum.
Definition: GyotoScreen.h:229
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
double freq_obs_
Frequency at which the observer observes.
Definition: GyotoScreen.h:236
Reference-counting pointers.
#define GYOTO_OBJECT_THREAD_SAFETY
Declare virtual bool isThreadSafe() const.
Definition: GyotoObject.h:99
obskind_t observerkind_
What kind of observer are we considering? (At infinity, ZAMO...)
Definition: GyotoScreen.h:242
#define obskind_t
Type for observer kind.
Definition: GyotoDefs.h:552
A dummy, empty 2D set.
Definition: GyotoScreen.h:728
#define size_t
If not defined in <sys/types.h>.
Definition: GyotoConfig.h:390
double dangle1_
Increment to first position angle of Screen; can be typically alpha if in Equatorial Angles...
Definition: GyotoScreen.h:222
Factory / SmartPointee::Subcontractor_t interface.
Definition: GyotoFactoryMessenger.h:92
1D coordinated specifier for a range
Definition: GyotoScreen.h:738
Definition: GyotoScreen.h:43
The camera with which the Astrobj is observed.
Definition: GyotoScreen.h:173
CoordType_e
Enum to specify whether a coordinate set (Coord1dSet or Coord2dSet) holds pixel values or angles...
Definition: GyotoScreen.h:623
Gyoto ubiquitous macros and typedefs.
Base class for metric description.
char * prefix_
If non-NULL, cout j each tims it is incremented.
Definition: GyotoScreen.h:696
Property that can be set and got using standard methods.
Definition: GyotoProperty.h:607
anglekind_t anglekind_
Screen angles kind (0: equatorial, 1: spherical)
Definition: GyotoScreen.h:205
Spectroscopic capabilities of a Screen.
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43
1D specifier for an arbitrary pixel coordinate set.
Definition: GyotoScreen.h:754
Class containing arbitrary 2D-points.
Definition: GyotoScreen.h:713
Pointers performing reference counting.
Definition: GyotoProperty.h:45
Can be pointed to by a SmartPointer.
Definition: GyotoSmartPointer.h:80
SmartPointer< Metric::Generic > gg_
The Metric in this end of the Universe.
Definition: GyotoScreen.h:224
Class to specify a set of points on the Screen.
Definition: GyotoScreen.h:669
Object with properties.
Definition: GyotoObject.h:151
1D specifier for an arbitrary angle coordinate set.
Definition: GyotoScreen.h:771
const CoordType_e kind
Whether this set holds pixels or angle specifications.
Definition: GyotoScreen.h:672
double dangle2_
Increment to second position angle of Screen; can be typically delta if in Equatorial Angles...
Definition: GyotoScreen.h:223
SmartPointer< Astrobj::Generic > Subcontractor(FactoryMessenger *fmp, std::vector< std::string > const &plugin)
A template for Subcontractor_t functions.
Definition: GyotoAstrobj.h:76
Class containing 2D-points organized in a grid.
Definition: GyotoScreen.h:692
const CoordType_e kind
Whether this specifier represents angles or pixels.
Definition: GyotoScreen.h:636
Set of 1-d coordinates: indices or angles.
Definition: GyotoScreen.h:633