Gyoto
GyotoNeutronStarModelAtmosphere.h
Go to the documentation of this file.
1 
9 /*
10  Copyright (c) 2017, 2018 Frederic Vincent, Thibaut Paumard
11  This file is part of Gyoto.
12 
13  Gyoto is free software: you can redistribute it and/or modify
14  it under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  Gyoto is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  GNU General Public License for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
25 */
26 
27 
28 #ifndef __GyotoNeutronStarModelAtmosphere_H_
29 #define __GyotoNeutronStarModelAtmosphere_H_
30 
31 #include <GyotoStandardAstrobj.h>
33 #include <GyotoNeutronStar.h>
34 
35 
36 namespace Gyoto{
37  namespace Astrobj { class NeutronStarModelAtmosphere; }
38 }
39 
48 
49  private:
50  std::string filename_;
51 
56  double * emission_;
57 
58  double * surfgrav_;
59  double * cosi_;
60  double * freq_;
61 
65 
67 
68  protected:
69 
70  public:
72  // fillProperty is overridden to remove leading "!" from FITS filename
73  void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const;
75  NeutronStarModelAtmosphere(const NeutronStarModelAtmosphere& o);
76  virtual NeutronStarModelAtmosphere * clone() const ;
77  virtual ~NeutronStarModelAtmosphere() ;
78 
79  public:
80 
81  void file(std::string const &f);
82  std::string file() const ;
83  void averageOverAngle(bool t);
84  bool averageOverAngle()const;
85 
86  #ifdef GYOTO_USE_CFITSIO
87  virtual void fitsRead(std::string filename_);
89 
91  virtual void fitsWrite(std::string filename_);
92 #endif
93 
101  void setEmission(double * pattern);
102 
103  void surfgrav(double * pattern);
104 
119  virtual void copyIntensity(double const * const pattern = NULL,
120  size_t const naxes[3] = NULL);
121 
122  virtual double const * getIntensity() const;
123  virtual void getIntensityNaxes( size_t naxes[3] ) const ;
124 
125  virtual void copyGridSurfgrav(double const * const pattern = NULL,
126  size_t nsg = 0 );
127  virtual double const * getGridSurfgrav() const;
128  virtual void copyGridCosi(double const * const pattern = NULL,
129  size_t ni = 0 );
130  virtual double const * getGridCosi() const;
131  virtual void copyGridFreq(double const * const pattern = NULL,
132  size_t ni = 0 );
133  virtual double const * getGridFreq() const;
134 
135  protected:
136  void getIndices(size_t i[3], double const co[4], double cosi, double nu=0.) const ;
138 
139  public:
140 
141  virtual double emission(double nu_em, double dsem,
142  state_t const &_ph, double const _obj[8]=NULL) const;
143 
144 };
145 
146 #endif
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
virtual double emission(double nu_em, double dsem, state_t const &_ph, double const _obj[8]=NULL) const
Specific intensity Iν
bool average_over_angle_
true to average over emission angle
Definition: GyotoNeutronStarModelAtmosphere.h:66
virtual double const * getIntensity() const
Get NeutronStarModelAtmosphere::emission_.
void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const
Output a single Property to XML.
virtual double const * getGridSurfgrav() const
Get NeutronStarModelAtmosphere::surfgrav_.
virtual void copyIntensity(double const *const pattern=NULL, size_t const naxes[3]=NULL)
Neutron star defined by its surface ; no emission.
virtual double const * getGridFreq() const
Get NeutronStarModelAtmosphere::freq_.
#define size_t
If not defined in <sys/types.h>.
Definition: GyotoConfig.h:387
virtual void getIntensityNaxes(size_t naxes[3]) const
Get NeutronStarModelAtmosphere::nnu_, NeutronStarModelAtmosphere::ni_, and NeutronStarModelAtmosphere...
virtual double const * getGridCosi() const
Get NeutronStarModelAtmosphere::cosi_.
void getIndices(size_t i[3], double const co[4], double cosi, double nu=0.) const
Get emission_ cell corresponding to position co[4].
size_t nnu_
Number of frequencies provided in NeutronStarModelAtmosphere::emission_.
Definition: GyotoNeutronStarModelAtmosphere.h:62
double * cosi_
Direction cosine vector.
Definition: GyotoNeutronStarModelAtmosphere.h:59
Astronomical objects defined bya a potential/distance.
Neutron star defined by its surface ; no emission.
Definition: GyotoNeutronStar.h:45
std::string filename_
Optional FITS file name containing the arrays.
Definition: GyotoNeutronStarModelAtmosphere.h:50
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43
virtual NeutronStarModelAtmosphere * clone() const
Cloner.
double * emission_
Iν(ν, surfgrav, cosi;)
Definition: GyotoNeutronStarModelAtmosphere.h:56
Pointers performing reference counting.
Definition: GyotoProperty.h:45
Base class for 3+1 numerical metrics computed by LORENE.
size_t nsg_
Number of surfgrav values.
Definition: GyotoNeutronStarModelAtmosphere.h:64
double * freq_
Frequencies vector.
Definition: GyotoNeutronStarModelAtmosphere.h:60
size_t ni_
Number of direction cosine.
Definition: GyotoNeutronStarModelAtmosphere.h:63
Neutron star emitting at its surface an emission provided by a FITS table.
Definition: GyotoNeutronStarModelAtmosphere.h:46
double * surfgrav_
Surface gravity vector.
Definition: GyotoNeutronStarModelAtmosphere.h:58