Gyoto
|
Observable properties of an Astronomical object. More...
#include <GyotoAstrobj.h>
Public Types | |
typedef Gyoto::SmartPointer< Gyoto::SmartPointee > | Subcontractor_t(Gyoto::FactoryMessenger *, std::vector< std::string > const &) |
A subcontractor builds an object upon order from the Factory. More... | |
Public Member Functions | |
Properties () | |
Default constructor (everything is set to NULL);. | |
Properties (double *, double *) | |
< Set intensity and time pointers. | |
void | init (size_t nbnuobs=0) |
Initialize observable quantities. More... | |
Properties & | operator++ () |
Increment pointers. More... | |
Properties & | operator+= (ptrdiff_t offset) |
Increment pointers by offset. More... | |
operator Gyoto::Quantity_t () const | |
void | intensityConverter (Gyoto::SmartPointer< Gyoto::Units::Converter >) |
Set Properties::intentity_converter_. | |
void | intensityConverter (std::string) |
Set Properties::intentity_converter_. | |
void | spectrumConverter (Gyoto::SmartPointer< Gyoto::Units::Converter >) |
Set Properties::spectrum_converter_. | |
void | spectrumConverter (std::string) |
Set Properties::spectrum_converter_. | |
void | binSpectrumConverter (Gyoto::SmartPointer< Gyoto::Units::Converter >) |
Set Properties::binspectrum_converter_. | |
void | binSpectrumConverter (std::string) |
Set Properties::binspectrum_converter_. | |
void | incRefCount () |
Increment the reference counter. Warning: Don't mess with the counter. | |
int | decRefCount () |
Decrement the reference counter and return current value. Warning: Don't mess with the counter. | |
int | getRefCount () |
Get the current number of references. | |
Public Attributes | |
double * | intensity |
GYOTO_QUANTITY_INTENSITY : Intensity. | |
double * | time |
GYOTO_QUANTITY_EMISSIONTIME: EmissionTime. | |
double * | distance |
GYOTO_QUANTITY_MIN_DISTANCE: MinDistance. More... | |
double * | first_dmin |
GYOTO_QUANTITY_FIRST_DMIN : FirstDmin. More... | |
int | first_dmin_found |
Whether Properties::first_dmin was found. More... | |
double * | redshift |
GYOTO_QUANTITY_REDSHIFT : RedShift. More... | |
double * | nbcrosseqplane |
GYOTO_QUANTITY_NBCROSSEQPLANE : nuùber of equatorial plane crossings. More... | |
double * | spectrum |
GYOTO_QUANTITY_SPECTRUM : Spectrum. More... | |
double * | stokesQ |
double * | stokesU |
double * | stokesV |
double * | binspectrum |
GYOTO_QUANTITY_BINSPECTRUM : BinSpectrum. More... | |
ptrdiff_t | offset |
How to jump from one spectral element to the next. More... | |
double * | impactcoords |
GYOTO_QUANTITY_IMPACTCOORDS: ImpactCoords. More... | |
double * | user1 |
GYOTO_QUANTITY_USER1 : User1 Astrobj-specific quantity. | |
double * | user2 |
GYOTO_QUANTITY_USER2 : User2 Astrobj-specific quantity. | |
double * | user3 |
GYOTO_QUANTITY_USER3 : User3 Astrobj-specific quantity. | |
double * | user4 |
GYOTO_QUANTITY_USER4 : User4 Astrobj-specific quantity. | |
double * | user5 |
GYOTO_QUANTITY_USER5 : User5 Astrobj-specific quantity. | |
Gyoto::SmartPointer< Gyoto::Units::Converter > | intensity_converter_ |
Converter between SI (J.m -2.s-1.sr-1.Hz-1) and requested Intensity unit. | |
Gyoto::SmartPointer< Gyoto::Units::Converter > | spectrum_converter_ |
Converter between SI (J.m -2.s-1.sr-1.Hz-1) and requested Spectrum unit. | |
Gyoto::SmartPointer< Gyoto::Units::Converter > | binspectrum_converter_ |
Converter between SI (J.m -2.s-1.sr-1) and requested BinSpectrum unit. | |
bool | alloc |
True if buffers are allocated for entire field (npix*npix) | |
Friends | |
class | Gyoto::SmartPointer< Gyoto::Astrobj::Properties > |
Observable properties of an Astronomical object.
The sort of properties one wants to measure on a ray-traced Gyoto::Photon which hits a Gyoto::Astrobj. Not all Astrobj are able to fill all of these properties.
An instance of Properties essentially contains a bunch of pointers to memory areas where the observable quantities (see Quantity_t) should be stored.
Astrobj::Generic::processHitQuantities() fills the various arrays upon request. A quantity is ignored if the corresponding pointer is NULL.
Scenery::operator()() increments the Properties between each Photon using Properties::operator++().
The main application (gyoto, the yorick plug-in, or your user application) is responsible for allocating the various arrays, filling the various members of Properties, and doing whatever meaninful with the arrays after they have been filled with values by the ray-tracing code (e.g. saving them to disk or displaying them).
Also see Gyoto::Scenery and Gyoto::Quantity_t.
|
inherited |
A subcontractor builds an object upon order from the Factory.
Various classes need to provide a subcontractor to be able to instantiate themselves upon order from the Factory. A subcontractor is a function (often a static member function) which accepts a pointer to a FactoryMessenger as unique parameter, communicates with the Factory using this messenger to read an XML description of the object to build, and returns this objet. SmartPointee::Subcontractor_t* is just generic enough a typedef to cast to and from other subcontractor types: Astrobj::Subcontractor_t, Metric::Subcontractor_t, Spectrum::Subcontractor_t. A subcontractor needs to be registered using the relevant Register() function: Astrobj::Register(), Metric::Register(), Spectrum::Register().
void Gyoto::Astrobj::Properties::init | ( | size_t | nbnuobs = 0 | ) |
Initialize observable quantities.
The pointed-to values are initialized as follows (if the corresponding pointer is not NULL):
Properties& Gyoto::Astrobj::Properties::operator++ | ( | ) |
Increment pointers.
All valid pointers are incremented by 1 (sizeof(double)), excepted impactcoords which is incremented by 16.
Properties& Gyoto::Astrobj::Properties::operator+= | ( | ptrdiff_t | offset | ) |
Increment pointers by offset.
All valid pointers are incremented by offset (sizeof(double)), excepted impactcoords which is incremented by 16*offset.
double* Gyoto::Astrobj::Properties::binspectrum |
GYOTO_QUANTITY_BINSPECTRUM : BinSpectrum.
Iν1ν2, the integral of Iν over each spectral channel (i.e. what a spectrometer would measure)
double* Gyoto::Astrobj::Properties::distance |
double* Gyoto::Astrobj::Properties::first_dmin |
GYOTO_QUANTITY_FIRST_DMIN : FirstDmin.
First local minimum in distance from object
int Gyoto::Astrobj::Properties::first_dmin_found |
Whether Properties::first_dmin was found.
Properties::first_dmin will be set to the first local minimum and Properties::first_dmin_found will be set to 1 if a local minimum in distance is found. Initialize it to 0.
double* Gyoto::Astrobj::Properties::impactcoords |
GYOTO_QUANTITY_IMPACTCOORDS: ImpactCoords.
Coordinates of the object and photon at impact
double* Gyoto::Astrobj::Properties::nbcrosseqplane |
GYOTO_QUANTITY_NBCROSSEQPLANE : nuùber of equatorial plane crossings.
Numbere of times the geodesic crosses the equatorial plane
ptrdiff_t Gyoto::Astrobj::Properties::offset |
How to jump from one spectral element to the next.
Spectra elements are separated by offset doubles in memory. In other words, the ith spectral element is spectrum[i*offset].
double* Gyoto::Astrobj::Properties::redshift |
GYOTO_QUANTITY_REDSHIFT : RedShift.
Redshift factor νobs/νem (necessary for emission lines computation)
double* Gyoto::Astrobj::Properties::spectrum |
GYOTO_QUANTITY_SPECTRUM : Spectrum.
Iν (ν) (observed specific intensity)