Public Types | Public Member Functions | Public Attributes | Friends | List of all members
Gyoto::Astrobj::Properties Class Reference

Observable properties of an Astronomical object. More...

#include <GyotoAstrobj.h>

Inheritance diagram for Gyoto::Astrobj::Properties:

Public Types

typedef Gyoto::SmartPointer< Gyoto::SmartPointeeSubcontractor_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...
Propertiesoperator++ ()
 Increment pointers. More...
Propertiesoperator+= (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
double * time
double * distance
double * first_dmin
int first_dmin_found
 Whether Properties::first_dmin was found. More...
double * redshift
double * nbcrosseqplane
 GYOTO_QUANTITY_NBCROSSEQPLANE : nuùber of equatorial plane crossings. More...
double * spectrum
double * stokesQ
double * stokesU
double * stokesV
double * binspectrum
ptrdiff_t offset
 How to jump from one spectral element to the next. More...
double * impactcoords
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::Converterintensity_converter_
 Converter between SI (J.m and requested Intensity unit.
Gyoto::SmartPointer< Gyoto::Units::Converterspectrum_converter_
 Converter between SI (J.m and requested Spectrum unit.
Gyoto::SmartPointer< Gyoto::Units::Converterbinspectrum_converter_
 Converter between SI (J.m and requested BinSpectrum unit.
bool alloc
 True if buffers are allocated for entire field (npix*npix)


class Gyoto::SmartPointer< Gyoto::Astrobj::Properties >

Detailed Description

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.

Member Typedef Documentation

◆ Subcontractor_t

typedef Gyoto::SmartPointer<Gyoto::SmartPointee> Gyoto::SmartPointee::Subcontractor_t(Gyoto::FactoryMessenger *, std::vector< std::string > const &)

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().

Member Function Documentation

◆ init()

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):

  • intensity, firt_dmin_found, redshift, userN: 0
  • time, distance, first_dmin: DBL_MAX
  • for spectrum and binspectrum, nbnuobs values separated by offset in memory are initialized to 0
  • for impactcoords, 16 contiguous values are initialized to DBL_MAX

◆ operator++()

Properties& Gyoto::Astrobj::Properties::operator++ ( )

Increment pointers.

All valid pointers are incremented by 1 (sizeof(double)), excepted impactcoords which is incremented by 16.

◆ operator+=()

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.

Member Data Documentation

◆ binspectrum

double* Gyoto::Astrobj::Properties::binspectrum


Iν1ν2, the integral of Iν over each spectral channel (i.e. what a spectrometer would measure)

◆ distance

double* Gyoto::Astrobj::Properties::distance


Behaves like the square of the closest distance between Photon and Astrobj (but not exactly that). Initialize it to DBL_MAX from float.h.;

◆ first_dmin

double* Gyoto::Astrobj::Properties::first_dmin


First local minimum in distance from object

◆ first_dmin_found

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.

◆ impactcoords

double* Gyoto::Astrobj::Properties::impactcoords


Coordinates of the object and photon at impact

◆ nbcrosseqplane

double* Gyoto::Astrobj::Properties::nbcrosseqplane

GYOTO_QUANTITY_NBCROSSEQPLANE : nuùber of equatorial plane crossings.

Numbere of times the geodesic crosses the equatorial plane

◆ offset

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].

◆ redshift

double* Gyoto::Astrobj::Properties::redshift


Redshift factor νobsem (necessary for emission lines computation)

◆ spectrum

double* Gyoto::Astrobj::Properties::spectrum


Iν (ν) (observed specific intensity)

The documentation for this class was generated from the following file: