Transit modeling¶
- class gerbls.LDModel(b=0.0, mag0=1.0, P=0.0, r=0.0, t0=0.0, target=None)[source]¶
Transit model with quadratic limb darkening. The parameters below are stored as public properties; for example,
LDModel.bretrieves the currently stored impact parameter value. Useprint(LDModel)for an overview of all stored parameters.- Parameters:
b (float, optional) – Impact parameter, by default 0.
mag0 (float, optional) – Out-of-transit flux, by default 1.
P (float, optional) – Orbital period, by default 0.
r (float, optional) – Planet-to-star radius ratio, by default 0.
t0 (float, optional) – Time of mid-transit, by default 0.
target (Optional[gerbls.pyTarget], optional) – Data structure containing stellar parameters, by default None
- eval(time)[source]¶
Evaluate the model flux at a given array of input times.
- Parameters:
time (npt.ArrayLike) – Input times.
- Return type:
- fit(phot, u_fixed=False)[source]¶
Fit a limb-darkened model to the data. Currently stored parameter values are used as initial guesses for the solution. The fitting is done using
scipy.optimize.curve_fit.- Parameters:
phot (gerbls.pyDataContainer) – Input data.
u_fixed (bool, optional) – Whether to keep the limb darkening parameters fixed, by default False. If True, values for
u1and/oru2must be set.
- Return type:
None
- Raises:
ValueError – Raises an error if
u_fixed == Truebutu1andu2have not been set.
- classmethod from_BLS(bls, target=None)[source]¶
Set up a limb-darkened model from a BLS result.
- Parameters:
bls (gerbls.pyBLSResult) – BLS result.
target (Optional[gerbls.pyTarget], optional) – Data structure containing stellar parameters, by default None
- Return type:
- static get_chi2_const(phot)¶
Calculate the chi-squared parameter of a constant-flux fit to the data (no transit).
- Parameters:
phot (gerbls.pyDataContainer) – Input data.
- Return type: