Gyoto
Namespaces | Classes | Typedefs | Functions | Variables
Gyoto::Astrobj Namespace Reference

Access to astronomical objects. More...

Namespaces

 Python
 Classes that wrap Python classes as Gyoto Astrobj implementations.
 

Classes

class  Blob
 Blob of plasma following a Star orbit, emitting synchrotron, with Gaussian time-evolving density and temperature. 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  FlaredDiskSynchrotron
 
class  Generic
 Base class for astronomical object. More...
 
class  InflateStar
 An Astrobj::Star with growing size. More...
 
class  Jet
 Simple jet model with thermal or kappa-distribution synchrotron emission from Pandya et al. (2016) 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  Plasmoid
 Plasmoid Shere of plasma emitting synchrotron, following a trajectory specified in getVelocity (non-geodesic a priori) More...
 
class  PolishDoughnut
 A toroidal accretion structure. More...
 
class  Properties
 Observable properties of an Astronomical object. More...
 
class  SphericalAccretion
 A spherically-symmetric accretion flow radially falling onto the central object. 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  ThickDisk
 A thick accretion disk described by its inner radius and the fwhm of the Gaussian factor affecting the density out of the equatorial plane. More...
 
class  ThinDisk
 Geometrically thin disks and rings. More...
 
class  ThinDiskGridIntensity
 
class  ThinDiskIronLine
 
class  ThinDiskPL
 Geometrically thin disk with black-body emission. More...
 
class  ThinDiskProfile
 A subclass of ThinDisk emitting according to some specified profile that should be hardcoded in emission() More...
 
class  Torus
 Optically thin or thick torus in circular rotation. More...
 
class  UniformSphere
 Optically thick or thin, spherical objects. More...
 
class  XillverReflection
 The illumination table specifies how the thin disk is illuminated while the reflection table deduces from that the reflected spectrum as computed by Javier Garcia's XILLVER code. More...
 

Typedefs

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

Functions

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

Variables

Gyoto::Register::EntryRegister_
 The Astrobj register. More...
 

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

◆ Subcontractor_t

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

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

◆ getSubcontractor()

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.

Parameters
[in]namee.g. "Star"
[in,out]plugine.g. "stdplug".
[in]errmode1 to return NULL in case of failure instead of throwing an Error.
Returns
pointer to the corresponding subcontractor.

◆ initRegister()

void Gyoto::Astrobj::initRegister ( )

Empty the Astrobj register.

This must be called once.

◆ Register()

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.

Parameters
nameThe kind name which identifies this object type in an XML file, as in <Astrobj kind="name">
scpA pointer to the subcontractor, which will communicate with the Gyoto::Factory to build an instance of the class from its XML description

◆ Subcontractor()

template<typename T >
SmartPointer<Astrobj::Generic> Gyoto::Astrobj::Subcontractor ( FactoryMessenger fmp,
std::vector< std::string > const &  plugin 
)

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
TGyoto::Astrobj::Generic sub-class

Variable Documentation

◆ Register_

Gyoto::Register::Entry* Gyoto::Astrobj::Register_

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.