Gyoto
GyotoDirectionalDisk.h
Go to the documentation of this file.
1 
13 /*
14  Copyright 2014-2015 Frederic Vincent, Thibaut Paumard
15 
16  This file is part of Gyoto.
17 
18  Gyoto is free software: you can redistribute it and/or modify
19  it under the terms of the GNU General Public License as published by
20  the Free Software Foundation, either version 3 of the License, or
21  (at your option) any later version.
22 
23  Gyoto is distributed in the hope that it will be useful,
24  but WITHOUT ANY WARRANTY; without even the implied warranty of
25  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26  GNU General Public License for more details.
27 
28  You should have received a copy of the GNU General Public License
29  along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
30  */
31 
32 #ifndef __GyotoDirectionalDisk_H_
33 #define __GyotoDirectionalDisk_H_
34 
35 #include <iostream>
36 #include <fstream>
37 #include <iomanip>
38 
39 namespace Gyoto{
40  namespace Astrobj { class DirectionalDisk; }
41 }
42 
43 //#include <GyotoMetric.h>
44 #include <GyotoThinDisk.h>
45 
57  friend class Gyoto::SmartPointer<Gyoto::Astrobj::DirectionalDisk>;
58  private:
59  std::string filename_;
60 
65  double * emission_;
66 
67  double * radius_;
68  double * cosi_;
69  double * freq_;
70 
74 
76 
77 
78  // Constructors - Destructor
79  // -------------------------
80  public:
82  // fillProperty is overridden to remove leading "!" from FITS filename
83  void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const;
84 
85  DirectionalDisk();
86 
87  DirectionalDisk(const DirectionalDisk& ) ;
88  virtual DirectionalDisk* clone () const;
89 
90  virtual ~DirectionalDisk() ;
91 
92  // Accessors
93  // ---------
94  public:
95 
96  void file(std::string const &f);
97  std::string file() const ;
98  void averageOverAngle(bool t);
99  bool averageOverAngle()const;
100 
101 #ifdef GYOTO_USE_CFITSIO
102  virtual void fitsRead(std::string filename_);
104 
106  virtual void fitsWrite(std::string filename_);
107 #endif
108 
110 
117  void setEmission(double * pattern);
118 
119  void radius(double * pattern);
120 
133  virtual void copyIntensity(double const * const pattern = NULL,
134  size_t const naxes[3] = NULL);
135 
136  virtual double const * getIntensity() const;
137  virtual void getIntensityNaxes( size_t naxes[3] ) const ;
138 
139 
140  virtual void copyGridRadius(double const * const pattern = NULL,
141  size_t nr = 0 );
142  virtual double const * getGridRadius() const;
143  virtual void copyGridCosi(double const * const pattern = NULL,
144  size_t ni = 0 );
145  virtual double const * getGridCosi() const;
146  virtual void copyGridFreq(double const * const pattern = NULL,
147  size_t ni = 0 );
148  virtual double const * getGridFreq() const;
149 
150  protected:
151  void getIndices(size_t i[3], double const co[4], double cosi, double nu=0.) const ;
153 
154  public:
155  using ThinDisk::emission;
156  virtual double emission(double nu_em, double dsem,
157  double c_ph[8], double c_obj[8]=NULL) const;
158 
159 };
160 
161 #endif
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:83
Pointers performing reference counting.
Definition: GyotoProperty.h:41
virtual double const * getGridCosi() const
Get DirectionalDisk::cosi_.
size_t nnu_
Number of frequencies provided in DirectionalDisk::emission_.
Definition: GyotoDirectionalDisk.h:71
virtual double const * getGridFreq() const
Get DirectionalDisk::freq_.
virtual void copyIntensity(double const *const pattern=NULL, size_t const naxes[3]=NULL)
void getIndices(size_t i[3], double const co[4], double cosi, double nu=0.) const
Get emission_ cell corresponding to position co[4].
std::string filename_
Optional FITS file name containing the arrays.
Definition: GyotoDirectionalDisk.h:59
#define size_t
If not defined in .
Definition: GyotoConfig.h:357
size_t ni_
Number of direction cosine.
Definition: GyotoDirectionalDisk.h:72
virtual DirectionalDisk * clone() const
Cloner.
virtual void getIntensityNaxes(size_t naxes[3]) const
Get DirectionalDisk::nnu_, DirectionalDisk::ni_, and DirectionalDisk::nr_.
double * cosi_
Direction cosine vector.
Definition: GyotoDirectionalDisk.h:68
Geometrically thin disk read from FITS file.
Definition: GyotoDirectionalDisk.h:56
virtual double emission(double nu_em, double dsem, double c_ph[8], double c_obj[8]=NULL) const
Specific intensity Iν
virtual double const * getIntensity() const
Get DirectionalDisk::emission_.
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:65
void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const
Output a single Property to XML.
void setEmission(double *pattern)
Set DirectionalDisk::emission_.
double * freq_
Frequencies vector.
Definition: GyotoDirectionalDisk.h:69
size_t nr_
Number of radius values.
Definition: GyotoDirectionalDisk.h:73
double * radius_
Radius vector.
Definition: GyotoDirectionalDisk.h:67
bool average_over_angle_
true to average over emission angle
Definition: GyotoDirectionalDisk.h:75
virtual double const * getGridRadius() const
Get DirectionalDisk::radius_.