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
36namespace 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_;
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
110 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
#define size_t
If not defined in <sys/types.h>.
Definition: GyotoConfig.h:390
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
Geometrically thin disks and rings.
virtual SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.
Geometrically thin disks and rings.
Definition: GyotoThinDisk.h:71
The illumination table specifies how the thin disk is illuminated while the reflection table deduces ...
Definition: GyotoXillverReflection.h:50
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].
size_t nr_
numbar of radii
Definition: GyotoXillverReflection.h:74
double * phi_
azimuthal angle at which illumination is known
Definition: GyotoXillverReflection.h:73
bool average_over_angle_
true to average over emission angle
Definition: GyotoXillverReflection.h:81
double * reflection_
Definition: GyotoXillverReflection.h:61
virtual double const * getGridReflIncl() const
Get XillverReflection::incl_.
virtual void copyIllumination(double const *const pattern=NULL, size_t const naxes[2]=NULL)
virtual double emission(double nu_em, double dsem, state_t const &_ph, double const _obj[8]=NULL) const
Specific intensity Iν
virtual SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.
size_t nnu_
Number of frequencies.
Definition: GyotoXillverReflection.h:66
std::string filenameIllum_
FITS file containing the illumination pattern.
Definition: GyotoXillverReflection.h:54
virtual double const * getGridIllumPhi() const
Get XillverReflection::phi_.
double * incl_
emission angle
Definition: GyotoXillverReflection.h:64
virtual XillverReflection * clone() const
Cloner.
size_t nphi_
numbar of phi
Definition: GyotoXillverReflection.h:75
double * logxi_
log of ionization param
Definition: GyotoXillverReflection.h:63
virtual double const * getGridIllumRadius() const
Get XillverReflection::radius_.
size_t nxi_
Number of log(ionization param)
Definition: GyotoXillverReflection.h:68
virtual void getIlluminationNaxes(size_t naxes[2]) const
Get XillverReflection::nr_, XillverReflection::nphi_.
double * freq_
frequencies vector
Definition: GyotoXillverReflection.h:65
virtual double const * getGridReflLogxi() const
Get XillverReflection::logxi_.
void setIllumination(double *pattern)
void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const
Output a single Property to XML.
double lampradius_
Coordinate radius at which the lamp is in Keplerian rotation.
Definition: GyotoXillverReflection.h:78
void getIndicesIllum(size_t i[3], double const co[4]) const
Get illumination_ cell corresponding to position co[4].
virtual void getReflectionNaxes(size_t naxes[3]) const
Get XillverReflection::nnu_, XillverReflection::ni_, XillverReflection::nxi_.
double * radius_
radii at which illumination is known
Definition: GyotoXillverReflection.h:72
virtual double const * getGridReflFreq() const
Get XillverReflection::freq_.
size_t ni_
Number of emission angles.
Definition: GyotoXillverReflection.h:67
double aa_
Spin of Kerr BH.
Definition: GyotoXillverReflection.h:77
double timelampphizero_
Time at which lamp is at phi=0.
Definition: GyotoXillverReflection.h:79
virtual void tell(Gyoto::Hook::Teller *msg)
This is how a Teller tells.
std::string filenameRefl_
FITS file containing the reflection pattern.
Definition: GyotoXillverReflection.h:55
I might listen to a Teller.
Definition: GyotoHooks.h:64
Pointers performing reference counting.
Definition: GyotoSmartPointer.h:135
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43