89 #ifndef __GyotoPython_H_ 90 #define __GyotoPython_H_ 222 virtual std::string
module()
const ;
233 virtual void module(
const std::string&);
246 virtual std::string
klass()
const ;
261 virtual void klass(
const std::string& c);
264 virtual std::vector<double>
parameters()
const;
271 virtual void parameters(
const std::vector<double>&);
343 virtual std::string
module() const ;
344 virtual void
module(const std::string&);
347 virtual std::string
klass() const ;
348 virtual void
klass(const std::string&);
349 virtual std::vector<double>
parameters() const;
350 virtual void
parameters(const std::vector<double>&);
352 virtual double operator()(double nu) const;
353 virtual double operator()(double nu, double opacity, double ds) const;
355 virtual double
integrate(double nu1, double nu2) ;
391 PyObject * pChristoffel_;
404 void spherical(bool);
405 bool spherical() const;
406 virtual std::string
module() const ;
407 virtual void
module(const std::string&);
410 virtual std::string
klass() const ;
411 virtual void
klass(const std::string&);
412 virtual std::vector<double>
parameters() const;
413 virtual void
parameters(const std::vector<double>&);
415 virtual void mass(double m);
418 void gmunu(double g[4][4], const double * x) const ;
419 int christoffel(double dst[4][4][4], const double * x) const ;
439 PyObject *pEmission_, *pIntegrateEmission_, *pTransmission_, *
pCall_,
440 *pGetVelocity_, *pGiveDelta_;
441 bool pEmission_overloaded_, pIntegrateEmission_overloaded_;
454 virtual double emission(double nu_em, double dsem, state_t const &coord_ph,
455 double const coord_obj[8]=NULL) const ;
457 virtual void emission(double Inu[], double const nu_em[], size_t nbnu,
458 double dsem, state_t const &coord_ph,
459 double const coord_obj[8]=NULL) const ;
461 virtual double integrateEmission(double nu1, double nu2, double dsem,
462 state_t const &c_ph, double const c_obj[8]=NULL) const;
464 virtual void integrateEmission(double * I, double const * boundaries,
465 size_t const * chaninds, size_t nbnu,
466 double dsem, state_t const &cph, double const *co) const;
468 virtual double transmission(double nuem, double dsem, state_t const &cph, double const *co) const ;
471 virtual double operator()(double const coord[4]) ;
472 virtual void getVelocity(double const pos[4], double vel[4]) ;
473 virtual double giveDelta(double coord[8]);
476 virtual std::string
module() const ;
477 virtual void
module(const std::string&);
480 virtual std::string
klass() const ;
481 virtual void
klass(const std::string&);
482 virtual std::vector<double>
parameters() const;
483 virtual void
parameters(const std::vector<double>&);
484 virtual double criticalValue() const ;
485 virtual void criticalValue(double) ;
505 PyObject *pEmission_, *pIntegrateEmission_, *pTransmission_, *
pCall_,
506 *pGetVelocity_, *pGiveDelta_;
507 bool pEmission_overloaded_, pIntegrateEmission_overloaded_;
520 virtual double emission(double nu_em, double dsem, state_t const &coord_ph,
521 double const coord_obj[8]=NULL) const ;
523 virtual void emission(double Inu[], double const nu_em[], size_t nbnu,
524 double dsem, state_t const &coord_ph,
525 double const coord_obj[8]=NULL) const ;
527 virtual double integrateEmission(double nu1, double nu2, double dsem,
528 state_t const &c_ph, double const c_obj[8]=NULL) const;
530 virtual void integrateEmission(double * I, double const * boundaries,
531 size_t const * chaninds, size_t nbnu,
532 double dsem, state_t const &cph, double const *co) const;
534 virtual double transmission(double nuem, double dsem, state_t const &cph ,double const *co) const ;
537 virtual double operator()(double const coord[4]) ;
538 virtual void getVelocity(double const pos[4], double vel[4]) ;
541 virtual std::string
module() const ;
542 virtual void
module(const std::string&);
545 virtual std::string
klass() const ;
546 virtual void
klass(const std::string&);
547 virtual std::vector<double>
parameters() const;
548 virtual void
parameters(const std::vector<double>&);
PyObject * pGyotoMetric()
Get reference to the Metric constructor in the gyoto Python extension.
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
virtual double integrate(double nu1, double nu2)
Integrate optically thick I_nu.
double mass() const
Get mass used in unitLength()
PyObject * pModule_
Reference to the python module once it has been loaded.
Definition: GyotoPython.h:210
std::string class_
Name of the Python class that we want to expose.
Definition: GyotoPython.h:196
PyObject * pGyotoThinDisk()
Get reference to the ThinDisk constructor in the gyoto Python extension.
void PyInstance_SetThis(PyObject *pInstance, PyObject *pNew, void *ptr)
Set "this" attribute in instance.
Base class for metrics.
Definition: GyotoMetric.h:158
#define GYOTO_OBJECT_THREAD_SAFETY
Declare virtual bool isThreadSafe() const.
Definition: GyotoObject.h:99
virtual std::string klass() const
Retrieve class_.
PyObject * pInstance_
Reference to the python instance once it has been instantiated.
Definition: GyotoPython.h:215
PyObject * pGyotoSpectrum()
Get reference to the Spectrum constructor in the gyoto Python extension.
std::string module_
Name of the Python module that holds the class.
Definition: GyotoPython.h:183
Astronomical objects defined bya a potential/distance.
PyObject * pCall_
Reference to ___call__.
Definition: GyotoPython.h:303
virtual std::string inlineModule() const
Return inline_module_.
std::string inline_module_
Python source code for module that holds the class.
Definition: GyotoPython.h:189
PyObject * PyImport_Gyoto()
Return refernce to the gyoto module, or NULL.
Base class for metric description.
virtual std::string module() const
Return module_.
Geometrically thin disks and rings.
Definition: GyotoThinDisk.h:68
Metric coded in Python.
Definition: GyotoPython.h:375
Coding a Gyoto::Astrobj::Standard in Python.
Definition: GyotoPython.h:432
virtual std::vector< double > parameters() const
Retrieve parameters_.
bool pCall_overloaded_
Whether call is overloaded.
Definition: GyotoPython.h:327
Geometrically thin disks and rings.
Spectrum of a simple object (e.g. Star)
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43
PyObject * pIntegrate_
Reference to the (optional) integrate method.
Definition: GyotoPython.h:308
PyObject * PyInstance_GetMethod(PyObject *pInstance, const char *name)
Return new reference to method, or NULL if method not found.
virtual Python * clone() const
Cloner.
Pointers performing reference counting.
Definition: GyotoProperty.h:45
Coding a Gyoto::Astrobj::ThinDisk in Python.
Definition: GyotoPython.h:498
virtual std::string inlineModule() const
Return inline_module_.
Spectrum emitted by an Astrobj.
Definition: GyotoSpectrum.h:134
Loader for Python classes implementing the Spectrum interface.
Definition: GyotoPython.h:290
virtual std::vector< double > parameters() const
Retrieve parameters_.
virtual std::string module() const
Return module_.
Astronomical objects defined bya a potential/distance.
Definition: GyotoStandardAstrobj.h:84
Base class for classes in the Python plug-in.
Definition: GyotoPython.h:175
virtual std::string klass() const
Retrieve class_.
PyObject * pGyotoStandardAstrobj()
Get reference to the StandardAstrobj constructor in the gyoto Python extension.
bool PyCallable_HasVarArg(PyObject *pMethod)
Check whether method accepts the varargs argument.
PyObject * PyModule_NewFromPythonCode(const char *code)
Create module from Python source code in a C string.
std::vector< double > parameters_
Parameters that this class needs.
Definition: GyotoPython.h:205