GyotoXillverReflection.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 __GyotoXillverReflection_H_
#define __GyotoXillverReflection_H_
#include <GyotoThinDisk.h>
namespace Gyoto{
namespace Astrobj { class XillverReflection; }
}
class Gyoto::Astrobj::XillverReflection
: public Astrobj::ThinDisk,
public Hook::Listener
{
friend class Gyoto::SmartPointer<Gyoto::Astrobj::XillverReflection>;
private:
std::string filenameIllum_;
std::string filenameRefl_;
double * reflection_;
double * logxi_;
double * incl_;
double * freq_;
size_t nnu_;
size_t ni_;
size_t nxi_;
double * illumination_;
double * radius_;
double * phi_;
size_t nr_;
size_t nphi_;
double aa_;
double lampradius_;
double timelampphizero_;
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;
XillverReflection();
XillverReflection(const XillverReflection& o);
virtual XillverReflection * clone() const ;
virtual ~XillverReflection() ;
public:
void timelampphizero(double tt);
double timelampphizero() const;
void lampradius(double rr);
double lampradius() const;
void fileillumination(std::string const &f);
std::string fileillumination() const ;
void filereflection(std::string const &f);
std::string filereflection() const ;
void averageOverAngle(bool t);
bool averageOverAngle()const;
#ifdef GYOTO_USE_CFITSIO
virtual void fitsReadIllum(std::string filename);
virtual void fitsWriteIllum(std::string filename);
virtual void fitsReadRefl(std::string filename);
virtual void fitsWriteRefl(std::string filename);
#endif
void setIllumination(double * pattern);
void setReflection(double * pattern);
virtual void copyIllumination(double const * const pattern = NULL,
size_t const naxes[2] = NULL);
virtual double const * getIllumination() const;
virtual void getIlluminationNaxes( size_t naxes[2] ) const ;
virtual void copyReflection(double const * const pattern = NULL,
size_t const naxes[3] = NULL);
virtual double const * getReflection() const;
virtual void getReflectionNaxes( size_t naxes[3] ) const ;
virtual void copyGridReflLogxi(double const * const pattern = NULL,
size_t nxi = 0 );
virtual double const * getGridReflLogxi() const;
virtual void copyGridReflIncl(double const * const pattern = NULL,
size_t ni = 0 );
virtual double const * getGridReflIncl() const;
virtual void copyGridReflFreq(double const * const pattern = NULL,
size_t nnu = 0 );
virtual double const * getGridReflFreq() const;
virtual void copyGridIllumRadius(double const * const pattern = NULL,
size_t nr = 0 );
virtual double const * getGridIllumRadius() const;
virtual void copyGridIllumPhi(double const * const pattern = NULL,
size_t nphi = 0 );
virtual double const * getGridIllumPhi() const;
protected:
void getIndicesRefl(size_t i[3], double const co[4], double logxi, double incl,
double nu=0.) const ;
void getIndicesIllum(size_t i[3], double const co[4]) const ;
public:
virtual double emission(double nu_em, double dsem,
state_t const &_ph, double const _obj[8]=NULL) const;
virtual void updateSpin() ;
virtual void tell(Gyoto::Hook::Teller *msg);
using Generic::metric;
virtual void metric(SmartPointer<Metric::Generic>);
};
#endif
size_t
#define size_t
If not defined in <sys/types.h>.
Definition GyotoConfig.h:390
GYOTO_OBJECT
#define GYOTO_OBJECT
Declare class::properties and class::getProperties().
Definition GyotoObject.h:84
GyotoThinDisk.h
Geometrically thin disks and rings.
Gyoto::Astrobj::Generic::metric
virtual SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.
Gyoto::Astrobj::ThinDisk
Geometrically thin disks and rings.
Definition GyotoThinDisk.h:71
Gyoto::Astrobj::XillverReflection
The illumination table specifies how the thin disk is illuminated while the reflection table deduces ...
Definition GyotoXillverReflection.h:50
Gyoto::Astrobj::XillverReflection::getIndicesRefl
void getIndicesRefl(size_t i[3], double const co[4], double logxi, double incl, double nu=0.) const
Get reflection_ cell corresponding to position co[4].
Gyoto::Astrobj::XillverReflection::nr_
size_t nr_
numbar of radii
Definition GyotoXillverReflection.h:74
Gyoto::Astrobj::XillverReflection::phi_
double * phi_
azimuthal angle at which illumination is known
Definition GyotoXillverReflection.h:73
Gyoto::Astrobj::XillverReflection::metric
virtual void metric(SmartPointer< Metric::Generic >)
Set the Metric gg_.
Gyoto::Astrobj::XillverReflection::average_over_angle_
bool average_over_angle_
true to average over emission angle
Definition GyotoXillverReflection.h:81
Gyoto::Astrobj::XillverReflection::reflection_
double * reflection_
Definition GyotoXillverReflection.h:61
Gyoto::Astrobj::XillverReflection::getGridReflIncl
virtual double const * getGridReflIncl() const
Get XillverReflection::incl_.
Gyoto::Astrobj::XillverReflection::copyIllumination
virtual void copyIllumination(double const *const pattern=NULL, size_t const naxes[2]=NULL)
Gyoto::Astrobj::XillverReflection::emission
virtual double emission(double nu_em, double dsem, state_t const &_ph, double const _obj[8]=NULL) const
Specific intensity Iν.
Gyoto::Astrobj::XillverReflection::fitsWriteRefl
virtual void fitsWriteRefl(std::string filename)
Write parameters and arrays to FITS file.
Gyoto::Astrobj::XillverReflection::nnu_
size_t nnu_
Number of frequencies.
Definition GyotoXillverReflection.h:66
Gyoto::Astrobj::XillverReflection::filenameIllum_
std::string filenameIllum_
FITS file containing the illumination pattern.
Definition GyotoXillverReflection.h:54
Gyoto::Astrobj::XillverReflection::getGridIllumPhi
virtual double const * getGridIllumPhi() const
Get XillverReflection::phi_.
Gyoto::Astrobj::XillverReflection::incl_
double * incl_
emission angle
Definition GyotoXillverReflection.h:64
Gyoto::Astrobj::XillverReflection::clone
virtual XillverReflection * clone() const
Cloner.
Gyoto::Astrobj::XillverReflection::nphi_
size_t nphi_
numbar of phi
Definition GyotoXillverReflection.h:75
Gyoto::Astrobj::XillverReflection::XillverReflection
XillverReflection()
Standard constructor.
Gyoto::Astrobj::XillverReflection::logxi_
double * logxi_
log of ionization param
Definition GyotoXillverReflection.h:63
Gyoto::Astrobj::XillverReflection::getGridIllumRadius
virtual double const * getGridIllumRadius() const
Get XillverReflection::radius_.
Gyoto::Astrobj::XillverReflection::nxi_
size_t nxi_
Number of log(ionization param).
Definition GyotoXillverReflection.h:68
Gyoto::Astrobj::XillverReflection::getIlluminationNaxes
virtual void getIlluminationNaxes(size_t naxes[2]) const
Get XillverReflection::nr_, XillverReflection::nphi_.
Gyoto::Astrobj::XillverReflection::freq_
double * freq_
frequencies vector
Definition GyotoXillverReflection.h:65
Gyoto::Astrobj::XillverReflection::getGridReflLogxi
virtual double const * getGridReflLogxi() const
Get XillverReflection::logxi_.
Gyoto::Astrobj::XillverReflection::setIllumination
void setIllumination(double *pattern)
Gyoto::Astrobj::XillverReflection::fillProperty
void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const
Output a single Property to XML.
Gyoto::Astrobj::XillverReflection::lampradius_
double lampradius_
Coordinate radius at which the lamp is in Keplerian rotation.
Definition GyotoXillverReflection.h:78
Gyoto::Astrobj::XillverReflection::fitsReadRefl
virtual void fitsReadRefl(std::string filename)
Read parameters and arrays from FITS file.
Gyoto::Astrobj::XillverReflection::getIndicesIllum
void getIndicesIllum(size_t i[3], double const co[4]) const
Get illumination_ cell corresponding to position co[4].
Gyoto::Astrobj::XillverReflection::getReflectionNaxes
virtual void getReflectionNaxes(size_t naxes[3]) const
Get XillverReflection::nnu_, XillverReflection::ni_, XillverReflection::nxi_.
Gyoto::Astrobj::XillverReflection::fitsReadIllum
virtual void fitsReadIllum(std::string filename)
Read parameters and arrays from FITS file.
Gyoto::Astrobj::XillverReflection::radius_
double * radius_
radii at which illumination is known
Definition GyotoXillverReflection.h:72
Gyoto::Astrobj::XillverReflection::getGridReflFreq
virtual double const * getGridReflFreq() const
Get XillverReflection::freq_.
Gyoto::Astrobj::XillverReflection::fitsWriteIllum
virtual void fitsWriteIllum(std::string filename)
Write parameters and arrays to FITS file.
Gyoto::Astrobj::XillverReflection::ni_
size_t ni_
Number of emission angles.
Definition GyotoXillverReflection.h:67
Gyoto::Astrobj::XillverReflection::aa_
double aa_
Spin of Kerr BH.
Definition GyotoXillverReflection.h:77
Gyoto::Astrobj::XillverReflection::timelampphizero_
double timelampphizero_
Time at which lamp is at phi=0.
Definition GyotoXillverReflection.h:79
Gyoto::Astrobj::XillverReflection::tell
virtual void tell(Gyoto::Hook::Teller *msg)
This is how a Teller tells.
Gyoto::Astrobj::XillverReflection::filenameRefl_
std::string filenameRefl_
FITS file containing the reflection pattern.
Definition GyotoXillverReflection.h:55
Gyoto::Hook::Listener
I might listen to a Teller.
Definition GyotoHooks.h:64
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