Gyoto
GyotoScreen.h
Go to the documentation of this file.
1 
7 /*
8  Copyright 2011-2019 Thibaut Paumard, Frederic Vincent
9 
10  This file is part of Gyoto.
11 
12  Gyoto is free software: you can redistribute it and/or modify
13  it under the terms of the GNU General Public License as published by
14  the Free Software Foundation, either version 3 of the License, or
15  (at your option) any later version.
16 
17  Gyoto is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  GNU General Public License for more details.
21 
22  You should have received a copy of the GNU General Public License
23  along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
24  */
25 
26 #ifndef __GyotoScreen_H_
27 #define __GyotoScreen_H_
28 
29 #include <iostream>
30 #include <fstream>
31 #include <string>
32 #if defined HAVE_BOOST_ARRAY_HPP
33 # include <boost/array.hpp>
34 # define GYOTO_ARRAY boost::array
35 # if defined HAVE_MPI
36 # include <boost/version.hpp>
37 # if BOOST_VERSION >= 106400
38 # include <boost/serialization/boost_array.hpp>
39 # include <boost/serialization/array_wrapper.hpp>
40 # endif
41 # endif
42 #else
43 template <typename T, size_t sz> class GYOTO_ARRAY {
44  private:
45  T buf[sz];
46  public:
47  T& operator[](size_t c) { return buf[c] ; }
48 };
49 #endif
50 
51 namespace Gyoto {
52  class Screen;
53 }
54 
55 #include <GyotoDefs.h>
56 #include <GyotoUtils.h>
57 #include <GyotoSmartPointer.h>
58 #include <GyotoObject.h>
59 #include <GyotoMetric.h>
60 #include <GyotoSpectrometer.h>
61 
174 : public Gyoto::SmartPointee,
175  public Gyoto::Object
176 {
177  friend class Gyoto::SmartPointer<Gyoto::Screen>;
178 
179  private:
180  double tobs_;
181  double fov_;
182  double azimuthal_fov_;
183  // double tmin_;
185 
189  double * mask_;
190 
197  std::string mask_filename_;
198 
199  double distance_;
200  double dmax_;
201 
202  enum anglekind_e { equatorial_angles=0, rectilinear=1, spherical_angles=2};
203  typedef int anglekind_t;
204 
205  anglekind_t anglekind_;
206 
212  double euler_[3];
213  double ex_[3];
214  double ey_[3];
215  double ez_[3];
216 
217  double fourvel_[4];
218  double screen1_[4];
219  double screen2_[4];
220  double screen3_[4];
221 
222  double dangle1_;
223  double dangle2_;
225 
230 
236  double freq_obs_;
237 
243 
244  public:
246  GYOTO_OBJECT_THREAD_SAFETY;
247 
248  // Constructors - Destructor
249  // -------------------------
250  Screen() ;
251  Screen(const Screen& ) ;
252  Screen * clone() const;
253 
254  virtual ~Screen() ;
255 
256  // Mutators / assignment
257  // ---------------------
258 
260  void setProjection(const double paln,
261  const double inclination,
262  const double argument);
264  void setProjection(const double distance,
265  const double paln,
266  const double inclination,
267  const double argument);
268 
270 
273  void distance(double dist);
274 
276 
279  void dMax(double dist);
280 
282 
286  void distance(double dist, const std::string &unit);
287 
289 
293  void inclination(double);
294 
296 
300  void inclination(double, const std::string &unit);
301 
302  void PALN(double);
304  void PALN(double, const std::string &unit);
306  void argument(double);
308  void argument(double, const std::string &unit);
314 
319  void freqObs(double fo);
320 
321 
328  void freqObs(double fo, const std::string &unit);
329 
333  double freqObs() const ;
334 
340  double freqObs(const std::string &unit) const;
341 
343 
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]);
362 
363  // Accessors
364  // ---------
365 
367 
370  int coordKind() const;
371 
373 
376  double distance() const;
377 
379 
382  double distance(const std::string&) const;
383 
385 
388  double dMax() const;
389 
391 
395  double inclination() const;
396 
398 
402  double inclination(const std::string&) const;
403 
404  double PALN() const;
405  double PALN(const std::string&) const;
406  double argument() const;
407  double argument(const std::string&) const;
408 
411 
413  double time() const;
414 
416  double time(const std::string &) const;
417 
419  void time(double, const std::string &);
420 
422  void time(double);
423 
425  double fieldOfView() const;
426 
428  double fieldOfView(std::string const &unit) const;
429 
431  void fieldOfView(double);
432 
434  void fieldOfView(double, const std::string &unit);
435 
437  double azimuthalFieldOfView() const;
438 
440  void azimuthalFieldOfView(double ff);
441 
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;
458 
460  void anglekind(int);
461  void anglekind(std::string const&);
462  std::string anglekind() const;
463 
465  size_t resolution() const;
467  void resolution(size_t);
468 
470 
474  void mask(double const * const mm, size_t resolution=0);
475 
477  double const * mask() const ;
478  void maskFile(std::string const &fname);
479  std::string maskFile() const;
480 # ifdef GYOTO_USE_CFITSIO
481 
483  void fitsReadMask(std::string const &fname);
484 
486  void fitsWriteMask(std::string const &fname);
487 # endif
488 
490 
494  bool operator()(size_t, size_t);
495 
496 
498 
509  void getObserverPos(double dest[4]) const;
510 
512 
515  void getFourVel(double dest[4]) const;
516 
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;
525 
527 
530  void getScreen1(double dest[4]) const;
531 
533 
536  void getScreen2(double dest[4]) const;
537 
539 
542  void getScreen3(double dest[4]) const;
543 
545 
554  void getRayCoord(double x, double y, double dest[8]) const;
555 
557 
565  void getRayTriad(double coord[8],
566  double Ephi[4], double Etheta[4]) const;
567 
569 
577  void getRayCoord(const size_t i, const size_t j, double dest[8]) const;
578 
579  void coordToSky(const double pos[4], double dest[3]) const;
581 
582  void coordToXYZ(const double pos[4], double dest[3]) const;
584 
587 
589  // friend std::ostream& operator<<(std::ostream& , const Screen& ) ;
590  std::ostream& print(std::ostream&) const ;
591  std::ostream& printBaseVectors(std::ostream&) const ;
592 
593  // UDUNITS
594 # ifdef HAVE_UDUNITS
595 
604  void mapPixUnit();
605 
607 
610  void unmapPixUnit();
611 # endif
612 
613 
614 #ifdef GYOTO_USE_XERCES
615  public:
616  void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const;
617 
620 #endif
621 
623  enum CoordType_e {angle, pixel};
624 
626 
633  class Coord1dSet {
634  public:
637  public:
641  virtual ~Coord1dSet();
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 ;
653  virtual Coord1dSet& operator++()=0;
655 
660  virtual size_t index() const=0;
661  };
662 
664 
669  class Coord2dSet {
670  public:
676  virtual ~Coord2dSet();
678  virtual Coord2dSet& operator++() =0;
682  virtual GYOTO_ARRAY<double, 2> angles() const ;
684  virtual void begin() =0;
686  virtual bool valid() =0;
688  virtual size_t size()=0;
689  };
690 
692  class Grid: public Coord2dSet {
693  protected:
694  protected:
696  char * prefix_;
697  Coord1dSet &iset_;
698  Coord1dSet &jset_;
699  public:
700  Grid(Coord1dSet &iset, Coord1dSet &jset, const char * const p=NULL);
701  virtual ~Grid();
702  virtual Coord2dSet& operator++();
704  virtual void begin();
705  virtual bool valid();
706  virtual size_t size();
707  };
708 
710 
713  class Bucket : public Coord2dSet {
714  protected:
715  Coord1dSet &alpha_;
716  Coord1dSet &delta_;
717  public:
718  Bucket(Coord1dSet &iset, Coord1dSet &jset);
719  virtual Coord2dSet& operator++();
722  virtual void begin();
723  virtual bool valid();
724  virtual size_t size();
725  };
726 
728  class Empty: public Coord2dSet {
729  public:
730  Empty();
731  virtual Coord2dSet& operator++();
732  virtual void begin();
733  virtual bool valid();
734  virtual size_t size();
735  };
736 
738  class Range : public Coord1dSet {
739  protected:
740  const size_t mi_, ma_, d_, sz_;
741  size_t cur_;
742  public:
744  Range(size_t mi, size_t ma, size_t d);
745  void begin();
746  bool valid();
747  size_t size();
749  size_t operator*() const ;
750  virtual size_t index() const ;
751  };
752 
754  class Indices : public Coord1dSet {
755  protected:
756  size_t * indices_;
757  size_t const sz_;
758  size_t i_;
759  public:
760  Indices (size_t const*const buf, size_t sz);
761  ~Indices();
762  void begin();
763  bool valid();
764  size_t size();
766  size_t operator*() const ;
767  virtual size_t index() const ;
768  };
769 
771  class Angles : public Coord1dSet {
772  protected:
773  double * buf_;
774  size_t const sz_;
775  size_t i_;
776  public:
777  Angles (double const*const buf, size_t sz);
778  ~Angles();
779  void begin();
780  bool valid();
781  size_t size();
783  double angle() const ;
784  virtual size_t index() const ;
785  };
786 
788  class RepeatAngle : public Coord1dSet {
789  protected:
790  double const val_;
791  size_t const sz_;
792  size_t i_;
793  public:
794  RepeatAngle (double val, size_t sz);
795  void begin();
796  bool valid();
797  size_t size();
799  double angle() const ;
800  virtual size_t index() const ;
801  };
802 };
803 
804 #endif
Gyoto::Screen::Angles::operator++
Coord1dSet & operator++()
Increment iterator (point to next value)
Gyoto::Screen::Coord1dSet
Set of 1-d coordinates: indices or angles.
Definition: GyotoScreen.h:633
Gyoto::Screen::Angles::index
virtual size_t index() const
Get index of value currently pointed to.
Gyoto::Screen::dangle1
void dangle1(double, const std::string &unit)
Set increment to first position angle in specified unit.
Gyoto::Screen::PALN
void PALN(double, const std::string &unit)
Set position angle of the line of nodes.
Gyoto::Screen::Indices::size
size_t size()
Number of values in this container.
Gyoto::Screen::Empty::valid
virtual bool valid()
Whether the end has not been passed.
Gyoto::Screen::tobs_
double tobs_
Observing date in s.
Definition: GyotoScreen.h:180
Gyoto::Screen::Bucket::valid
virtual bool valid()
Whether the end has not been passed.
Gyoto::Screen::Angles::begin
void begin()
Reset specifier to point to the first value.
Gyoto::Screen::spectro_
SmartPointer< Spectrometer::Generic > spectro_
Gyoto::Spectrometer::Generic subclass instance used for quantities Spectrum and BinSpectrum.
Definition: GyotoScreen.h:229
GYOTO_OBJECT
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
Gyoto::Screen::mask
double const * mask() const
Retrieve const pointer to mask_.
Gyoto::Screen::Coord1dSet::valid
virtual bool valid()=0
True if pointing to something, false if end has been reached.
Gyoto::Screen::setScreen3
void setScreen3(const double coord[4])
Sets the screen vector e3 (normal)
Gyoto::Screen::dangle1
double dangle1() const
Get increment to first position angle.
Gyoto::Screen::coordKind
int coordKind() const
Get coordinate kind.
Gyoto::Screen::fourvel_
double fourvel_[4]
Observer's 4-velocity.
Definition: GyotoScreen.h:217
Gyoto::Screen::RepeatAngle::angle
double angle() const
Get double value currently pointed to.
Gyoto::Screen::unmapPixUnit
void unmapPixUnit()
Unmap "pix" and "pixel" from unit system.
Gyoto::Screen::clone
Screen * clone() const
Cloner.
Gyoto::Screen::ey_
double ey_[3]
Sky coordinate of base Y vector.
Definition: GyotoScreen.h:214
size_t
#define size_t
If not defined in <sys/types.h>.
Definition: GyotoConfig.h:390
GyotoSmartPointer.h
Reference-counting pointers.
Gyoto::Screen::RepeatAngle::operator++
Coord1dSet & operator++()
Increment iterator (point to next value)
Gyoto::Screen::setObserverPos
void setObserverPos(const double pos[4])
Alternative way to set projection.
Gyoto::Screen::Coord2dSet::kind
const CoordType_e kind
Whether this set holds pixels or angle specifications.
Definition: GyotoScreen.h:672
Gyoto::Screen::distance
double distance(const std::string &) const
Get distance from observer.
Gyoto::Screen::Indices::operator*
size_t operator*() const
Get size_t value currently pointed to.
Gyoto::Object
Object with properties.
Definition: GyotoObject.h:152
Gyoto::Screen::setScreen1
void setScreen1(const double coord[4])
Sets the screen vector e1.
Gyoto::Screen::Coord1dSet::operator++
virtual Coord1dSet & operator++()=0
Increment iterator (point to next value)
Gyoto::Screen::distance
void distance(double dist)
Set distance from observer.
Gyoto::Screen::screen3_
double screen3_[4]
Screen e3 vector (normal)
Definition: GyotoScreen.h:220
Gyoto::Screen::distance_
double distance_
Distance to the observer in m.
Definition: GyotoScreen.h:199
Gyoto::FactoryMessenger
Factory / SmartPointee::Subcontractor_t interface.
Definition: GyotoFactoryMessenger.h:92
Gyoto::Screen::RepeatAngle::size
size_t size()
Number of values in this container.
Gyoto::Screen::argument
void argument(double)
Set angle beetwen line of nodes and X axis of object.
Gyoto::Screen::Empty
A dummy, empty 2D set.
Definition: GyotoScreen.h:728
Gyoto::Screen::distance
double distance() const
Get distance from observer.
Gyoto::Screen::coordToSky
void coordToSky(const double pos[4], double dest[3]) const
Convert 4-position to 3-sky position.
Gyoto::Screen::dangle1_
double dangle1_
Increment to first position angle of Screen; can be typically alpha if in Equatorial Angles,...
Definition: GyotoScreen.h:222
Gyoto::Screen::freq_obs_
double freq_obs_
Frequency at which the observer observes.
Definition: GyotoScreen.h:236
Gyoto::Screen::Coord2dSet::operator++
virtual Coord2dSet & operator++()=0
Increment pointer.
Gyoto::Screen::Empty::begin
virtual void begin()
Reset pointer.
Gyoto::Screen::anglekind
void anglekind(int)
Set Screen::anglekind_.
GyotoUtils.h
GYOTO utilities.
Gyoto::Screen::PALN
void PALN(double)
Set position angle of the line of nodes.
Gyoto::Screen::time
void time(double, const std::string &)
Set observing date in specified unit.
Gyoto::Screen::Coord2dSet::begin
virtual void begin()=0
Reset pointer.
Gyoto::Screen::fov_
double fov_
Field-of-view in rad.
Definition: GyotoScreen.h:181
Gyoto::Screen::argument
double argument() const
Get angle between line of nodes and X axis of object.
Gyoto::Screen::observerkind_
obskind_t observerkind_
What kind of observer are we considering? (At infinity, ZAMO...)
Definition: GyotoScreen.h:242
Gyoto::Screen::inclination
void inclination(double, const std::string &unit)
Set inclination relative to line-of-sight.
Gyoto::Screen::Angles::angle
double angle() const
Get double value currently pointed to.
Gyoto::Screen::Grid::begin
virtual void begin()
Reset pointer.
Gyoto::Screen::dmax_
double dmax_
Maximum distance from which the photons are launched (geometrical units)
Definition: GyotoScreen.h:200
Gyoto::Screen::RepeatAngle::begin
void begin()
Reset specifier to point to the first value.
Gyoto::Screen::Coord2dSet::valid
virtual bool valid()=0
Whether the end has not been passed.
Gyoto::Screen::screen2_
double screen2_[4]
Screen e2 vector.
Definition: GyotoScreen.h:219
Gyoto::Screen::mapPixUnit
void mapPixUnit()
Map "pix" and "pixel" to angular pixel width in unit system.
Gyoto::Screen::azimuthalFieldOfView
double azimuthalFieldOfView() const
Get Screen::azimuthal_fov_.
Gyoto::Screen::getRayCoord
void getRayCoord(const size_t i, const size_t j, double dest[8]) const
Get 8-coordinate of Photon hitting screen pixel.
Gyoto::Screen::npix_
size_t npix_
Resolution in pixels.
Definition: GyotoScreen.h:184
Gyoto::Screen::Coord1dSet::index
virtual size_t index() const =0
Get index of value currently pointed to.
Gyoto::Screen::fieldOfView
void fieldOfView(double)
Set Screen::fov_ in radians.
Gyoto::Screen::CoordType_e
CoordType_e
Enum to specify whether a coordinate set (Coord1dSet or Coord2dSet) holds pixel values or angles.
Definition: GyotoScreen.h:623
Gyoto::Screen::dMax
void dMax(double dist)
Set ray-tracing maximum distance.
Gyoto::Screen::Coord2dSet::operator*
virtual GYOTO_ARRAY< size_t, 2 > operator*() const
Get pixel coordinates.
Gyoto::Screen::Range::valid
bool valid()
True if pointing to something, false if end has been reached.
Gyoto::Screen::Range
1D coordinated specifier for a range
Definition: GyotoScreen.h:738
Gyoto::Screen::print
std::ostream & print(std::ostream &) const
Display.
Gyoto::Screen::inclination
void inclination(double)
Set inclination relative to line-of-sight.
GyotoDefs.h
Gyoto ubiquitous macros and typedefs.
Gyoto::Screen::euler_
double euler_[3]
Euler angles.
Definition: GyotoScreen.h:212
Gyoto::Screen::Range::size
size_t size()
Number of values in this container.
Gyoto::Screen::fieldOfView
void fieldOfView(double, const std::string &unit)
Set Screen::fov_ in specified unit.
Gyoto::Screen::Coord1dSet::size
virtual size_t size()=0
Number of values in this container.
GyotoObject.h
Introspectable objects.
Gyoto::Screen::Coord2dSet::Coord2dSet
Coord2dSet(CoordType_e k)
Set kind at initialisation.
Gyoto::Screen::Coord1dSet::operator*
virtual size_t operator*() const
Get size_t value currently pointed to.
Gyoto::Screen::fieldOfView
double fieldOfView(std::string const &unit) const
Get Screen::fov_ in specified unit.
Gyoto::Screen::Range::Range
Range(size_t mi, size_t ma, size_t d)
Specify min, max and step of this range.
Gyoto::Screen::setScreen2
void setScreen2(const double coord[4])
Sets the screen vector e2.
Gyoto::Screen::resolution
void resolution(size_t)
Set Screen::npix_.
Gyoto::Screen::PALN
double PALN(const std::string &) const
Get position angle of the line of nodes.
Gyoto::Screen::fieldOfView
double fieldOfView() const
Get Screen::fov_ in radians.
Gyoto::Screen::Coord1dSet::~Coord1dSet
virtual ~Coord1dSet()
Virtual destructor.
Gyoto::Screen::mask_filename_
std::string mask_filename_
Last read or written FITS file.
Definition: GyotoScreen.h:197
Gyoto::Screen::Range::begin
void begin()
Reset specifier to point to the first value.
Gyoto::Screen::freqObs
void freqObs(double fo, const std::string &unit)
Set freq_obs_.
Gyoto::Screen::metric
void metric(SmartPointer< Metric::Generic > gg)
Set Screen::gg_.
Gyoto::Screen::fitsWriteMask
void fitsWriteMask(std::string const &fname)
Save mask_ from FITS file.
Gyoto::Screen::anglekind_
anglekind_t anglekind_
Screen angles kind (0: equatorial, 1: spherical)
Definition: GyotoScreen.h:205
Gyoto::Screen::Indices::operator++
Coord1dSet & operator++()
Increment iterator (point to next value)
Gyoto::Screen::Grid
Class containing 2D-points organized in a grid.
Definition: GyotoScreen.h:692
Gyoto::Screen::Grid::size
virtual size_t size()
Number of positions contained.
Gyoto
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43
Gyoto::Screen::RepeatAngle
1D specifier for an angle that is repeated.
Definition: GyotoScreen.h:788
Gyoto::Screen::Coord1dSet::begin
virtual void begin()=0
Reset specifier to point to the first value.
GYOTO_ARRAY
Definition: GyotoScreen.h:43
Gyoto::Screen::Range::operator++
Coord1dSet & operator++()
Increment iterator (point to next value)
Gyoto::Screen::RepeatAngle::valid
bool valid()
True if pointing to something, false if end has been reached.
Gyoto::Screen::ez_
double ez_[3]
Sky coordinate of base Z vector.
Definition: GyotoScreen.h:215
Gyoto::Screen::getRayCoord
void getRayCoord(double x, double y, double dest[8]) const
Get 8-coordinate of Photon hitting screen from a given direction.
Gyoto::Screen::Indices
1D specifier for an arbitrary pixel coordinate set.
Definition: GyotoScreen.h:754
Gyoto::Screen::dangle2
double dangle2() const
Get increment to second position angle.
Gyoto::Screen::Range::operator*
size_t operator*() const
Get size_t value currently pointed to.
Gyoto::Screen::setProjection
void setProjection(const double paln, const double inclination, const double argument)
Set inclination etc.
Gyoto::Screen::computeBaseVectors
void computeBaseVectors()
Compute base vectors according to projection parameters.
Gyoto::Screen::getScreen1
void getScreen1(double dest[4]) const
Get copy of Screen::screen1_.
Gyoto::Screen::time
double time() const
Get observing date in seconds.
Gyoto::Screen::Screen
Screen()
Default constructor.
GyotoMetric.h
Base class for metric description.
Gyoto::Screen::Grid::prefix_
char * prefix_
If non-NULL, cout j each tims it is incremented.
Definition: GyotoScreen.h:696
Gyoto::Screen::Coord2dSet::size
virtual size_t size()=0
Number of positions contained.
Gyoto::Screen::dangle1
void dangle1(double)
Set increment to first position angle.
Gyoto::Screen::azimuthal_fov_
double azimuthal_fov_
Azimuthal field-of-view for Spherical Angles images. Maximal extent of image in the azimuthal b-angle...
Definition: GyotoScreen.h:182
Gyoto::Screen::getObserverPos
void getObserverPos(double dest[4]) const
4-Position of the observer relative to the metric
Gyoto::Screen::time
void time(double)
Set observing date in seconds.
Gyoto::Screen::Indices::begin
void begin()
Reset specifier to point to the first value.
Gyoto::Screen::getScreen3
void getScreen3(double dest[4]) const
Get copy of Screen::screen3_.
Gyoto::Screen::inclination
double inclination(const std::string &) const
Get inclination relative to line-of-sight.
Gyoto::Screen::mask
void mask(double const *const mm, size_t resolution=0)
Set mask_ from array.
Gyoto::Screen::Angles::valid
bool valid()
True if pointing to something, false if end has been reached.
Gyoto::Screen::time
double time(const std::string &) const
Get observing date in seconds.
Gyoto::SmartPointer
Pointers performing reference counting.
Definition: GyotoProperty.h:45
Gyoto::Screen::Coord1dSet::angle
virtual double angle() const
Get double value currently pointed to.
Gyoto::Screen::Angles::size
size_t size()
Number of values in this container.
Gyoto::Screen::Coord1dSet::kind
const CoordType_e kind
Whether this specifier represents angles or pixels.
Definition: GyotoScreen.h:636
Gyoto::Screen::getRayTriad
void getRayTriad(double coord[8], double Ephi[4], double Etheta[4]) const
Get polarization triad.
Gyoto::Screen::ex_
double ex_[3]
Sky coordinate of base X vector.
Definition: GyotoScreen.h:213
Gyoto::Screen::fitsReadMask
void fitsReadMask(std::string const &fname)
Read mask_ from FITS file.
Gyoto::Screen::getFourVel
void getFourVel(double dest[4]) const
Get copy of Screen::fourvel_.
Gyoto::Screen::Bucket::size
virtual size_t size()
Number of positions contained.
Gyoto::Screen::dangle2
void dangle2(double, const std::string &unit)
Set increment to second position angle in specified unit.
Gyoto::Screen
The camera with which the Astrobj is observed.
Definition: GyotoScreen.h:176
Gyoto::Screen::spectrometer
void spectrometer(SmartPointer< Spectrometer::Generic > spectro)
Set Screen::spectro_.
Gyoto::Screen::Bucket::angles
virtual GYOTO_ARRAY< double, 2 > angles() const
Get angle coordinates.
Gyoto::Screen::Coord2dSet::~Coord2dSet
virtual ~Coord2dSet()
Virtual destructor.
GyotoSpectrometer.h
Spectroscopic capabilities of a Screen.
Gyoto::Screen::Grid::valid
virtual bool valid()
Whether the end has not been passed.
Gyoto::Screen::gg_
SmartPointer< Metric::Generic > gg_
The Metric in this end of the Universe.
Definition: GyotoScreen.h:224
Gyoto::Screen::getScreen2
void getScreen2(double dest[4]) const
Get copy of Screen::screen2_.
Gyoto::Screen::metric
SmartPointer< Metric::Generic > metric() const
Get Screen::gg_.
Gyoto::Property
Property that can be set and got using standard methods.
Definition: GyotoProperty.h:608
Gyoto::Screen::Coord1dSet::Coord1dSet
Coord1dSet(CoordType_e k)
Set kind during initialization.
Gyoto::Screen::operator()
bool operator()(size_t, size_t)
Whether this pixel should be ray-traced.
Gyoto::Screen::resolution
size_t resolution() const
Get Screen::npix_.
Gyoto::Screen::coordToXYZ
void coordToXYZ(const double pos[4], double dest[3]) const
Convert 4-position to 3-cartesian coordinates.
Gyoto::Screen::argument
void argument(double, const std::string &unit)
Set angle beetwen line of nodes and X axis of object.
Gyoto::Screen::dangle1
double dangle1(std::string const &unit) const
Get increment to first position angle in specified unit.
Gyoto::Screen::RepeatAngle::index
virtual size_t index() const
Get index of value currently pointed to.
Gyoto::Screen::inclination
double inclination() const
Get inclination relative to line-of-sight.
Gyoto::Screen::screen1_
double screen1_[4]
Screen e1 vector.
Definition: GyotoScreen.h:218
Gyoto::Screen::fillProperty
void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const
Output a single Property to XML.
Gyoto::Screen::freqObs
void freqObs(double fo)
Set freq_obs_.
Gyoto::Screen::freqObs
double freqObs(const std::string &unit) const
Get freq_obs_.
Gyoto::Screen::freqObs
double freqObs() const
Get freq_obs_.
Gyoto::Screen::Bucket::operator++
virtual Coord2dSet & operator++()
Increment pointer.
Gyoto::Screen::Bucket
Class containing arbitrary 2D-points.
Definition: GyotoScreen.h:713
Gyoto::Screen::Empty::operator++
virtual Coord2dSet & operator++()
Increment pointer.
Gyoto::Screen::setProjection
void setProjection(const double distance, const double paln, const double inclination, const double argument)
Set distance, inclination etc.
Gyoto::Screen::setFourVel
void setFourVel(const double coord[4])
Sets the observer's 4-velocity.
Gyoto::Screen::Indices::valid
bool valid()
True if pointing to something, false if end has been reached.
Gyoto::Screen::PALN
double PALN() const
Get position angle of the line of nodes.
Gyoto::Screen::Grid::operator*
virtual GYOTO_ARRAY< size_t, 2 > operator*() const
Get pixel coordinates.
Gyoto::Screen::argument
double argument(const std::string &) const
Get angle between line of nodes and X axis of object.
Gyoto::Screen::Subcontractor
static SmartPointer< Screen > Subcontractor(FactoryMessenger *fmp)
Instanciate a Screen from XML entity.
Gyoto::Screen::Coord2dSet
Class to specify a set of points on the Screen.
Definition: GyotoScreen.h:669
Gyoto::Screen::dangle2_
double dangle2_
Increment to second position angle of Screen; can be typically delta if in Equatorial Angles,...
Definition: GyotoScreen.h:223
Gyoto::Screen::Range::index
virtual size_t index() const
Get index of value currently pointed to.
Gyoto::Screen::Bucket::begin
virtual void begin()
Reset pointer.
Gyoto::Screen::spectrometer
SmartPointer< Spectrometer::Generic > spectrometer() const
Get Screen::spectro_.
Gyoto::Screen::Screen
Screen(const Screen &)
Copy constructor.
Gyoto::Screen::distance
void distance(double dist, const std::string &unit)
Set distance from observer.
Gyoto::Screen::printBaseVectors
std::ostream & printBaseVectors(std::ostream &) const
Debug helper.
Gyoto::SmartPointee
Can be pointed to by a SmartPointer.
Definition: GyotoSmartPointer.h:81
Gyoto::Screen::azimuthalFieldOfView
void azimuthalFieldOfView(double ff)
Set Screen::azimuthal_fov_.
Gyoto::Screen::Grid::operator++
virtual Coord2dSet & operator++()
Increment pointer.
Gyoto::Screen::dangle2
double dangle2(std::string const &unit) const
Get increment to second position angle in specified unit.
obskind_t
#define obskind_t
Type for observer kind.
Definition: GyotoDefs.h:552
Gyoto::Screen::Indices::index
virtual size_t index() const
Get index of value currently pointed to.
Gyoto::Screen::Coord2dSet::angles
virtual GYOTO_ARRAY< double, 2 > angles() const
Get angle coordinates.
Gyoto::Screen::Angles
1D specifier for an arbitrary angle coordinate set.
Definition: GyotoScreen.h:771
Gyoto::Screen::~Screen
virtual ~Screen()
Destructor.
Gyoto::Screen::dangle2
void dangle2(double)
Set increment to second position angle.
Gyoto::Screen::Bucket::operator*
virtual GYOTO_ARRAY< size_t, 2 > operator*() const
Get pixel coordinates.
Gyoto::Screen::mask_
double * mask_
Mask with 0 where the ray-tracing should not be performed.
Definition: GyotoScreen.h:189
Gyoto::Screen::Empty::size
virtual size_t size()
Number of positions contained.
Gyoto::Screen::dMax
double dMax() const
Get maximum ray-tracing distance.