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 40 T& operator[](
size_t c) {
return buf[c] ; }
189 std::string mask_filename_;
194 enum anglekind_e { equatorial_angles=0, rectilinear=1, spherical_angles=2};
195 typedef int anglekind_t;
252 void setProjection(
const double paln,
253 const double inclination,
254 const double argument);
256 void setProjection(
const double distance,
258 const double inclination,
259 const double argument);
265 void distance(
double dist);
271 void dMax(
double dist);
278 void distance(
double dist,
const std::string &unit);
285 void inclination(
double);
292 void inclination(
double,
const std::string &unit);
296 void PALN(
double,
const std::string &unit);
298 void argument(
double);
300 void argument(
double,
const std::string &unit);
311 void freqObs(
double fo);
320 void freqObs(
double fo,
const std::string &unit);
325 double freqObs()
const ;
332 double freqObs(
const std::string &unit)
const;
343 void setObserverPos(
const double pos[4]);
344 void observerKind(
const std::string &kind);
345 std::string observerKind()
const;
346 void setFourVel(
const double coord[4]);
348 void setScreen1(
const double coord[4]);
350 void setScreen2(
const double coord[4]);
352 void setScreen3(
const double coord[4]);
362 int coordKind()
const;
368 double distance()
const;
374 double distance(
const std::string&)
const;
387 double inclination()
const;
394 double inclination(
const std::string&)
const;
397 double PALN(
const std::string&)
const;
398 double argument()
const;
399 double argument(
const std::string&)
const;
408 double time(
const std::string &)
const;
411 void time(
double,
const std::string &);
417 double fieldOfView()
const;
420 double fieldOfView(std::string
const &unit)
const;
423 void fieldOfView(
double);
426 void fieldOfView(
double,
const std::string &unit);
431 void alpha0(
double,
const std::string &unit);
433 double alpha0()
const;
435 double alpha0(std::string
const &unit)
const;
439 void delta0(
double,
const std::string &unit);
441 double delta0()
const;
443 double delta0(std::string
const &unit)
const;
447 void anglekind(std::string
const&);
448 std::string anglekind()
const;
451 size_t resolution()
const;
453 void resolution(
size_t);
460 void mask(
double const *
const mm,
size_t resolution=0);
463 double const * mask()
const ;
464 void maskFile(std::string
const &fname);
465 std::string maskFile()
const;
466 # ifdef GYOTO_USE_CFITSIO 469 void fitsReadMask(std::string
const &fname);
472 void fitsWriteMask(std::string
const &fname);
480 bool operator()(
size_t,
size_t);
495 void getObserverPos(
double dest[4])
const;
501 void getFourVel(
double dest[4])
const;
503 void fourVel(std::vector<double>
const &);
504 std::vector<double> fourVel()
const;
505 void screenVector1(std::vector<double>
const &);
506 std::vector<double> screenVector1()
const;
507 void screenVector2(std::vector<double>
const &);
508 std::vector<double> screenVector2()
const;
509 void screenVector3(std::vector<double>
const &);
510 std::vector<double> screenVector3()
const;
516 void getScreen1(
double dest[4])
const;
522 void getScreen2(
double dest[4])
const;
528 void getScreen3(
double dest[4])
const;
540 void getRayCoord(
double x,
double y,
double dest[8])
const;
551 void getRayCoord(
const size_t i,
const size_t j,
double dest[8])
const;
553 void coordToSky(
const double pos[4],
double dest[3])
const;
556 void coordToXYZ(
const double pos[4],
double dest[3])
const;
559 void computeBaseVectors() ;
564 std::ostream& print(std::ostream&)
const ;
565 std::ostream& printBaseVectors(std::ostream&)
const ;
588 #ifdef GYOTO_USE_XERCES 617 virtual void begin() =0;
619 virtual bool valid() =0;
621 virtual size_t size()=0;
623 virtual size_t operator*()
const ;
625 virtual double angle()
const ;
634 virtual size_t index()
const=0;
658 virtual void begin() =0;
660 virtual bool valid() =0;
662 virtual size_t size()=0;
677 virtual void begin();
678 virtual bool valid();
679 virtual size_t size();
695 virtual void begin();
696 virtual bool valid();
697 virtual size_t size();
705 virtual void begin();
706 virtual bool valid();
707 virtual size_t size();
713 const size_t mi_, ma_, d_, sz_;
717 Range(
size_t mi,
size_t ma,
size_t d);
722 size_t operator*()
const ;
723 virtual size_t index()
const ;
729 size_t const *
const indices_;
733 Indices (
size_t const*
const buf,
size_t sz);
738 size_t operator*()
const ;
739 virtual size_t index()
const ;
745 double const *
const buf_;
749 Angles (
double const*
const buf,
size_t sz);
754 double angle()
const ;
755 virtual size_t index()
const ;
770 double angle()
const ;
771 virtual size_t index()
const ;
1D specifier for an angle that is repeated.
Definition: GyotoScreen.h:759
SmartPointer< Spectrometer::Generic > spectro_
Gyoto::Spectrometer::Generic subclass instance used for quantities Spectrum and BinSpectrum.
Definition: GyotoScreen.h:221
#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:228
Reference-counting pointers.
#define GYOTO_OBJECT_THREAD_SAFETY
Declare virtual bool isThreadSafe() const.
Definition: GyotoObject.h:99
A dummy, empty 2D set.
Definition: GyotoScreen.h:701
#define size_t
If not defined in <sys/types.h>.
Definition: GyotoConfig.h:354
Factory / SmartPointee::Subcontractor_t interface.
Definition: GyotoFactoryMessenger.h:92
1D coordinated specifier for a range
Definition: GyotoScreen.h:711
Definition: GyotoScreen.h:36
The camera with which the Astrobj is observed.
Definition: GyotoScreen.h:166
std::string observerkind_
What kind of observer are we considering? (At infinity, ZAMO...)
Definition: GyotoScreen.h:234
CoordType_e
Enum to specify whether a coordinate set (Coord1dSet or Coord2dSet) holds pixel values or angles...
Definition: GyotoScreen.h:597
Gyoto ubiquitous macros and typedefs.
Base class for metric description.
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:197
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:727
Class containing arbitrary 2D-points.
Definition: GyotoScreen.h:686
Pointers performing reference counting.
Definition: GyotoProperty.h:45
Can be pointed to by a SmartPointer.
Definition: GyotoSmartPointer.h:80
double delta0_
Screen orientation (0,0) is right towards the BH.
Definition: GyotoScreen.h:215
const char *const prefix_
If non-NULL, cout j each tims it is incremented.
Definition: GyotoScreen.h:670
SmartPointer< Metric::Generic > gg_
The Metric in this end of the Universe.
Definition: GyotoScreen.h:216
Class to specify a set of points on the Screen.
Definition: GyotoScreen.h:643
Object with properties.
Definition: GyotoObject.h:151
double alpha0_
Screen orientation (0,0) is right towards the BH.
Definition: GyotoScreen.h:214
1D specifier for an arbitrary angle coordinate set.
Definition: GyotoScreen.h:743
const CoordType_e kind
Whether this set holds pixels or angle specifications.
Definition: GyotoScreen.h:646
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:666
const CoordType_e kind
Whether this specifier represents angles or pixels.
Definition: GyotoScreen.h:610
Set of 1-d coordinates: indices or angles.
Definition: GyotoScreen.h:607