Gyoto
GyotoXillverReflection.h
Go to the documentation of this file.
1 
11 /*
12  Copyright (c) 2017, 2018 Frederic Vincent, Thibaut Paumard
13  This file is part of Gyoto.
14 
15  Gyoto is free software: you can redistribute it and/or modify
16  it under the terms of the GNU General Public License as published by
17  the Free Software Foundation, either version 3 of the License, or
18  (at your option) any later version.
19 
20  Gyoto is distributed in the hope that it will be useful,
21  but WITHOUT ANY WARRANTY; without even the implied warranty of
22  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23  GNU General Public License for more details.
24 
25  You should have received a copy of the GNU General Public License
26  along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
27 */
28 
29 
30 #ifndef __GyotoXillverReflection_H_
31 #define __GyotoXillverReflection_H_
32 
33 #include <GyotoThinDisk.h>
34 
35 
36 namespace Gyoto{
37  namespace Astrobj { class XillverReflection; }
38 }
39 
48 : public Astrobj::ThinDisk,
49  public Hook::Listener
50 {
52 
53  private:
54  std::string filenameIllum_;
55  std::string filenameRefl_;
56 
61  double * reflection_;
62 
63  double * logxi_;
64  double * incl_;
65  double * freq_;
69 
70  double * illumination_;
71 
72  double * radius_;
73  double * phi_;
76 
77  double aa_;
78  double lampradius_;
80 
82 
83  protected:
84 
85  public:
87  // fillProperty is overridden to remove leading "!" from FITS filename
88  void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const;
90  XillverReflection(const XillverReflection& o);
91  virtual XillverReflection * clone() const ;
92  virtual ~XillverReflection() ;
93 
94  public:
95 
96  void timelampphizero(double tt);
97  double timelampphizero() const;
98  void lampradius(double rr);
99  double lampradius() const;
100  void fileillumination(std::string const &f);
101  std::string fileillumination() const ;
102  void filereflection(std::string const &f);
103  std::string filereflection() const ;
104 
105  void averageOverAngle(bool t);
106  bool averageOverAngle()const;
107 
108  #ifdef GYOTO_USE_CFITSIO
109  virtual void fitsReadIllum(std::string filename);
112  virtual void fitsWriteIllum(std::string filename);
113 
115  virtual void fitsReadRefl(std::string filename);
117  virtual void fitsWriteRefl(std::string filename);
118 #endif
119 
127  void setIllumination(double * pattern);
128  void setReflection(double * pattern);
129 
130 
145  virtual void copyIllumination(double const * const pattern = NULL,
146  size_t const naxes[2] = NULL);
147  virtual double const * getIllumination() const;
148  virtual void getIlluminationNaxes( size_t naxes[2] ) const ;
149 
150  virtual void copyReflection(double const * const pattern = NULL,
151  size_t const naxes[3] = NULL);
152  virtual double const * getReflection() const;
153  virtual void getReflectionNaxes( size_t naxes[3] ) const ;
154 
155  virtual void copyGridReflLogxi(double const * const pattern = NULL,
156  size_t nxi = 0 );
157  virtual double const * getGridReflLogxi() const;
158  virtual void copyGridReflIncl(double const * const pattern = NULL,
159  size_t ni = 0 );
160  virtual double const * getGridReflIncl() const;
161  virtual void copyGridReflFreq(double const * const pattern = NULL,
162  size_t nnu = 0 );
163  virtual double const * getGridReflFreq() const;
164  virtual void copyGridIllumRadius(double const * const pattern = NULL,
165  size_t nr = 0 );
166  virtual double const * getGridIllumRadius() const;
167  virtual void copyGridIllumPhi(double const * const pattern = NULL,
168  size_t nphi = 0 );
169  virtual double const * getGridIllumPhi() const;
170 
171  protected:
172 
173  void getIndicesRefl(size_t i[3], double const co[4], double logxi, double incl,
174  double nu=0.) const ;
176  void getIndicesIllum(size_t i[3], double const co[4]) const ;
178 
179  public:
180 
181  virtual double emission(double nu_em, double dsem,
182  state_t const &_ph, double const _obj[8]=NULL) const;
183 
184  virtual void updateSpin() ;
185  virtual void tell(Gyoto::Hook::Teller *msg);
186  using Generic::metric;
187  virtual void metric(SmartPointer<Metric::Generic>);
188 
189 };
190 
191 #endif
virtual void fitsReadIllum(std::string filename)
Read parameters and arrays from FITS file.
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
virtual void getIlluminationNaxes(size_t naxes[2]) const
Get XillverReflection::nr_, XillverReflection::nphi_.
The illumination table specifies how the thin disk is illuminated while the reflection table deduces ...
Definition: GyotoXillverReflection.h:47
double timelampphizero_
Time at which lamp is at phi=0.
Definition: GyotoXillverReflection.h:79
std::string filenameRefl_
FITS file containing the reflection pattern.
Definition: GyotoXillverReflection.h:55
size_t ni_
Number of emission angles.
Definition: GyotoXillverReflection.h:67
virtual void fitsReadRefl(std::string filename)
Read parameters and arrays from FITS file.
virtual double emission(double nu_em, double dsem, state_t const &_ph, double const _obj[8]=NULL) const
Specific intensity Iν
virtual void copyIllumination(double const *const pattern=NULL, size_t const naxes[2]=NULL)
size_t nr_
numbar of radii
Definition: GyotoXillverReflection.h:74
virtual double const * getGridIllumPhi() const
Get XillverReflection::phi_.
virtual double const * getGridReflFreq() const
Get XillverReflection::freq_.
double * logxi_
log of ionization param
Definition: GyotoXillverReflection.h:63
#define size_t
If not defined in <sys/types.h>.
Definition: GyotoConfig.h:387
virtual void getReflectionNaxes(size_t naxes[3]) const
Get XillverReflection::nnu_, XillverReflection::ni_, XillverReflection::nxi_.
size_t nxi_
Number of log(ionization param)
Definition: GyotoXillverReflection.h:68
size_t nnu_
Number of frequencies.
Definition: GyotoXillverReflection.h:66
double lampradius_
Coordinate radius at which the lamp is in Keplerian rotation.
Definition: GyotoXillverReflection.h:78
bool average_over_angle_
true to average over emission angle
Definition: GyotoXillverReflection.h:81
virtual void fitsWriteRefl(std::string filename)
Write parameters and arrays to FITS file.
double * incl_
emission angle
Definition: GyotoXillverReflection.h:64
Geometrically thin disks and rings.
Definition: GyotoThinDisk.h:68
virtual XillverReflection * clone() const
Cloner.
virtual void fitsWriteIllum(std::string filename)
Write parameters and arrays to FITS file.
virtual double const * getGridReflLogxi() const
Get XillverReflection::logxi_.
virtual double const * getGridIllumRadius() const
Get XillverReflection::radius_.
double * radius_
radii at which illumination is known
Definition: GyotoXillverReflection.h:72
Geometrically thin disks and rings.
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43
Pointers performing reference counting.
Definition: GyotoProperty.h:45
size_t nphi_
numbar of phi
Definition: GyotoXillverReflection.h:75
I might listen to a Teller.
Definition: GyotoHooks.h:64
virtual SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.
void setIllumination(double *pattern)
virtual double const * getGridReflIncl() const
Get XillverReflection::incl_.
double * phi_
azimuthal angle at which illumination is known
Definition: GyotoXillverReflection.h:73
void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const
Output a single Property to XML.
std::string filenameIllum_
FITS file containing the illumination pattern.
Definition: GyotoXillverReflection.h:54
double aa_
Spin of Kerr BH.
Definition: GyotoXillverReflection.h:77
void getIndicesIllum(size_t i[3], double const co[4]) const
Get illumination_ cell corresponding to position co[4].
virtual void tell(Gyoto::Hook::Teller *msg)
This is how a Teller tells.
double * freq_
frequencies vector
Definition: GyotoXillverReflection.h:65
void getIndicesRefl(size_t i[3], double const co[4], double logxi, double incl, double nu=0.) const
Get reflection_ cell corresponding to position co[4].
double * reflection_
Definition: GyotoXillverReflection.h:61