exoctk.lightcurve_fitting package¶
Submodules¶
exoctk.lightcurve_fitting.fitters module¶
Functions used to fit models to light curve data
Author: Joe Filippazzo Email: jfilippazzo@stsci.edu
-
exoctk.lightcurve_fitting.fitters.
lmfitter
(time, data, model, uncertainty=None, verbose=True, **kwargs)[source]¶ Use lmfit
- Parameters
- data: sequence
The observational data
- model: ExoCTK.lightcurve_fitting.models.Model
The model to fit
- uncertainty: np.ndarray (optional)
The uncertainty on the (same shape) data
- method: str
The name of the method to use
- name: str
A name for the best fit model
- verbose: bool
Print some stuff
- Returns
- lmfit.Model.fit.fit_report
The results of the fit
exoctk.lightcurve_fitting.lightcurve module¶
Base and child classes to handle light curve fitting
Author: Joe Filippazzo Email: jfilippazzo@stsci.edu
-
class
exoctk.lightcurve_fitting.lightcurve.
LightCurve
(time, flux, unc=None, parameters=None, units='MJD', name='My Light Curve')[source]¶ Bases:
exoctk.lightcurve_fitting.models.Model
A class to store the actual light curve
- Parameters
- time: sequence
The time axis in days, [MJD or BJD]
- flux: sequence
The flux in electrons (not ADU)
- unc: sequence
The uncertainty on the flux
- parameters: str, object (optional)
The orbital parameters of the star/planet system, may be a path to a JSON file or a parameter object
- units: str
The time units
- name: str
A name for the object
-
fit
(model, fitter='lmfit', **kwargs)[source]¶ Fit the model to the lightcurve
- Parameters
- model: ExoCTK.lightcurve_fitter.models.Model
The model to fit to the data
- fitter: str
The name of the fitter to use
exoctk.lightcurve_fitting.models module¶
Base and child classes to handle models used to fit light curves
Author: Joe Filippazzo Email: jfilippazzo@stsci.edu
-
class
exoctk.lightcurve_fitting.models.
CompositeModel
(models, **kwargs)[source]¶ Bases:
exoctk.lightcurve_fitting.models.Model
A class to create composite models
Initialize the composite model
- Parameters
- models: sequence
The list of models
-
class
exoctk.lightcurve_fitting.models.
Model
(**kwargs)[source]¶ Bases:
object
Create a model instance
-
property
flux
¶ A getter for the flux
-
interp
(new_time)[source]¶ Interpolate the flux to a new time axis
- Parameters
- new_time: sequence, astropy.units.quantity.Quantity
The time array
-
property
parameters
¶ A getter for the parameters
-
plot
(time, components=False, fig=None, draw=False, color='blue', **kwargs)[source]¶ Plot the model
- Parameters
- time: array-like
The time axis to use
- components: bool
Plot all model components
- fig: bokeh.plotting.figure (optional)
The figure to plot on
- Returns
- bokeh.plotting.figure
The figure
-
property
time
¶ A getter for the time
-
property
units
¶ A getter for the units
-
property
-
class
exoctk.lightcurve_fitting.models.
PolynomialModel
(**kwargs)[source]¶ Bases:
exoctk.lightcurve_fitting.models.Model
Polynomial Model
Initialize the polynomial model
-
class
exoctk.lightcurve_fitting.models.
TransitModel
(**kwargs)[source]¶ Bases:
exoctk.lightcurve_fitting.models.Model
Transit Model
Initialize the transit model
exoctk.lightcurve_fitting.parameters module¶
Base and child classes to handle orbital parameters
Author: Joe Filippazzo Email: jfilippazzo@stsci.edu
-
class
exoctk.lightcurve_fitting.parameters.
Parameter
(name, value, ptype='free', mn=None, mx=None)[source]¶ Bases:
object
A generic parameter class
Instantiate a Parameter with a name and value at least
- Parameters
- name: str
The name of the parameter
- value: float, int, str, list, tuple
The value of the parameter
- ptype: str
Parameter type, [‘free’,’fixed’,’independent’]
- mn: float, int, str, list, tuple (optioal)
The minimum value
- mx: float, int, str, list, tuple (optioal)
The maximim value
-
property
ptype
¶ Getter for the ptype
-
property
values
¶ Return all values for this parameter
Module contents¶
Package to fit models to light curve data