CheopsLightCurve¶
-
class
linea.
CheopsLightCurve
(record_array={}, extra_basis_vectors=None, time=None, mask=None, norm=True)[source] [edit on github]¶ Bases:
object
Data handling class for CHEOPS light curves.
- Parameters
- record_array
recarray
Record array of column vectors and their labels (names). Often this record array comes straight from a FITS file.
- hk_record_array
recarray
Record array of column vectors and their labels from the housekeeping FITS file which often ends in “SCI_CAL_SubArray_*.fits”. Often this record array comes straight from a FITS file.
- normbool
Normalize the fluxes such that the median flux is unity. Default is True.
- record_array
Methods Summary
design_matrix
([norm])Generate the design matrix.
from_example
([norm])Load example 55 Cnc e light curve (NOTE: this is not real data).
from_fits
(path[, extra_basis_vectors, norm])Load a FITS file from DACE or the DRP.
phase
(planet_params)Orbital phase of planet at times
lc.bjd_time
.plot
([ax])Plot the light curve.
plot_phase_curve
(r, params, t_fine, …[, …])Plot the best-fit phase curve.
regress
(design_matrix)Regress the design matrix against the fluxes.
sigma_clip_centroid
([sigma, plot])Sigma-clip the light curve on centroid position (update mask).
sigma_clip_flux
([sigma_upper, sigma_lower, …])Sigma-clip the light curve on fluxes (update mask).
Methods Documentation
-
design_matrix
(norm=True)[source] [edit on github]¶ Generate the design matrix.
- Parameters
- normbool
Normalize the column vectors within the design matrix such that they have mean=zero and range=unity.
- Returns
- X
ndarray
Design matrix (concatenated column vectors of observables)
- X
-
classmethod
from_example
(norm=True)[source] [edit on github]¶ Load example 55 Cnc e light curve (NOTE: this is not real data).
- Parameters
- normbool
Normalize the fluxes such that the median flux is unity. Default is True.
-
classmethod
from_fits
(path, extra_basis_vectors=None, norm=True)[source] [edit on github]¶ Load a FITS file from DACE or the DRP.
- Parameters
- pathstr
Path to the FITS file containing the data to load.
- extra_basis_vectors
ndarray
Extra basis vectors to add to the design matrix.
- normbool
Normalize the fluxes such that the median flux is unity. Default is True.
-
phase
(planet_params)[source] [edit on github]¶ Orbital phase of planet at times
lc.bjd_time
.
-
plot
(ax=None, **kwargs)[source] [edit on github]¶ Plot the light curve.
-
plot_phase_curve
(r, params, t_fine, transit_fine, sinusoid_fine, t0_offset=0, n_regressors=2, bins=15)[source] [edit on github]¶ Plot the best-fit phase curve.
- Parameters
- r
RegressionResult
Result of the linear regression
- params
Planet
Transiting exoplanet parameters
- t_fine
ndarray
Times computed on a grid finer than the original observations
- transit_fine
ndarray
Transit model computed at times
t_fine
- sinusoid_fine
ndarray
Sinusoidal phase curve model computed at times
t_fine
- t0_offsetfloat, optional
Time offset between the mid-transit time defined by
params
and the true mid-transit time [days]. Default is zero.- n_regressorsint, optional
Number of regressors used to parameterize the phase curve. Default is two.
- binsint, optional
Number of bins to break the light curve into when plotting (black), default is 15.
- r
- Returns
-
regress
(design_matrix)[source] [edit on github]¶ Regress the design matrix against the fluxes.
-
sigma_clip_centroid
(sigma=3.5, plot=False)[source] [edit on github]¶ Sigma-clip the light curve on centroid position (update mask).
- Parameters
- sigmafloat
Factor of standard deviations away from the median centroid position to clip on.
- plotbool
Plot the accepted centroids (in black) and the centroids of the rejected fluxes (in red).
-
sigma_clip_flux
(sigma_upper=4, sigma_lower=4, maxiters=None, plot=False)[source] [edit on github]¶ Sigma-clip the light curve on fluxes (update mask).
- Parameters
- sigma_upperfloat
Factor of standard deviations above the median centroid position to clip on.
- sigma_lowerfloat
Factor of standard deviations below the median centroid position to clip on.
- maxitersfloat or None
Number of sigma-clipping iterations. Default is None, which repeats until there are no outliers left.
- plotfloat
Plot the accepted fluxes (in black) and the rejected fluxes (in red)