TransitLightCurve

class aspros.TransitLightCurve(times=None, fluxes=None, errors=None, quarters=None, name=None)[source]

Bases: aspros.LightCurve

Container for a single transit light curve. Subclass of LightCurve.

Parameters
timesndarray

Times in JD

fluxesndarray

Fluxes (normalized or not)

errorsndarray

Uncertainties on the fluxes

quartersndarray (optional)

Kepler Quarter for each flux

namestr

Name this light curve (optional)

Methods Summary

fit_linear_baseline(self, params[, cadence, …])

Find OOT portions of transit light curve using similar method to LightCurve.mask_out_of_transit, fit linear baseline to OOT.

fit_polynomial_baseline(self, params[, …])

Find OOT portions of transit light curve using similar method to LightCurve.mask_out_of_transit, fit linear baseline to OOT

from_dir(path)

Load light curve from numpy save files in path

remove_linear_baseline(self, params[, …])

Find OOT portions of transit light curve using similar method to LightCurve.mask_out_of_transit, fit linear baseline to OOT, divide whole light curve by that fit.

remove_polynomial_baseline(self, params[, …])

Find OOT portions of transit light curve using similar method to LightCurve.mask_out_of_transit, fit polynomial baseline to OOT, divide whole light curve by that fit.

scale_by_baseline(self, linear_baseline_params)

subtract_polynomial_baseline(self, params[, …])

Find OOT portions of transit light curve using similar method to LightCurve.mask_out_of_transit, fit polynomial baseline to OOT, subtract whole light curve by that fit.

Methods Documentation

fit_linear_baseline(self, params, cadence=<Quantity 1. min>, return_near_transit=False, plots=False)[source]

Find OOT portions of transit light curve using similar method to LightCurve.mask_out_of_transit, fit linear baseline to OOT.

Parameters
paramsTransitParams

Transit light curve parameters. Requires that params.duration is defined.

cadenceQuantity (optional)

Length of the exposure time for each flux. Default is 1 min.

return_near_transitbool (optional)

Return the mask for times in-transit.

Returns
linear_baselinenumpy.ndarray

Baseline trend of out-of-transit fluxes

near_transitnumpy.ndarray (optional)

The mask for times in-transit.

fit_polynomial_baseline(self, params, order=2, cadence=<Quantity 1. min>, plots=False, mask=None)[source]

Find OOT portions of transit light curve using similar method to LightCurve.mask_out_of_transit, fit linear baseline to OOT

classmethod from_dir(path)[source]

Load light curve from numpy save files in path

remove_linear_baseline(self, params, plots=False, cadence=<Quantity 1. min>)[source]

Find OOT portions of transit light curve using similar method to LightCurve.mask_out_of_transit, fit linear baseline to OOT, divide whole light curve by that fit.

Parameters
paramsTransitParams

Transit light curve parameters. Requires that params.duration is defined.

cadenceQuantity (optional)

Length of the exposure time for each flux. Default is 1 min.

plotsbool (optional)

Show diagnostic plots.

remove_polynomial_baseline(self, params, plots=False, order=2, cadence=<Quantity 1. min>)[source]

Find OOT portions of transit light curve using similar method to LightCurve.mask_out_of_transit, fit polynomial baseline to OOT, divide whole light curve by that fit.

scale_by_baseline(self, linear_baseline_params)[source]
subtract_polynomial_baseline(self, params, plots=False, order=2, cadence=<Quantity 1. min>)[source]

Find OOT portions of transit light curve using similar method to LightCurve.mask_out_of_transit, fit polynomial baseline to OOT, subtract whole light curve by that fit.