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 getRayCoord(
const size_t i,
const size_t j,
double dest[8])
const;
567 void coordToSky(
const double pos[4],
double dest[3])
const;
570 void coordToXYZ(
const double pos[4],
double dest[3])
const;
573 void computeBaseVectors() ;
578 std::ostream& print(std::ostream&)
const ;
579 std::ostream& printBaseVectors(std::ostream&)
const ;
602 #ifdef GYOTO_USE_XERCES 631 virtual void begin() =0;
633 virtual bool valid() =0;
635 virtual size_t size()=0;
637 virtual size_t operator*()
const ;
639 virtual double angle()
const ;
648 virtual size_t index()
const=0;
672 virtual void begin() =0;
674 virtual bool valid() =0;
676 virtual size_t size()=0;
692 virtual void begin();
693 virtual bool valid();
694 virtual size_t size();
710 virtual void begin();
711 virtual bool valid();
712 virtual size_t size();
720 virtual void begin();
721 virtual bool valid();
722 virtual size_t size();
728 const size_t mi_, ma_, d_, sz_;
732 Range(
size_t mi,
size_t ma,
size_t d);
737 size_t operator*()
const ;
738 virtual size_t index()
const ;
744 size_t const *
const indices_;
748 Indices (
size_t const*
const buf,
size_t sz);
753 size_t operator*()
const ;
754 virtual size_t index()
const ;
760 double const *
const buf_;
764 Angles (
double const*
const buf,
size_t sz);
769 double angle()
const ;
770 virtual size_t index()
const ;
785 double angle()
const ;
786 virtual size_t index()
const ;
1D specifier for an angle that is repeated.
Definition: GyotoScreen.h:774
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
A dummy, empty 2D set.
Definition: GyotoScreen.h:716
#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:726
Definition: GyotoScreen.h:43
The camera with which the Astrobj is observed.
Definition: GyotoScreen.h:173
std::string observerkind_
What kind of observer are we considering? (At infinity, ZAMO...)
Definition: GyotoScreen.h:242
CoordType_e
Enum to specify whether a coordinate set (Coord1dSet or Coord2dSet) holds pixel values or angles...
Definition: GyotoScreen.h:611
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:684
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:742
Class containing arbitrary 2D-points.
Definition: GyotoScreen.h:701
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:657
Object with properties.
Definition: GyotoObject.h:151
1D specifier for an arbitrary angle coordinate set.
Definition: GyotoScreen.h:758
const CoordType_e kind
Whether this set holds pixels or angle specifications.
Definition: GyotoScreen.h:660
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:680
const CoordType_e kind
Whether this specifier represents angles or pixels.
Definition: GyotoScreen.h:624
Set of 1-d coordinates: indices or angles.
Definition: GyotoScreen.h:621