Gyoto
Namespaces | Classes | Functions
Gyoto Namespace Reference

Namespace for the Gyoto library. More...

Namespaces

namespace  Astrobj
 Access to astronomical objects.
namespace  Functor
 Classes with an operator() method.
namespace  Hook
 Listeners attach to Tellers.
namespace  Metric
 Access to metrics.
namespace  Register
 Gyoto registers.
namespace  Spectrometer
 Access to spectrometers.
namespace  Spectrum
 Spectrum of a simple object (e.g. a Gyoto::Astrobj::Star)
namespace  Units
 Units-related classes and functions.

Classes

class  Error
 Class for thowing exceptions. More...
class  Factory
 XML input/output. More...
class  FactoryMessenger
 Factory / SmartPointee::Subcontractor_t interface. More...
class  Photon
 A null geodesic transporting light. More...
class  Scenery
 Ray-tracing scene. More...
class  Screen
 The camera with which the Astrobj is observed. More...
class  SmartPointee
 Can be pointed to by a SmartPointer. More...
class  SmartPointer
 Pointers performing reference counting. More...
class  Worldline
 Timelike or null geodesics. More...

Typedefs

Observable quantities

Individual quantities are represented as a variable of this type. A combination of quantities is an ored list of Quantity_t, e.g.

To check wheter a given quantity is listed in a Quantity_t variable quant:

if (quant & GYOTOQUANTITY_EMISSION) ...

List of all possible Quantity_t individual values and the corresponding string (see Gyoto::Scenery) with corresponding XML name:

typedef unsigned int Quantity_t
 Type for observabke quantities.
Gyoto messages

Controling which messages are shown to the user

The user should be able to choose which messages are shown to her. In Gyoto, this is determined by a user-settable verbosity level (see Gyoto::verbose()) and a user-settable debug mode (see Goyto::debug()).

The following macros define various debug and verbosity level and provide short-cuts to display formatted messages only at a given verbosity level or in debug mode.

typedef unsigned int Verbosity_t
 Type for verbosity levels.
Coordinate system kind

GYOTO_COORDKIND_CARTESIAN or GYOTO_COORDKIND_SPHERICAL

Every Gyoto::Metric has a coordinate system kind. It can be used by functions which need to express coordinates always in spherical or always in Cartesian form, with trivial conversion between the two.

typedef unsigned int CoordKind_t
 Type for coordinate system kinds.

Functions

void throwError (std::string)
 Throw a Gyoto::Error.
void loadPlugin (char const *const plugname, int nofail=0)
 Load a plugin by name.
void debug (int mode)
 Set debug mode.
int debug ()
 Get debug mode.
void verbose (int mode)
 Set verbosity level.
int verbose ()
 Get verbosity level.
void convert (double *const x, const std::size_t nelem, const double mass_sun, const double distance_kpc, const std::string unit)
 Convert lengths (deprecated)

Detailed Description

Namespace for the Gyoto library.

Function Documentation

void Gyoto::convert ( double *const  x,
const std::size_t  nelem,
const double  mass_sun,
const double  distance_kpc,
const std::string  unit 
)

Convert lengths (deprecated)

Deprecated:
Will be removed once it is not used anymore in Gyoto per se. Prefer Gyoto::Units framework.
Parameters
[in,out]xLengths to convert, in geometrical units on input, in specified unit on output.
[in]nelemSize of x array.
[in]mass_sunBlack-hole mass in Solar masses.
[in]distance_kpcDistance from observer in kiloparsecs.
[in]unitOne of "geometrical", "m", "km", "sun radius", "rad", "degree", "arcmin", "arcsec", "mas", "uas".
void Gyoto::debug ( int  mode)

Set debug mode.

Parameters
mode1 to turn on debug mode, 0 to turn it off.
int Gyoto::debug ( )

Get debug mode.

Returns
>=1 if debug mode is on, else 0.
void Gyoto::loadPlugin ( char const *const  plugname,
int  nofail = 0 
)

Load a plugin by name.

Uses dlopen to load the file libgyoto-<plugname>.so, looks for the function __Gyoto<plugname>Init inside it and run it. Plug-ins must be located in the runtime link search path, or in GYOTO_PREFIX/lib/gyoto/, or in GYOTO_PREFIX/lib/gyoto/GYOTO_SOVERS/.

Parameters
plugnamePlug-in name.
nofailUnless nofail evals to true, the inability to find a plug-in or to run the initialization function inside it throws an Gyoto::Error.
void Gyoto::verbose ( int  mode)

Set verbosity level.

See standard verbosity levels defined in GyotoDefs.h:

  • GYOTO_DEFAULT_DEBUG_MODE
  • GYOTO_QUIET_VERBOSITY
  • GYOTO_SEVERE_VERBOSITY
  • GYOTO_WARNING_VERBOSITY
  • GYOTO_DEFAULT_VERBOSITY
  • GYOTO_INFO_VERBOSITY
  • GYOTO_DEBUG_VERBOSITY
int Gyoto::verbose ( )

Get verbosity level.

See verbose(int mode).