GyotoScreen.h
Go to the documentation of this file.
/*
Copyright 2011-2019 Thibaut Paumard, Frederic Vincent
This file is part of Gyoto.
Gyoto is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gyoto is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GyotoScreen_H_
#define __GyotoScreen_H_
#include <iostream>
#include <fstream>
#include <string>
#if defined HAVE_BOOST_ARRAY_HPP
# include <boost/array.hpp>
# define GYOTO_ARRAY boost::array
# if defined HAVE_MPI
# include <boost/version.hpp>
# if BOOST_VERSION >= 106400
# include <boost/serialization/boost_array.hpp>
# include <boost/serialization/array_wrapper.hpp>
# endif
# endif
#else
template <typename T, size_t sz> class GYOTO_ARRAY {
private:
T buf[sz];
public:
T& operator[](size_t c) { return buf[c] ; }
};
#endif
namespace Gyoto {
class Screen;
}
#include <GyotoDefs.h>
#include <GyotoUtils.h>
#include <GyotoSmartPointer.h>
#include <GyotoObject.h>
#include <GyotoMetric.h>
#include <GyotoSpectrometer.h>
class Gyoto::Screen
: public Gyoto::SmartPointee,
public Gyoto::Object
{
friend class Gyoto::SmartPointer<Gyoto::Screen>;
private:
double tobs_;
double fov_;
double azimuthal_fov_;
// double tmin_;
size_t npix_;
double * mask_;
std::string mask_filename_;
double distance_;
double dmax_;
enum anglekind_e { equatorial_angles=0, rectilinear=1, spherical_angles=2};
typedef int anglekind_t;
anglekind_t anglekind_;
double euler_[3];
double ex_[3];
double ey_[3];
double ez_[3];
double fourvel_[4];
double screen1_[4];
double screen2_[4];
double screen3_[4];
double dangle1_;
double dangle2_;
SmartPointer<Metric::Generic> gg_;
SmartPointer<Spectrometer::Generic> spectro_;
double freq_obs_;
obskind_t observerkind_;
public:
GYOTO_OBJECT;
GYOTO_OBJECT_THREAD_SAFETY;
// Constructors - Destructor
// -------------------------
Screen() ;
Screen(const Screen& ) ;
Screen * clone() const;
virtual ~Screen() ;
// Mutators / assignment
// ---------------------
void setProjection(const double paln,
const double inclination,
const double argument);
void setProjection(const double distance,
const double paln,
const double inclination,
const double argument);
void distance(double dist);
void dMax(double dist);
void distance(double dist, const std::string &unit);
void inclination(double);
void inclination(double, const std::string &unit);
void PALN(double);
void PALN(double, const std::string &unit);
void argument(double);
void argument(double, const std::string &unit);
void spectrometer(SmartPointer<Spectrometer::Generic> spectro);
SmartPointer<Spectrometer::Generic> spectrometer() const ;
void freqObs(double fo);
void freqObs(double fo, const std::string &unit);
double freqObs() const ;
double freqObs(const std::string &unit) const;
void setObserverPos(const double pos[4]);
void observerKind(const std::string &kind);
std::string observerKind() const;
void setFourVel(const double coord[4]);
void setScreen1(const double coord[4]);
void setScreen2(const double coord[4]);
void setScreen3(const double coord[4]);
// Accessors
// ---------
int coordKind() const;
double distance() const;
double distance(const std::string&) const;
double dMax() const;
double inclination() const;
double inclination(const std::string&) const;
double PALN() const;
double PALN(const std::string&) const;
double argument() const;
double argument(const std::string&) const;
SmartPointer<Metric::Generic> metric() const;
void metric(SmartPointer<Metric::Generic> gg);
double time() const;
double time(const std::string &) const;
void time(double, const std::string &);
void time(double);
double fieldOfView() const;
double fieldOfView(std::string const &unit) const;
void fieldOfView(double);
void fieldOfView(double, const std::string &unit);
double azimuthalFieldOfView() const;
void azimuthalFieldOfView(double ff);
void dangle1(double);
void dangle1(double, const std::string &unit);
double dangle1() const;
double dangle1(std::string const &unit)const;
void dangle2(double);
void dangle2(double, const std::string &unit);
double dangle2() const;
double dangle2(std::string const &unit)const;
void anglekind(int);
void anglekind(std::string const&);
std::string anglekind() const;
size_t resolution() const;
void resolution(size_t);
void mask(double const * const mm, size_t resolution=0);
double const * mask() const ;
void maskFile(std::string const &fname);
std::string maskFile() const;
# ifdef GYOTO_USE_CFITSIO
void fitsReadMask(std::string const &fname);
void fitsWriteMask(std::string const &fname);
# endif
bool operator()(size_t, size_t);
void getObserverPos(double dest[4]) const;
void getFourVel(double dest[4]) const;
void fourVel(std::vector<double> const &);
std::vector<double> fourVel() const;
void screenVector1(std::vector<double> const &);
std::vector<double> screenVector1() const;
void screenVector2(std::vector<double> const &);
std::vector<double> screenVector2() const;
void screenVector3(std::vector<double> const &);
std::vector<double> screenVector3() const;
void getScreen1(double dest[4]) const;
void getScreen2(double dest[4]) const;
void getScreen3(double dest[4]) const;
void getRayTriad(double x, double y,
double dest[8],
bool compute_polar_basis=false,
double Ephi[4]=NULL, double Etheta[4]=NULL) const;
void getRayTriad(const size_t i, const size_t j,
double dest[8],
bool compute_polar_basis=false,
double Ephi[4]=NULL, double Etheta[4]=NULL) const;
void coordToSky(const double pos[4], double dest[3], bool geometrical=false) const;
void skyToCoord(const double sky[3], double dest[4], bool geometrical=false) const;
void coordToXYZ(const double pos[4], double dest[3]) const;
void computeBaseVectors() ;
// friend std::ostream& operator<<(std::ostream& , const Screen& ) ;
std::ostream& print(std::ostream&) const ;
std::ostream& printBaseVectors(std::ostream&) const ;
// UDUNITS
# ifdef HAVE_UDUNITS
void mapPixUnit();
void unmapPixUnit();
# endif
#ifdef GYOTO_USE_XERCES
public:
void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const;
static SmartPointer<Screen> Subcontractor(FactoryMessenger* fmp);
#endif
enum CoordType_e {angle, pixel};
class Coord1dSet {
public:
const CoordType_e kind;
public:
Coord1dSet(CoordType_e k);
virtual ~Coord1dSet();
virtual void begin() =0;
virtual bool valid() =0;
virtual size_t size()=0;
virtual size_t operator*() const ;
virtual double angle() const ;
virtual Coord1dSet& operator++()=0;
virtual size_t index() const=0;
};
class Coord2dSet {
public:
const CoordType_e kind;
Coord2dSet(CoordType_e k);
virtual ~Coord2dSet();
virtual Coord2dSet& operator++() =0;
virtual GYOTO_ARRAY<size_t, 2> operator* () const;
virtual GYOTO_ARRAY<double, 2> angles() const ;
virtual void begin() =0;
virtual bool valid() =0;
virtual size_t size()=0;
};
class Grid: public Coord2dSet {
protected:
protected:
char * prefix_;
Coord1dSet &iset_;
Coord1dSet &jset_;
public:
Grid(Coord1dSet &iset, Coord1dSet &jset, const char * const p=NULL);
virtual ~Grid();
virtual Coord2dSet& operator++();
virtual GYOTO_ARRAY<size_t, 2> operator* () const;
virtual void begin();
virtual bool valid();
virtual size_t size();
};
class Bucket : public Coord2dSet {
protected:
Coord1dSet &alpha_;
Coord1dSet &delta_;
public:
Bucket(Coord1dSet &iset, Coord1dSet &jset);
virtual Coord2dSet& operator++();
virtual GYOTO_ARRAY<double, 2> angles() const;
virtual GYOTO_ARRAY<size_t, 2> operator*() const;
virtual void begin();
virtual bool valid();
virtual size_t size();
};
class Empty: public Coord2dSet {
public:
Empty();
virtual Coord2dSet& operator++();
virtual void begin();
virtual bool valid();
virtual size_t size();
};
class Range : public Coord1dSet {
protected:
const size_t mi_, ma_, d_, sz_;
size_t cur_;
public:
Range(size_t mi, size_t ma, size_t d);
void begin();
bool valid();
size_t size();
Coord1dSet& operator++();
size_t operator*() const ;
virtual size_t index() const ;
};
class Indices : public Coord1dSet {
protected:
size_t * indices_;
size_t const sz_;
size_t i_;
public:
Indices (size_t const*const buf, size_t sz);
~Indices();
void begin();
bool valid();
size_t size();
Coord1dSet& operator++();
size_t operator*() const ;
virtual size_t index() const ;
};
class Angles : public Coord1dSet {
protected:
double * buf_;
size_t const sz_;
size_t i_;
public:
Angles (double const*const buf, size_t sz);
~Angles();
void begin();
bool valid();
size_t size();
Coord1dSet& operator++();
double angle() const ;
virtual size_t index() const ;
};
class RepeatAngle : public Coord1dSet {
protected:
double const val_;
size_t const sz_;
size_t i_;
public:
RepeatAngle (double val, size_t sz);
void begin();
bool valid();
size_t size();
Coord1dSet& operator++();
double angle() const ;
virtual size_t index() const ;
};
};
#endif
size_t
#define size_t
If not defined in <sys/types.h>.
Definition GyotoConfig.h:390
GyotoDefs.h
Gyoto ubiquitous macros and typedefs.
obskind_t
#define obskind_t
Type for observer kind.
Definition GyotoDefs.h:554
GyotoMetric.h
Base class for metric description.
GyotoObject.h
Introspectable objects.
GYOTO_OBJECT
#define GYOTO_OBJECT
Declare class::properties and class::getProperties().
Definition GyotoObject.h:84
GyotoSmartPointer.h
Reference-counting pointers.
GyotoSpectrometer.h
Spectroscopic capabilities of a Screen.
GyotoUtils.h
GYOTO utilities.
GYOTO_ARRAY
Definition GyotoScreen.h:43
Gyoto::FactoryMessenger
Factory / SmartPointee::Subcontractor_t interface.
Definition GyotoFactoryMessenger.h:92
Gyoto::Object
Object with properties.
Definition GyotoObject.h:152
Gyoto::Object::kind
virtual void kind(const std::string)
Set kind_.
Gyoto::Property
Property that can be set and got using standard methods.
Definition GyotoProperty.h:608
Gyoto::Screen::Angles::begin
void begin()
Reset specifier to point to the first value.
Gyoto::Screen::Angles::index
virtual size_t index() const
Get index of value currently pointed to.
Gyoto::Screen::Angles::angle
double angle() const
Get double value currently pointed to.
Gyoto::Screen::Angles::operator++
Coord1dSet & operator++()
Increment iterator (point to next value).
Gyoto::Screen::Angles::size
size_t size()
Number of values in this container.
Gyoto::Screen::Angles::valid
bool valid()
True if pointing to something, false if end has been reached.
Gyoto::Screen::Bucket::operator*
virtual GYOTO_ARRAY< size_t, 2 > operator*() const
Get pixel coordinates.
Gyoto::Screen::Bucket::operator++
virtual Coord2dSet & operator++()
Increment pointer.
Gyoto::Screen::Bucket::size
virtual size_t size()
Number of positions contained.
Gyoto::Screen::Bucket::angles
virtual GYOTO_ARRAY< double, 2 > angles() const
Get angle coordinates.
Gyoto::Screen::Bucket::begin
virtual void begin()
Reset pointer.
Gyoto::Screen::Bucket::valid
virtual bool valid()
Whether the end has not been passed.
Gyoto::Screen::Coord1dSet
Set of 1-d coordinates: indices or angles.
Definition GyotoScreen.h:646
Gyoto::Screen::Coord1dSet::kind
const CoordType_e kind
Whether this specifier represents angles or pixels.
Definition GyotoScreen.h:649
Gyoto::Screen::Coord1dSet::begin
virtual void begin()=0
Reset specifier to point to the first value.
Gyoto::Screen::Coord1dSet::index
virtual size_t index() const =0
Get index of value currently pointed to.
Gyoto::Screen::Coord1dSet::operator++
virtual Coord1dSet & operator++()=0
Increment iterator (point to next value).
Gyoto::Screen::Coord1dSet::size
virtual size_t size()=0
Number of values in this container.
Gyoto::Screen::Coord1dSet::valid
virtual bool valid()=0
True if pointing to something, false if end has been reached.
Gyoto::Screen::Coord1dSet::angle
virtual double angle() const
Get double value currently pointed to.
Gyoto::Screen::Coord1dSet::Coord1dSet
Coord1dSet(CoordType_e k)
Set kind during initialization.
Gyoto::Screen::Coord1dSet::~Coord1dSet
virtual ~Coord1dSet()
Virtual destructor.
Gyoto::Screen::Coord1dSet::operator*
virtual size_t operator*() const
Get size_t value currently pointed to.
Gyoto::Screen::Coord2dSet::begin
virtual void begin()=0
Reset pointer.
Gyoto::Screen::Coord2dSet::operator++
virtual Coord2dSet & operator++()=0
Increment pointer.
Gyoto::Screen::Coord2dSet::size
virtual size_t size()=0
Number of positions contained.
Gyoto::Screen::Coord2dSet::kind
const CoordType_e kind
Whether this set holds pixels or angle specifications.
Definition GyotoScreen.h:685
Gyoto::Screen::Coord2dSet::valid
virtual bool valid()=0
Whether the end has not been passed.
Gyoto::Screen::Coord2dSet::angles
virtual GYOTO_ARRAY< double, 2 > angles() const
Get angle coordinates.
Gyoto::Screen::Coord2dSet::~Coord2dSet
virtual ~Coord2dSet()
Virtual destructor.
Gyoto::Screen::Coord2dSet::operator*
virtual GYOTO_ARRAY< size_t, 2 > operator*() const
Get pixel coordinates.
Gyoto::Screen::Coord2dSet::Coord2dSet
Coord2dSet(CoordType_e k)
Set kind at initialisation.
Gyoto::Screen::Empty::begin
virtual void begin()
Reset pointer.
Gyoto::Screen::Empty::size
virtual size_t size()
Number of positions contained.
Gyoto::Screen::Empty::operator++
virtual Coord2dSet & operator++()
Increment pointer.
Gyoto::Screen::Empty::valid
virtual bool valid()
Whether the end has not been passed.
Gyoto::Screen::Grid::size
virtual size_t size()
Number of positions contained.
Gyoto::Screen::Grid::valid
virtual bool valid()
Whether the end has not been passed.
Gyoto::Screen::Grid::prefix_
char * prefix_
If non-NULL, cout j each tims it is incremented.
Definition GyotoScreen.h:709
Gyoto::Screen::Grid::begin
virtual void begin()
Reset pointer.
Gyoto::Screen::Grid::operator++
virtual Coord2dSet & operator++()
Increment pointer.
Gyoto::Screen::Grid::operator*
virtual GYOTO_ARRAY< size_t, 2 > operator*() const
Get pixel coordinates.
Gyoto::Screen::Indices::valid
bool valid()
True if pointing to something, false if end has been reached.
Gyoto::Screen::Indices::size
size_t size()
Number of values in this container.
Gyoto::Screen::Indices::begin
void begin()
Reset specifier to point to the first value.
Gyoto::Screen::Indices::index
virtual size_t index() const
Get index of value currently pointed to.
Gyoto::Screen::Indices::operator++
Coord1dSet & operator++()
Increment iterator (point to next value).
Gyoto::Screen::Indices::operator*
size_t operator*() const
Get size_t value currently pointed to.
Gyoto::Screen::Range::Range
Range(size_t mi, size_t ma, size_t d)
Specify min, max and step of this range.
Gyoto::Screen::Range::valid
bool valid()
True if pointing to something, false if end has been reached.
Gyoto::Screen::Range::index
virtual size_t index() const
Get index of value currently pointed to.
Gyoto::Screen::Range::begin
void begin()
Reset specifier to point to the first value.
Gyoto::Screen::Range::size
size_t size()
Number of values in this container.
Gyoto::Screen::Range::operator*
size_t operator*() const
Get size_t value currently pointed to.
Gyoto::Screen::Range::operator++
Coord1dSet & operator++()
Increment iterator (point to next value).
Gyoto::Screen::RepeatAngle::angle
double angle() const
Get double value currently pointed to.
Gyoto::Screen::RepeatAngle::index
virtual size_t index() const
Get index of value currently pointed to.
Gyoto::Screen::RepeatAngle::begin
void begin()
Reset specifier to point to the first value.
Gyoto::Screen::RepeatAngle::size
size_t size()
Number of values in this container.
Gyoto::Screen::RepeatAngle::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
The camera with which the Astrobj is observed.
Definition GyotoScreen.h:176
Gyoto::Screen::gg_
SmartPointer< Metric::Generic > gg_
The Metric in this end of the Universe.
Definition GyotoScreen.h:224
Gyoto::Screen::mapPixUnit
void mapPixUnit()
Map "pix" and "pixel" to angular pixel width in unit system.
Gyoto::Screen::freq_obs_
double freq_obs_
Frequency at which the observer observes.
Definition GyotoScreen.h:236
Gyoto::Screen::PALN
double PALN(const std::string &) const
Get position angle of the line of nodes.
Gyoto::Screen::fov_
double fov_
Field-of-view in rad.
Definition GyotoScreen.h:181
Gyoto::Screen::screen3_
double screen3_[4]
Screen e3 vector (normal).
Definition GyotoScreen.h:220
Gyoto::Screen::ex_
double ex_[3]
Sky coordinate of base X vector.
Definition GyotoScreen.h:213
Gyoto::Screen::ez_
double ez_[3]
Sky coordinate of base Z vector.
Definition GyotoScreen.h:215
Gyoto::Screen::azimuthalFieldOfView
double azimuthalFieldOfView() const
Get Screen::azimuthal_fov_.
Gyoto::Screen::npix_
size_t npix_
Resolution in pixels.
Definition GyotoScreen.h:184
Gyoto::Screen::getScreen2
void getScreen2(double dest[4]) const
Get copy of Screen::screen2_.
Gyoto::Screen::Screen
Screen(const Screen &)
Copy constructor.
Gyoto::Screen::dangle1
double dangle1(std::string const &unit) const
Get increment to first position angle in specified unit.
Gyoto::Screen::freqObs
void freqObs(double fo, const std::string &unit)
Set freq_obs_.
Gyoto::Screen::ey_
double ey_[3]
Sky coordinate of base Y vector.
Definition GyotoScreen.h:214
Gyoto::Screen::~Screen
virtual ~Screen()
Destructor.
Gyoto::Screen::distance_
double distance_
Distance to the observer in m.
Definition GyotoScreen.h:199
Gyoto::Screen::argument
double argument() const
Get angle between line of nodes and X axis of object.
Gyoto::Screen::PALN
void PALN(double)
Set position angle of the line of nodes.
Gyoto::Screen::mask
double const * mask() const
Retrieve const pointer to mask_.
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::CoordType_e
CoordType_e
Enum to specify whether a coordinate set (Coord1dSet or Coord2dSet) holds pixel values or angles.
Definition GyotoScreen.h:636
Gyoto::Screen::Screen
Screen()
Default constructor.
Gyoto::Screen::freqObs
double freqObs(const std::string &unit) const
Get freq_obs_.
Gyoto::Screen::unmapPixUnit
void unmapPixUnit()
Unmap "pix" and "pixel" from unit system.
Gyoto::Screen::PALN
void PALN(double, const std::string &unit)
Set position angle of the line of nodes.
Gyoto::Screen::fieldOfView
void fieldOfView(double)
Set Screen::fov_ in radians.
Gyoto::Screen::setScreen2
void setScreen2(const double coord[4])
Sets the screen vector e2.
Gyoto::Screen::metric
SmartPointer< Metric::Generic > metric() const
Get Screen::gg_.
Gyoto::Screen::mask_filename_
std::string mask_filename_
Last read or written FITS file.
Definition GyotoScreen.h:197
Gyoto::Screen::time
double time(const std::string &) const
Get observing date in seconds.
Gyoto::Screen::freqObs
double freqObs() const
Get freq_obs_.
Gyoto::Screen::distance
double distance() const
Get distance from observer.
Gyoto::Screen::fillProperty
void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const
Output a single Property to XML.
Gyoto::Screen::argument
void argument(double)
Set angle beetwen line of nodes and X axis of object.
Gyoto::Screen::argument
void argument(double, const std::string &unit)
Set angle beetwen line of nodes and X axis of object.
Gyoto::Screen::time
void time(double, const std::string &)
Set observing date in specified unit.
Gyoto::Screen::distance
double distance(const std::string &) const
Get distance from observer.
Gyoto::Screen::getRayTriad
void getRayTriad(const size_t i, const size_t j, double dest[8], bool compute_polar_basis=false, double Ephi[4]=NULL, double Etheta[4]=NULL) const
Get 8-coordinate of Photon hitting screen pixel and polarization basis if needed.
Gyoto::Screen::inclination
double inclination() const
Get inclination relative to line-of-sight.
Gyoto::Screen::time
double time() const
Get observing date in seconds.
Gyoto::Screen::getScreen1
void getScreen1(double dest[4]) const
Get copy of Screen::screen1_.
Gyoto::Screen::anglekind_
anglekind_t anglekind_
Screen angles kind (0: equatorial, 1: spherical).
Definition GyotoScreen.h:205
Gyoto::Screen::freqObs
void freqObs(double fo)
Set freq_obs_.
Gyoto::Screen::dangle2
void dangle2(double)
Set increment to second position angle.
Gyoto::Screen::observerkind_
obskind_t observerkind_
What kind of observer are we considering? (At infinity, ZAMO...).
Definition GyotoScreen.h:242
Gyoto::Screen::dangle1
void dangle1(double, const std::string &unit)
Set increment to first position angle in specified unit.
Gyoto::Screen::setFourVel
void setFourVel(const double coord[4])
Sets the observer's 4-velocity.
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::fitsWriteMask
void fitsWriteMask(std::string const &fname)
Save mask_ from FITS file.
Gyoto::Screen::inclination
void inclination(double)
Set inclination relative to line-of-sight.
Gyoto::Screen::coordToSky
void coordToSky(const double pos[4], double dest[3], bool geometrical=false) const
Convert metric 4-position to sky 3-position.
Gyoto::Screen::euler_
double euler_[3]
Euler angles.
Definition GyotoScreen.h:212
Gyoto::Screen::time
void time(double)
Set observing date in seconds.
Gyoto::Screen::coordKind
int coordKind() const
Get coordinate kind.
Gyoto::Screen::dMax
void dMax(double dist)
Set ray-tracing maximum distance.
Gyoto::Screen::PALN
double PALN() const
Get position angle of the line of nodes.
Gyoto::Screen::dangle2
void dangle2(double, const std::string &unit)
Set increment to second position angle in specified unit.
Gyoto::Screen::screen1_
double screen1_[4]
Screen e1 vector.
Definition GyotoScreen.h:218
Gyoto::Screen::printBaseVectors
std::ostream & printBaseVectors(std::ostream &) const
Debug helper.
Gyoto::Screen::getRayTriad
void getRayTriad(double x, double y, double dest[8], bool compute_polar_basis=false, double Ephi[4]=NULL, double Etheta[4]=NULL) const
Get 8-coordinate of Photon hitting screen from a given direction and polarization basis if needed.
Gyoto::Screen::tobs_
double tobs_
Observing date in s.
Definition GyotoScreen.h:180
Gyoto::Screen::getFourVel
void getFourVel(double dest[4]) const
Get copy of Screen::fourvel_.
Gyoto::Screen::getObserverPos
void getObserverPos(double dest[4]) const
4-Position of the observer relative to the metric
Gyoto::Screen::distance
void distance(double dist, const std::string &unit)
Set distance from observer.
Gyoto::Screen::getScreen3
void getScreen3(double dest[4]) const
Get copy of Screen::screen3_.
Gyoto::Screen::fieldOfView
double fieldOfView() const
Get Screen::fov_ in radians.
Gyoto::Screen::inclination
void inclination(double, const std::string &unit)
Set inclination relative to line-of-sight.
Gyoto::Screen::fieldOfView
double fieldOfView(std::string const &unit) const
Get Screen::fov_ in specified unit.
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::dangle1
double dangle1() const
Get increment to first position angle.
Gyoto::Screen::skyToCoord
void skyToCoord(const double sky[3], double dest[4], bool geometrical=false) const
Convert sky 3-position to metric 4-position.
Gyoto::Screen::setProjection
void setProjection(const double paln, const double inclination, const double argument)
Set inclination etc.
Gyoto::Screen::azimuthalFieldOfView
void azimuthalFieldOfView(double ff)
Set Screen::azimuthal_fov_.
Gyoto::Screen::dangle2
double dangle2(std::string const &unit) const
Get increment to second position angle in specified unit.
Gyoto::Screen::fourvel_
double fourvel_[4]
Observer's 4-velocity.
Definition GyotoScreen.h:217
Gyoto::Screen::operator()
bool operator()(size_t, size_t)
Whether this pixel should be ray-traced.
Gyoto::Screen::setScreen3
void setScreen3(const double coord[4])
Sets the screen vector e3 (normal).
Gyoto::Screen::dMax
double dMax() const
Get maximum ray-tracing distance.
Gyoto::Screen::anglekind
void anglekind(int)
Set Screen::anglekind_.
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::dangle1
void dangle1(double)
Set increment to first position angle.
Gyoto::Screen::mask_
double * mask_
Mask with 0 where the ray-tracing should not be performed.
Definition GyotoScreen.h:189
Gyoto::Screen::spectrometer
void spectrometer(SmartPointer< Spectrometer::Generic > spectro)
Set Screen::spectro_.
Gyoto::Screen::setObserverPos
void setObserverPos(const double pos[4])
Alternative way to set projection.
Gyoto::Screen::spectro_
SmartPointer< Spectrometer::Generic > spectro_
Gyoto::Spectrometer::Generic subclass instance used for quantities Spectrum and BinSpectrum.
Definition GyotoScreen.h:229
Gyoto::Screen::coordToXYZ
void coordToXYZ(const double pos[4], double dest[3]) const
Convert 4-position to 3-cartesian coordinates.
Gyoto::Screen::clone
Screen * clone() const
Cloner.
Gyoto::Screen::setScreen1
void setScreen1(const double coord[4])
Sets the screen vector e1.
Gyoto::Screen::setProjection
void setProjection(const double distance, const double paln, const double inclination, const double argument)
Set distance, inclination etc.
Gyoto::Screen::dangle2
double dangle2() const
Get increment to second position angle.
Gyoto::Screen::spectrometer
SmartPointer< Spectrometer::Generic > spectrometer() const
Get Screen::spectro_.
Gyoto::Screen::dmax_
double dmax_
Maximum distance from which the photons are launched (geometrical units).
Definition GyotoScreen.h:200
Gyoto::Screen::screen2_
double screen2_[4]
Screen e2 vector.
Definition GyotoScreen.h:219
Gyoto::Screen::fieldOfView
void fieldOfView(double, const std::string &unit)
Set Screen::fov_ in specified unit.
Gyoto::Screen::mask
void mask(double const *const mm, size_t resolution=0)
Set mask_ from array.
Gyoto::Screen::distance
void distance(double dist)
Set distance from observer.
Gyoto::Screen::metric
void metric(SmartPointer< Metric::Generic > gg)
Set Screen::gg_.
Gyoto::Screen::resolution
void resolution(size_t)
Set Screen::npix_.
Gyoto::Screen::computeBaseVectors
void computeBaseVectors()
Compute base vectors according to projection parameters.
Gyoto::Screen::print
std::ostream & print(std::ostream &) const
Display.
Gyoto::Screen::fitsReadMask
void fitsReadMask(std::string const &fname)
Read mask_ from FITS file.
Gyoto::Screen::inclination
double inclination(const std::string &) const
Get inclination relative to line-of-sight.
Gyoto::Screen::resolution
size_t resolution() const
Get Screen::npix_.
Gyoto::SmartPointee
Can be pointed to by a SmartPointer.
Definition GyotoSmartPointer.h:81
Gyoto::SmartPointer
Pointers performing reference counting.
Definition GyotoSmartPointer.h:135
Gyoto
Namespace for the Gyoto library.
Definition GyotoAstrobj.h:44