CONAN._classes.load_lightcurves#
- class CONAN._classes.load_lightcurves(file_list=None, data_filepath=None, input_lc=None, filters=None, wl=None, nplanet=1, sort=False, verbose=True, show_guide=False, lamdas=None)#
lightcurve object to hold lightcurves for analysis
- Parameters:
file_list (list;) – List of filenames for the lightcurves. Files must have 9 columns: time,flux,err,xc,xc,xc,xc,xc,xc. where xc are columns that can be used in decorrelating the flux. Arrays of zeroes are put in xc if file contains less than 9 columns.
data_filepath (str;) – Filepath where lightcurves files are located. Default is None which implies the data is in the current working directory.
input_lc (dict;) – dictionary of input lightcurves. If provided, it overrides the file_list and data_filepath parameters. Each key is the name of the lightcurve and the value is a numpy array with the lightcurve data. The array must be of shape (N,M) where N is the number of data points and M is the number of columns (>=3).
filter (list, str, None;) – filter for each lightcurve in file_list. if a str is given, it is used for all lightcurves, if None, the default of “V” is used for all.
wl (list, int, float, None;) – central wavelength in microns for each lightcurve in file_list. This is only used for plotting transit depth or occultation depth variation as a function of wl. If int or float is given, it is used for all lightcurves. If None, the default of 0.6 is used for all if same filter, or unique random value per filter.
nplanet (int;) – number of planets in the system. Default is 1.
sort (bool;) – if True, sorts the lightcurves based on the median time. Default is False.
verbose (bool;) – if True, prints out information about the lightcurves. Default is True.
- Returns:
lc_obj
- Return type:
light curve object
- _obj_type#
type of object created.
- Type:
str;
- _nplanet#
number of planets in the system.
- Type:
int;
- _fpath#
filepath where lightcurves files are located.
- Type:
str;
- _names#
list of filenames for the lightcurves.
- Type:
list;
- _nphot#
number of lightcurves.
- Type:
int;
- _filters#
list of filters for each lightcurve.
- Type:
list;
- _wl#
list of central wavelengths for each lightcurve.
- Type:
list;
- _filter_shortcuts#
dictionary of filter shortcuts.
- Type:
dict;
- _filnames#
list of unique filters.
- Type:
list;
- _input_lc#
dictionary of the input lightcurves.
- Type:
dict;
- _rms_estimate#
list of rms estimates for each lightcurve.
- Type:
list;
- _jitt_estimate#
list of jitter estimates for each lightcurve.
- Type:
list;
Examples
>>> lc_obj = load_lightcurves(file_list = ["lc1.dat","lc2.dat"], >>> filters = ["V","I"], >>> wl = [0.6,0.8] )
- _bases_init#
- _clipped_data#
- _detrended = False#
- _filnames#
- _filter_shortcuts#
- _fpath#
- _input_lc#
- _masked_points = False#
- _nphot#
- _nplanet = 1#
- _obj_type = 'lc_obj'#
- _rescaled_data#
- _show_guide = False#
Methods#
|
Define GP hyperparameters for each lc. The first hyperparameter h1 is amplitude (standard deviation) |
|
Define custom model to be combined with or to replace the light-curve model. This must be |
|
Add sinusoid to fit correlation along a column of the data. This fits a sinusoid to the |
|
add spline to fit correlation along 1 or 2 columns of the data. This splits the data at the defined knots interval and fits a polynomial of defined degree to each section. |
|
Remove outliers using a running median method. Points > clip*M.A.D are removed |
|
add contamination factor for each unique filter defined in |
|
detrend data using total trend model determined from get_decorr(). Note that this does not inflate the flux errors to account for the uncertainties in the detrend model |
|
get Kipping quadratic limb darkening parameters (q1,q2) using ldtk (requires internet connection). |
|
Function to obtain best decorrelation parameters for each light-curve file using the |
|
Define baseline model parameters to fit for each light curve using the columns of the input data. dcol0 refers to decorrelation setup for column 0, dcol3 for column 3 and so on. |
|
Setup Kipping quadratic limb darkening LD coefficient (q1, q2) for transit light curves. |
|
Function to mask points in the lightcurves based on a condition. These points are removed from the injested data |
|
Setup phase curve parameters for each unique filter in loaded lightcurve. |
|
Define parameters and priors of model parameters. By default, the parameters are fixed to |
|
visualize data |
|
Print out all input configuration (or particular section) for the light curve object. |
|
Function to rescale the data columns of the lightcurves. This can be important when |
|
Save each of the loaded light curves to a .dat file |
|
Supersample long intergration time of lcs in lc_list. This divides each exposure of the lc into int(ss_factor) subexposures to attain a sampling rate of exp_time/ss_factor. |
|
Include transit depth variation between the different filters. Note 'RpRs' must be fixed to |
|
include transit timing variation between the transit. Note: Reference 'T_0' and 'P' values |
|
Update parameters and priors of model parameters. By default, the parameters are all set to None for no update on them. |