Gyoto::Astrobj Namespace Reference

Access to astronomical objects. More...


namespace  Python

Classes that wrap Python classes as Gyoto Astrobj implementations.


class  Generic
 Base class for astronomical object. More...
class  Properties
 Observable properties of an Astronomical object. More...
class  Complex
 Complex astronomical object. More...
class  DeformedTorus
class  DirectionalDisk
 Geometrically thin disk read from FITS file. More...
class  Disk3D
 Geometrically thick disk read from FITS file. More...
class  DynamicalDisk
 Geometrically thin disk read from a set of FITS files. More...
class  DynamicalDisk3D
 Geometrically thick optically thin disk read from a set of FITS files. More...
class  DynamicalDiskBolometric
 Geometrically thin disk read from a set of FITS files. More...
class  EquatorialHotSpot
class  FixedStar
 Fixed (i.e. non-moving) star (or spherical blob). More...
class  InflateStar
 An Astrobj::Star with growing size. More...
class  Jet
 Simple jet model from Zdziarski, Stawarz & Sikora (MNRAS,2017). More...
class  NeutronStar
 Neutron star defined by its surface ; no emission. More...
class  NeutronStarAnalyticEmission
 Neutron star emitting at its surface an analytic emission, typically blackbody. More...
class  NeutronStarModelAtmosphere
 Neutron star emitting at its surface an emission provided by a FITS table. More...
class  OscilTorus
class  PageThorneDisk
 Geometrically thin disk in Kerr metric. More...
class  PatternDisk
 Geometrically thin disk read from FITS file. More...
class  PatternDiskBB
 Geometrically thin disk read from FITS file with black body spectrum. More...
class  PolishDoughnut
 A toro├»dal accretion structure. More...
class  Standard
 Astronomical objects defined bya a potential/distance. More...
class  Star
 Mass-less, spherical object following a timelike geodesic. More...
class  StarTrace
 Like a Star that would be on all points of its orbit at all time. More...
class  ThinDisk
 Geometrically thin disks and rings. More...
class  ThinDiskIronLine
class  ThinDiskPL
 Geometrically thin disk with black-body emission. More...
class  Torus
 Optically thin or thick torus in circular rotation. More...
class  UniformSphere
 Optically thick or thin, spherical objects. More...


typedef SmartPointer
< Gyoto::Astrobj::Generic
Subcontractor_t (Gyoto::FactoryMessenger *, std::vector< std::string > const &)
 A function to build instances of a specific Astrobj::Generic sub-class.


template<typename T >
SmartPointer< Astrobj::GenericSubcontractor (FactoryMessenger *fmp, std::vector< std::string > const &plugin)
 A template for Subcontractor_t functions.
Gyoto::Astrobj::Subcontractor_tgetSubcontractor (std::string name, std::vector< std::string > &plugin, int errmode=0)
 Query the Astrobj register.
void initRegister ()
 Empty the Astrobj register.
void Register (std::string name, Gyoto::Astrobj::Subcontractor_t *scp)
 Make an Astrobj kind known to the Factory.


 The Astrobj register.

Detailed Description

Access to astronomical objects.

Objects which are supposed to be the target of the ray-tracing code should inherit from the Gyoto::Astrobj::Generic class.

When implementing a new object, you must:

In addition, you should make sure that your object plays nicely in the Yorick plug-in, which means:

There are basically two ways of making Generic::Impact() work: either by making the Astrobj a sub-class of the low-level Gyoto::Astrobj::Generic class ans providing your own Generic::Impact() function (which, in principle, should rely on Generic::processHitQuantities()), or by making the Astrobj a sub-class of the higher-level Gyoto::Astrobj::Standard class and implementing two lower level, simpler functions which are used by the Standard::Impact():

Generic::processHitQuantities() itself is an intermediate-level function which you may choose to reimplement. It uses three low-level, easy to implement functions:

To be usable, a Astrobj::Generic (or Astrobj::Standard) sub-classe should register an Astrobj::Subcontractor_t function using the Astrobj::Register() function. See also Writing plug-ins for Gyoto . If your clas implements setParameter() and/or, if necessary, setParameters(), registering it is normally done using the provided template:

 Astrobj::Register("MyKind", &(Astrobj::Subcontractor<Astrobj::MyKind>));

Typedef Documentation

A function to build instances of a specific Astrobj::Generic sub-class.

This is a more specific version of the SmartPointee::Subcontractor_t type. An Astrobj::Subcontrator_t is called by the Gyoto::Factory to build an instance of the kind of astronomical object specified in an XML file (see Register()). The Factory and Subcontractor_t function communicate through a Gyoto::FactoryMessenger. A template is provided so that you may not have to code anything.

Function Documentation

Gyoto::Astrobj::Subcontractor_t* Gyoto::Astrobj::getSubcontractor ( std::string  name,
std::vector< std::string > &  plugin,
int  errmode = 0 

Query the Astrobj register.

Query the Astrobj register to get the Astrobj::Subcontractor_t corresponding to a given kind name. This function is normally called only from the Factory. If plugin is specified, only a subcontractor matching both name and plugin will be returned, loading the plug-in if necessary. If plugin is the empty string, then the first subcontractor matching name will be returned, and the name of the plug-in it belongs to will be returned in plugin upon output.

[in] name e.g. "Star"
inout] plugin e.g. "stdplug".
[in] errmode 1 to return NULL in case of failure instead of throwing an Error.
pointer to the corresponding subcontractor.
void Gyoto::Astrobj::initRegister (  ) 

Empty the Astrobj register.

This must be called once.

void Gyoto::Astrobj::Register ( std::string  name,
Gyoto::Astrobj::Subcontractor_t scp 

Make an Astrobj kind known to the Factory.

Register a new Astrobj::Generic sub-class so that the Gyoto::Factory knows it.

name The kind name which identifies this object type in an XML file, as in <Astrobj kind="name">
scp A pointer to the subcontractor, which will communicate with the Gyoto::Factory to build an instance of the class from its XML description
template<typename T >
SmartPointer<Astrobj::Generic> Gyoto::Astrobj::Subcontractor ( FactoryMessenger *  fmp,
std::vector< std::string > const &  plugin 
) [inline]

A template for Subcontractor_t functions.

Instead of reimplementing the wheel, your subcontractor can simply be Gyoto::Astrobj::Subcontractor<MyKind>.

If MyKind accepts any XML parameters, it should re-implement Astrobj::Generic::setParameter() or, if low-level access to the FactoryMessenger is needed, Generic::setParameters().

Template Parameters:
T Gyoto::Astrobj::Generic sub-class

Variable Documentation

The Astrobj register.

Use the Astrobj::initRegister() once in your program to initiliaze it, the Astrobj::Register() function to fill it, and the Astrobj::getSubcontractor() function to query it.

Generated on 22 Jul 2017 for Gyoto by  doxygen 1.6.1