GyotoNeutronStarModelAtmosphere.h
Go to the documentation of this file.
/*
Copyright (c) 2017, 2018 Frederic Vincent, Thibaut Paumard
This file is part of Gyoto.
Gyoto is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gyoto is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GyotoNeutronStarModelAtmosphere_H_
#define __GyotoNeutronStarModelAtmosphere_H_
#include <GyotoStandardAstrobj.h>
#include <GyotoNumericalMetricLorene.h>
#include <GyotoNeutronStar.h>
namespace Gyoto{
namespace Astrobj { class NeutronStarModelAtmosphere; }
}
class Gyoto::Astrobj::NeutronStarModelAtmosphere : public Astrobj::NeutronStar {
friend class Gyoto::SmartPointer<Gyoto::Astrobj::NeutronStarModelAtmosphere>;
private:
std::string filename_;
double * emission_;
double * surfgrav_;
double * cosi_;
double * freq_;
size_t nnu_;
size_t ni_;
size_t nsg_;
bool average_over_angle_;
protected:
public:
GYOTO_OBJECT;
// fillProperty is overridden to remove leading "!" from FITS filename
void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const;
NeutronStarModelAtmosphere();
NeutronStarModelAtmosphere(const NeutronStarModelAtmosphere& o);
virtual NeutronStarModelAtmosphere * clone() const ;
virtual ~NeutronStarModelAtmosphere() ;
public:
void file(std::string const &f);
std::string file() const ;
void averageOverAngle(bool t);
bool averageOverAngle()const;
#ifdef GYOTO_USE_CFITSIO
virtual void fitsRead(std::string filename_);
virtual void fitsWrite(std::string filename_);
#endif
void setEmission(double * pattern);
void surfgrav(double * pattern);
virtual void copyIntensity(double const * const pattern = NULL,
size_t const naxes[3] = NULL);
virtual double const * getIntensity() const;
virtual void getIntensityNaxes( size_t naxes[3] ) const ;
virtual void copyGridSurfgrav(double const * const pattern = NULL,
size_t nsg = 0 );
virtual double const * getGridSurfgrav() const;
virtual void copyGridCosi(double const * const pattern = NULL,
size_t ni = 0 );
virtual double const * getGridCosi() const;
virtual void copyGridFreq(double const * const pattern = NULL,
size_t ni = 0 );
virtual double const * getGridFreq() const;
protected:
void getIndices(size_t i[3], double const co[4], double cosi, double nu=0.) const ;
public:
virtual double emission(double nu_em, double dsem,
state_t const &_ph, double const _obj[8]=NULL) const;
};
#endif
size_t
#define size_t
If not defined in <sys/types.h>.
Definition GyotoConfig.h:390
GyotoNeutronStar.h
Neutron star defined by its surface ; no emission.
GyotoNumericalMetricLorene.h
Base class for 3+1 numerical metrics computed by LORENE.
GYOTO_OBJECT
#define GYOTO_OBJECT
Declare class::properties and class::getProperties().
Definition GyotoObject.h:84
GyotoStandardAstrobj.h
Astronomical objects defined bya a potential/distance.
Gyoto::Astrobj::NeutronStar
Neutron star defined by its surface ; no emission.
Definition GyotoNeutronStar.h:45
Gyoto::Astrobj::NeutronStarModelAtmosphere
Neutron star emitting at its surface an emission provided by a FITS table.
Definition GyotoNeutronStarModelAtmosphere.h:46
Gyoto::Astrobj::NeutronStarModelAtmosphere::getGridFreq
virtual double const * getGridFreq() const
Get NeutronStarModelAtmosphere::freq_.
Gyoto::Astrobj::NeutronStarModelAtmosphere::getIntensityNaxes
virtual void getIntensityNaxes(size_t naxes[3]) const
Get NeutronStarModelAtmosphere::nnu_, NeutronStarModelAtmosphere::ni_, and NeutronStarModelAtmosphere...
Gyoto::Astrobj::NeutronStarModelAtmosphere::freq_
double * freq_
Frequencies vector.
Definition GyotoNeutronStarModelAtmosphere.h:60
Gyoto::Astrobj::NeutronStarModelAtmosphere::nnu_
size_t nnu_
Number of frequencies provided in NeutronStarModelAtmosphere::emission_.
Definition GyotoNeutronStarModelAtmosphere.h:62
Gyoto::Astrobj::NeutronStarModelAtmosphere::fitsWrite
virtual void fitsWrite(std::string filename_)
Write parameters and arrays to FITS file.
Gyoto::Astrobj::NeutronStarModelAtmosphere::emission
virtual double emission(double nu_em, double dsem, state_t const &_ph, double const _obj[8]=NULL) const
Specific intensity Iν.
Gyoto::Astrobj::NeutronStarModelAtmosphere::filename_
std::string filename_
Optional FITS file name containing the arrays.
Definition GyotoNeutronStarModelAtmosphere.h:50
Gyoto::Astrobj::NeutronStarModelAtmosphere::NeutronStarModelAtmosphere
NeutronStarModelAtmosphere()
Standard constructor.
Gyoto::Astrobj::NeutronStarModelAtmosphere::average_over_angle_
bool average_over_angle_
true to average over emission angle
Definition GyotoNeutronStarModelAtmosphere.h:66
Gyoto::Astrobj::NeutronStarModelAtmosphere::emission_
double * emission_
Iν(ν, surfgrav, cosi;).
Definition GyotoNeutronStarModelAtmosphere.h:56
Gyoto::Astrobj::NeutronStarModelAtmosphere::ni_
size_t ni_
Number of direction cosine.
Definition GyotoNeutronStarModelAtmosphere.h:63
Gyoto::Astrobj::NeutronStarModelAtmosphere::getGridCosi
virtual double const * getGridCosi() const
Get NeutronStarModelAtmosphere::cosi_.
Gyoto::Astrobj::NeutronStarModelAtmosphere::fillProperty
void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const
Output a single Property to XML.
Gyoto::Astrobj::NeutronStarModelAtmosphere::getIntensity
virtual double const * getIntensity() const
Get NeutronStarModelAtmosphere::emission_.
Gyoto::Astrobj::NeutronStarModelAtmosphere::fitsRead
virtual void fitsRead(std::string filename_)
Read parameters and arrays from FITS file.
Gyoto::Astrobj::NeutronStarModelAtmosphere::nsg_
size_t nsg_
Number of surfgrav values.
Definition GyotoNeutronStarModelAtmosphere.h:64
Gyoto::Astrobj::NeutronStarModelAtmosphere::clone
virtual NeutronStarModelAtmosphere * clone() const
Cloner.
Gyoto::Astrobj::NeutronStarModelAtmosphere::cosi_
double * cosi_
Direction cosine vector.
Definition GyotoNeutronStarModelAtmosphere.h:59
Gyoto::Astrobj::NeutronStarModelAtmosphere::getIndices
void getIndices(size_t i[3], double const co[4], double cosi, double nu=0.) const
Get emission_ cell corresponding to position co[4].
Gyoto::Astrobj::NeutronStarModelAtmosphere::copyIntensity
virtual void copyIntensity(double const *const pattern=NULL, size_t const naxes[3]=NULL)
Gyoto::Astrobj::NeutronStarModelAtmosphere::getGridSurfgrav
virtual double const * getGridSurfgrav() const
Get NeutronStarModelAtmosphere::surfgrav_.
Gyoto::Astrobj::NeutronStarModelAtmosphere::surfgrav_
double * surfgrav_
Surface gravity vector.
Definition GyotoNeutronStarModelAtmosphere.h:58
Gyoto::Astrobj::NeutronStarModelAtmosphere::setEmission
void setEmission(double *pattern)
Gyoto::SmartPointer
Pointers performing reference counting.
Definition GyotoSmartPointer.h:135
Gyoto::Astrobj
Access to astronomical objects.
Definition GyotoAstrobj.h:49
Gyoto
Namespace for the Gyoto library.
Definition GyotoAstrobj.h:44