GyotoDirectionalDisk.h
Go to the documentation of this file.
/*
Copyright 2014-2015, 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 __GyotoDirectionalDisk_H_
#define __GyotoDirectionalDisk_H_
#include <iostream>
#include <fstream>
#include <iomanip>
namespace Gyoto{
namespace Astrobj { class DirectionalDisk; }
}
//#include <GyotoMetric.h>
#include <GyotoThinDisk.h>
class Gyoto::Astrobj::DirectionalDisk : public Astrobj::ThinDisk {
friend class Gyoto::SmartPointer<Gyoto::Astrobj::DirectionalDisk>;
private:
std::string filename_;
double * emission_;
double * radius_;
double * cosi_;
double * freq_;
double lampaltitude_;
size_t nnu_;
size_t ni_;
size_t nr_;
double minfreq_computed_;
double maxfreq_computed_;
double minfreq_lampframe_;
double maxfreq_lampframe_;
bool average_over_angle_;
// Constructors - Destructor
// -------------------------
public:
GYOTO_OBJECT;
// fillProperty is overridden to remove leading "!" from FITS filename
void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const;
using Generic::metric;
void metric(SmartPointer<Metric::Generic> gg);
DirectionalDisk();
DirectionalDisk(const DirectionalDisk& ) ;
virtual DirectionalDisk* clone () const;
virtual ~DirectionalDisk() ;
// Accessors
// ---------
public:
void file(std::string const &f);
std::string file() const ;
void averageOverAngle(bool t);
bool averageOverAngle()const;
void lampaltitude(double zz);
double lampaltitude() const ;
void lampcutoffsinev(std::vector<double> const &v) ;
std::vector<double> lampcutoffsinev() const ;
#ifdef GYOTO_USE_CFITSIO
virtual void fitsRead(std::string filename_);
virtual void fitsWrite(std::string filename_);
#endif
void setEmission(double * pattern);
void radius(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 copyGridRadius(double const * const pattern = NULL,
size_t nr = 0 );
virtual double const * getGridRadius() 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:
using ThinDisk::emission;
virtual double emission(double nu_em, double dsem,
state_t const &c_ph, double const c_obj[8]=NULL) const;
};
#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::DirectionalDisk
Geometrically thin disk read from FITS file.
Definition GyotoDirectionalDisk.h:62
Gyoto::Astrobj::DirectionalDisk::minfreq_lampframe_
double minfreq_lampframe_
Minimum frequency emitted by the lamp.
Definition GyotoDirectionalDisk.h:86
Gyoto::Astrobj::DirectionalDisk::getIntensityNaxes
virtual void getIntensityNaxes(size_t naxes[3]) const
Get DirectionalDisk::nnu_, DirectionalDisk::ni_, and DirectionalDisk::nr_.
Gyoto::Astrobj::DirectionalDisk::minfreq_computed_
double minfreq_computed_
Minimum frequency computed by ATM21.
Definition GyotoDirectionalDisk.h:83
Gyoto::Astrobj::DirectionalDisk::maxfreq_lampframe_
double maxfreq_lampframe_
Maximum frequency emitted by the lamp.
Definition GyotoDirectionalDisk.h:87
Gyoto::Astrobj::DirectionalDisk::DirectionalDisk
DirectionalDisk()
Standard constructor.
Gyoto::Astrobj::DirectionalDisk::getGridFreq
virtual double const * getGridFreq() const
Get DirectionalDisk::freq_.
Gyoto::Astrobj::DirectionalDisk::getIntensity
virtual double const * getIntensity() const
Get DirectionalDisk::emission_.
Gyoto::Astrobj::DirectionalDisk::ni_
size_t ni_
Number of direction cosine.
Definition GyotoDirectionalDisk.h:80
Gyoto::Astrobj::DirectionalDisk::filename_
std::string filename_
Optional FITS file name containing the arrays.
Definition GyotoDirectionalDisk.h:65
Gyoto::Astrobj::DirectionalDisk::fitsRead
virtual void fitsRead(std::string filename_)
Read parameters and arrays from FITS file.
Gyoto::Astrobj::DirectionalDisk::maxfreq_computed_
double maxfreq_computed_
Maximum frequency computed by ATM21.
Definition GyotoDirectionalDisk.h:84
Gyoto::Astrobj::DirectionalDisk::fillProperty
void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const
Output a single Property to XML.
Gyoto::Astrobj::DirectionalDisk::getGridRadius
virtual double const * getGridRadius() const
Get DirectionalDisk::radius_.
Gyoto::Astrobj::DirectionalDisk::nr_
size_t nr_
Number of radius values.
Definition GyotoDirectionalDisk.h:81
Gyoto::Astrobj::DirectionalDisk::average_over_angle_
bool average_over_angle_
true to average over emission angle
Definition GyotoDirectionalDisk.h:89
Gyoto::Astrobj::DirectionalDisk::emission_
double * emission_
Iν(ν, r, cosi;).
Definition GyotoDirectionalDisk.h:71
Gyoto::Astrobj::DirectionalDisk::emission
virtual double emission(double nu_em, double dsem, state_t const &c_ph, double const c_obj[8]=NULL) const
Specific intensity Iν.
Gyoto::Astrobj::DirectionalDisk::setEmission
void setEmission(double *pattern)
Set DirectionalDisk::emission_.
Gyoto::Astrobj::DirectionalDisk::clone
virtual DirectionalDisk * clone() const
Cloner.
Gyoto::Astrobj::DirectionalDisk::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::DirectionalDisk::radius_
double * radius_
Radius vector.
Definition GyotoDirectionalDisk.h:73
Gyoto::Astrobj::DirectionalDisk::nnu_
size_t nnu_
Number of frequencies provided in DirectionalDisk::emission_.
Definition GyotoDirectionalDisk.h:79
Gyoto::Astrobj::DirectionalDisk::freq_
double * freq_
Frequencies vector.
Definition GyotoDirectionalDisk.h:75
Gyoto::Astrobj::DirectionalDisk::copyIntensity
virtual void copyIntensity(double const *const pattern=NULL, size_t const naxes[3]=NULL)
Gyoto::Astrobj::DirectionalDisk::metric
void metric(SmartPointer< Metric::Generic > gg)
Set the Metric gg_.
Gyoto::Astrobj::DirectionalDisk::cosi_
double * cosi_
Direction cosine vector.
Definition GyotoDirectionalDisk.h:74
Gyoto::Astrobj::DirectionalDisk::fitsWrite
virtual void fitsWrite(std::string filename_)
Write parameters and arrays to FITS file.
Gyoto::Astrobj::DirectionalDisk::lampaltitude_
double lampaltitude_
Lamp altitude (z coordinate) in M units.
Definition GyotoDirectionalDisk.h:77
Gyoto::Astrobj::DirectionalDisk::getGridCosi
virtual double const * getGridCosi() const
Get DirectionalDisk::cosi_.
Gyoto::Astrobj::Generic::metric
virtual SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.
Gyoto::Astrobj::Generic::emission
virtual double emission(double nu_em, double dsem, state_t const &coord_ph, double const coord_obj[8]=NULL) const
Specific intensity Iν.
Gyoto::Astrobj::ThinDisk
Geometrically thin disks and rings.
Definition GyotoThinDisk.h:71
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