Gyoto
GyotoDirectionalDisk.h
Go to the documentation of this file.
1 
19 /*
20  Copyright 2014-2015, 2018 Frederic Vincent, Thibaut Paumard
21 
22  This file is part of Gyoto.
23 
24  Gyoto is free software: you can redistribute it and/or modify
25  it under the terms of the GNU General Public License as published by
26  the Free Software Foundation, either version 3 of the License, or
27  (at your option) any later version.
28 
29  Gyoto is distributed in the hope that it will be useful,
30  but WITHOUT ANY WARRANTY; without even the implied warranty of
31  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32  GNU General Public License for more details.
33 
34  You should have received a copy of the GNU General Public License
35  along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
36  */
37 
38 #ifndef __GyotoDirectionalDisk_H_
39 #define __GyotoDirectionalDisk_H_
40 
41 #include <iostream>
42 #include <fstream>
43 #include <iomanip>
44 
45 namespace Gyoto{
46  namespace Astrobj { class DirectionalDisk; }
47 }
48 
49 //#include <GyotoMetric.h>
50 #include <GyotoThinDisk.h>
51 
64  private:
65  std::string filename_;
66 
71  double * emission_;
72 
73  double * radius_;
74  double * cosi_;
75  double * freq_;
76 
77  double lampaltitude_;
78 
82 
85 
88 
90 
91  // Constructors - Destructor
92  // -------------------------
93  public:
95  // fillProperty is overridden to remove leading "!" from FITS filename
96  void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const;
97 
98  using Generic::metric;
99  void metric(SmartPointer<Metric::Generic> gg);
100 
101  DirectionalDisk();
102 
103  DirectionalDisk(const DirectionalDisk& ) ;
104  virtual DirectionalDisk* clone () const;
105 
106  virtual ~DirectionalDisk() ;
107 
108  // Accessors
109  // ---------
110  public:
111 
112  void file(std::string const &f);
113  std::string file() const ;
114  void averageOverAngle(bool t);
115  bool averageOverAngle()const;
116  void lampaltitude(double zz);
117  double lampaltitude() const ;
118  void lampcutoffsinev(std::vector<double> const &v) ;
119  std::vector<double> lampcutoffsinev() const ;
120 
121 #ifdef GYOTO_USE_CFITSIO
122  virtual void fitsRead(std::string filename_);
124 
126  virtual void fitsWrite(std::string filename_);
127 #endif
128 
130 
137  void setEmission(double * pattern);
138 
139  void radius(double * pattern);
140 
153  virtual void copyIntensity(double const * const pattern = NULL,
154  size_t const naxes[3] = NULL);
155 
156  virtual double const * getIntensity() const;
157  virtual void getIntensityNaxes( size_t naxes[3] ) const ;
158 
159 
160  virtual void copyGridRadius(double const * const pattern = NULL,
161  size_t nr = 0 );
162  virtual double const * getGridRadius() const;
163  virtual void copyGridCosi(double const * const pattern = NULL,
164  size_t ni = 0 );
165  virtual double const * getGridCosi() const;
166  virtual void copyGridFreq(double const * const pattern = NULL,
167  size_t ni = 0 );
168  virtual double const * getGridFreq() const;
169 
170  protected:
171  void getIndices(size_t i[3], double const co[4], double cosi, double nu=0.) const ;
173 
174  public:
175  using ThinDisk::emission;
176  virtual double emission(double nu_em, double dsem,
177  state_t const &c_ph, double const c_obj[8]=NULL) const;
178 
179 };
180 
181 #endif
virtual double const * getGridFreq() const
Get DirectionalDisk::freq_.
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
double maxfreq_lampframe_
Maximum frequency emitted by the lamp.
Definition: GyotoDirectionalDisk.h:87
size_t nnu_
Number of frequencies provided in DirectionalDisk::emission_.
Definition: GyotoDirectionalDisk.h:79
virtual double const * getGridRadius() const
Get DirectionalDisk::radius_.
void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const
Output a single Property to XML.
virtual DirectionalDisk * clone() const
Cloner.
virtual void copyIntensity(double const *const pattern=NULL, size_t const naxes[3]=NULL)
double minfreq_lampframe_
Minimum frequency emitted by the lamp.
Definition: GyotoDirectionalDisk.h:86
std::string filename_
Optional FITS file name containing the arrays.
Definition: GyotoDirectionalDisk.h:65
virtual double const * getGridCosi() const
Get DirectionalDisk::cosi_.
double lampaltitude_
Lamp altitude (z coordinate) in M units.
Definition: GyotoDirectionalDisk.h:77
#define size_t
If not defined in <sys/types.h>.
Definition: GyotoConfig.h:387
size_t ni_
Number of direction cosine.
Definition: GyotoDirectionalDisk.h:80
void getIndices(size_t i[3], double const co[4], double cosi, double nu=0.) const
Get emission_ cell corresponding to position co[4].
virtual double emission(double nu_em, double dsem, state_t const &c_ph, double const c_obj[8]=NULL) const
Specific intensity Iν
virtual void getIntensityNaxes(size_t naxes[3]) const
Get DirectionalDisk::nnu_, DirectionalDisk::ni_, and DirectionalDisk::nr_.
double * cosi_
Direction cosine vector.
Definition: GyotoDirectionalDisk.h:74
Geometrically thin disk read from FITS file.
Definition: GyotoDirectionalDisk.h:62
Geometrically thin disks and rings.
Definition: GyotoThinDisk.h:68
Geometrically thin disks and rings.
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43
double * emission_
Iν(ν, r, cosi;)
Definition: GyotoDirectionalDisk.h:71
Pointers performing reference counting.
Definition: GyotoProperty.h:45
virtual SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.
double maxfreq_computed_
Maximum frequency computed by ATM21.
Definition: GyotoDirectionalDisk.h:84
void setEmission(double *pattern)
Set DirectionalDisk::emission_.
double * freq_
Frequencies vector.
Definition: GyotoDirectionalDisk.h:75
size_t nr_
Number of radius values.
Definition: GyotoDirectionalDisk.h:81
double * radius_
Radius vector.
Definition: GyotoDirectionalDisk.h:73
virtual double const * getIntensity() const
Get DirectionalDisk::emission_.
double minfreq_computed_
Minimum frequency computed by ATM21.
Definition: GyotoDirectionalDisk.h:83
bool average_over_angle_
true to average over emission angle
Definition: GyotoDirectionalDisk.h:89
virtual double emission(double nu_em, double dsem, state_t const &coord_ph, double const coord_obj[8]=NULL) const
Specific intensity Iν