Gyoto
|
Access to astronomical objects. More...
Namespaces | |
namespace | 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 | PolishDoughnut |
A toroidal accretion structure. More... | |
class | Properties |
Observable properties of an Astronomical 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 opening angle between the BH spin axis and the disk surface, and its inner radius. 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... | |
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::Generic > | Subcontractor_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::Generic > | Subcontractor (FactoryMessenger *fmp, std::vector< std::string > const &plugin) |
A template for Subcontractor_t functions. More... | |
Gyoto::Astrobj::Subcontractor_t * | getSubcontractor (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::Entry * | Register_ |
The Astrobj register. More... | |
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:
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.
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" |
[in,out] | plugin | e.g. "stdplug". |
[in] | errmode | 1 to return NULL in case of failure instead of throwing an Error. |
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 |
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().
T | Gyoto::Astrobj::Generic sub-class |
|
extern |
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.