LightCurve¶
-
class
salter.LightCurve(times=None, fluxes=None, errors=None, quarters=None, name=None, params=None)[source] [edit on github]¶ Bases:
objectContainer object for light curves.
Parameters: times :
ndarrayTimes in JD
fluxes :
ndarrayFluxes (normalized or not)
errors :
ndarrayUncertainties on the fluxes
quarters :
ndarray(optional)Kepler Quarter for each flux
name : str
Name this light curve (optional)
params :
TransitParamsPlanet transit parameters
Attributes Summary
times_jdGet the times in this light curve in JD. Methods Summary
delete_outliers()from_hdf5(kic)Load a light curve from the HDF5 light curve archive with KIC number kic.get_available_quarters()Get which quarters are available in this LightCurveget_quarter(quarter)Get a copy of the data from within LightCurveduring one Kepler quarter.get_transit_light_curves([plots])For a light curve with transits only (i.e. mask_in_transit([oot_duration_fraction])Mask out the in-transit light curve based on transit parameters mask_out_of_transit([oot_duration_fraction, …])Mask out the out-of-transit light curve based on transit parameters normalize_each_quarter([rename, …])Use polynomial fit to each quarter to normalize the data. phases()plot([transit_params, ax, quarter, show, …])Plot light curve. split_at_index(index)Split the light curve into two light curves, at indextransit_model([short_cadence])Attributes Documentation
Methods Documentation
-
delete_outliers()[source] [edit on github]¶
-
classmethod
from_hdf5(kic)[source] [edit on github]¶ Load a light curve from the HDF5 light curve archive with KIC number
kic.Parameters: kic: float
KIC number
-
get_available_quarters()[source] [edit on github]¶ Get which quarters are available in this
LightCurveReturns: qs : list
List of unique quarters available.
-
get_quarter(quarter)[source] [edit on github]¶ Get a copy of the data from within
LightCurveduring one Kepler quarter.Parameters: quarter : int
Kepler Quarter
Returns: lc :
LightCurveLight curve from one Kepler Quarter
-
get_transit_light_curves(plots=False)[source] [edit on github]¶ For a light curve with transits only (i.e. like one returned by
LightCurve.mask_out_of_transit), split up the transits into their own light curves, return a list ofTransitLightCurveobjects.Parameters: plots : bool
Make diagnostic plots.
Returns: transit_light_curves : list
List of
TransitLightCurveobjects
-
mask_in_transit(oot_duration_fraction=0.25)[source] [edit on github]¶ Mask out the in-transit light curve based on transit parameters
Parameters: oot_duration_fraction : float (optional)
Fluxes from what fraction of a transit duration of the out-of-transit light curve should be included in the mask?
Returns: d : dict
Inputs for a new
LightCurveobject with the mask applied.
-
mask_out_of_transit(oot_duration_fraction=0.25, flip=False)[source] [edit on github]¶ Mask out the out-of-transit light curve based on transit parameters
Parameters: oot_duration_fraction : float (optional)
Fluxes from what fraction of a transit duration of the out-of-transit light curve should be included in the mask?
flip : bool (optional)
If
True, mask in-transit rather than out-of-transit.Returns: d : dict
Inputs for a new
LightCurveobject with the mask applied.
-
normalize_each_quarter(rename=None, polynomial_order=2, plots=False)[source] [edit on github]¶ Use polynomial fit to each quarter to normalize the data.
Parameters: rename : str (optional)
New name of the light curve after normalization
polynomial_order : int (optional)
Order of polynomial to fit to the out-of-transit fluxes. Default is 2.
plots : bool (optional)
Show diagnostic plots after normalization.
-
phases()[source] [edit on github]¶
-
plot(transit_params=None, ax=None, quarter=None, show=True, phase=False, plot_kwargs={u'color': u'b', u'lw': 0, u'marker': u'o'})[source] [edit on github]¶ Plot light curve.
Parameters: transit_params :
TransitParams(optional)Transit light curve parameters. Required if
phaseisTrue.ax :
Axes(optional)Axis to make plot on top of
quarter : float (optional)
Plot only this Kepler quarter
show : bool
If
True, callmatplotlib.pyplot.showafter plot is madephase : bool
If
True, map times in JD to orbital phases, which requires thattransit_paramsbe input also.plot_kwargs : dict
Keyword arguments to pass to
matplotlibcalls.
-
split_at_index(index)[source] [edit on github]¶ Split the light curve into two light curves, at
index
-
transit_model(short_cadence=False)[source] [edit on github]¶
-