Gyoto
GyotoThinDiskGridIntensity.h
Go to the documentation of this file.
1 
7 /*
8  Copyright 2019-2021 Frederic Vincent, Thibaut Paumard
9 
10  This file is part of Gyoto.
11 
12  Gyoto is free software: you can redistribute it and/or modify
13  it under the terms of the GNU General Public License as published by
14  the Free Software Foundation, either version 3 of the License, or
15  (at your option) any later version.
16 
17  Gyoto is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  GNU General Public License for more details.
21 
22  You should have received a copy of the GNU General Public License
23  along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
24  */
25 
26 #ifndef __GyotoThinDiskGridIntensity_H_
27 #define __GyotoThinDiskGridIntensity_H_
28 
29 #include <iostream>
30 #include <fstream>
31 #include <iomanip>
32 
33 namespace Gyoto{
34  namespace Astrobj { class ThinDiskGridIntensity; }
35  class GridData2D;
36 }
37 
38 #include <GyotoThinDisk.h>
39 #include <GyotoGridData2D.h>
40 
46 : public Astrobj::ThinDisk,
47  public GridData2D,
48  public Hook::Listener
49 {
51  private:
52  std::string filename_;
53 
58  double * intensity_;
59  double * time_array_;
60  double deltat_;
61 
62  public:
65 
66  // Constructors - Destructor
67  // -------------------------
69 
70  ThinDiskGridIntensity(const ThinDiskGridIntensity& ) ;
71  virtual ThinDiskGridIntensity* clone () const;
72 
73  virtual ~ThinDiskGridIntensity() ;
74 
75  // Accessors
76  // ---------
77  public:
78  void file(std::string const &f) ;
79  std::string file() const;
80  /*
81  timeTranslation shifts the value of GridData2D::tmin_ and tmax_,
82  allowing to scan the full simulation without having to change
83  the value of the Screen observation time (which is typically
84  not provided in M unit in the XML).
85  Choosing a negative timeTranslation, i.e. performing tmin_,tmax_-=dt,
86  amounts to increasing the Screen observation time by the same value,
87  tobs+=dt.
88 
89  */
90  void timeTranslation_inMunit(double const dt) ;
91  double timeTranslation_inMunit() const ;
92  //void dt(double dd);
93  void copyIntensity(double const *const intensity,
94  size_t const naxes[3]);
95  double const * getIntensity() const;
96  void copyTimeArray(double const *const time_array, size_t const ntimes);
97  double const * getTimeArray() const;
98  public:
99  using Generic::metric;
100  std::vector<size_t> fitsRead(std::string filename) ;
101  virtual double emission(double nu_em, double dsem,
102  state_t const &c_ph,double const c_obj[8]=NULL) const;
103  virtual void getVelocity(double const pos[4], double vel[4]) ;
104 
105 
106 
107 };
108 
109 #endif
double * intensity_
Intensity (ν, r, φ)
Definition: GyotoThinDiskGridIntensity.h:58
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
virtual ThinDiskGridIntensity * clone() const
Cloner.
#define GYOTO_OBJECT_THREAD_SAFETY
Declare virtual bool isThreadSafe() const.
Definition: GyotoObject.h:99
Definition: GyotoThinDiskGridIntensity.h:45
Class for reading data stored in a 2D grid.
Definition: GyotoGridData2D.h:51
Geometrically thin disks and rings.
Definition: GyotoThinDisk.h:68
virtual void getVelocity(double const pos[4], double vel[4])
Get fluid 4-velocity at point.
Geometrically thin disks and rings.
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43
std::string filename_
Optional FITS file name containing the arrays.
Definition: GyotoThinDiskGridIntensity.h:52
Pointers performing reference counting.
Definition: GyotoProperty.h:45
Base class for reading 2D gridded data.
I might listen to a Teller.
Definition: GyotoHooks.h:64
virtual SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.
virtual double emission(double nu_em, double dsem, state_t const &c_ph, double const c_obj[8]=NULL) const
Specific intensity Iν
double deltat_
1D Vector containing the times values of each time steps (dt not constant)
Definition: GyotoThinDiskGridIntensity.h:60