gefera.systems
Module Contents
- class gefera.systems.ConfocalSystem(o1, o2)
Represents a system with two bodies orbiting a central star.
- Parameters
o1 (PrimaryOrbit) – The orbit of the first body
o2 (ConfocalOrbit) – The orbit of the second body
- coords(self, t)
Get the coordinates of the two bodies.
- Parameters
t (array) – Times at which the coordinates should be computed.
- Returns
The cartesian coordinates of each body.
- Return type
tuple
- lightcurve(self, t, u1, u2, r1, r2, grad=False, integrate=None, dt=None)
Get the lightcurve resulting from a transit of the moon/planet system.
- Parameters
t (array) – Times at which the flux should be computed
r1 (float) – Radius of the body in the PrimaryOrbit
r2 (float) – Radius of the body in the SecondaryOrbit or ConfocalOrbit
u1 (float) – The first limb-darkening parameter
u2 (float) – The second limb-darkening parameter
grad (bool) – If True, compute the gradient of the lightcurve. Default is False.
- Returns
The lightcurve and, if grad=True, a dictionary containing the derivatives with respect to each parameter.
- Return type
array
- loglike(self, y, t, u1, u2, r1, r2, sigma, integrate=None, dt=None, grad=False)
Get the log-likelihood of the lightcurve with respect to a set of observations.
- Parameters
y (array) – A vector of observations to compute the likelihood with respect to.
t (array) – Times at which the flux should be computed
r1 (float) – Radius of the body in the PrimaryOrbit
r2 (float) – Radius of the body in the SecondaryOrbit or ConfocalOrbit
u1 (float) – The first limb-darkening parameter
u2 (float) – The second limb-darkening parameter
sigma (float) – The standard deviation of the model
- Returns
The natural logarithm of the likelihood
- Return type
float
- class gefera.systems.HierarchicalSystem(o1, o2)
Represents a system with a primary body orbiting a central star and a satellite orbiting the primary body.
- Parameters
o1 (PrimaryOrbit) – The orbit of the primary body around the central star
o2 (SatelliteOrbit) – The orbit of the satellite around the primary body.
- coords(self, t)
Get the coordinates of the two bodies.
- Parameters
t (array) – Times at which the coordinates should be computed.
- Returns
The cartesian coordinates of each body.
- Return type
tuple
- lightcurve(self, t, u1, u2, r1, r2, grad=False, integrate=None, dt=None)
Get the lightcurve resulting from a transit of the moon/planet system.
- Parameters
t (array) – Times at which the flux should be computed
r1 (float) – Radius of the body in the PrimaryOrbit
r2 (float) – Radius of the body in the SecondaryOrbit or ConfocalOrbit
u1 (float) – The first limb-darkening parameter
u2 (float) – The second limb-darkening parameter
grad (bool) – If True, compute the gradient of the lightcurve. Default is False.
- Returns
The lightcurve and, if grad=True, a dictionary containing the derivatives with respect to each parameter.
- Return type
array
- loglike(self, y, t, u1, u2, r1, r2, sigma, integrate=None, dt=None, grad=False)
Get the log-likelihood of the lightcurve with respect to a set of observations.
- Parameters
y (array) – A vector of observations to compute the likelihood with respect to.
t (array) – Times at which the flux should be computed
r1 (float) – Radius of the body in the PrimaryOrbit
r2 (float) – Radius of the body in the SecondaryOrbit or ConfocalOrbit
u1 (float) – The first limb-darkening parameter
u2 (float) – The second limb-darkening parameter
sigma (float) – The standard deviation of the model
- Returns
The natural logarithm of the likelihood
- Return type
float