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#

add_GP([lc_list, par, kernel, operation, amplitude, ...])

Define GP hyperparameters for each lc. The first hyperparameter h1 is amplitude (standard deviation)

add_custom_LC_function([func, x, func_args, ...])

Define custom model to be combined with or to replace the light-curve model. This must be

add_sinusoid([lc_list, trig, n, par, Amp, P, x0, verbose])

Add sinusoid to fit correlation along a column of the data. This fits a sinusoid to the

add_spline([lc_list, par, degree, knot_spacing, ...])

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.

clip_outliers([lc_list, clip, width, select_column, ...])

Remove outliers using a running median method. Points > clip*M.A.D are removed

contamination_factors([cont_ratio, verbose])

add contamination factor for each unique filter defined in load_lightcurves().

detrend_data([overwrite, verbose])

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_LDs(Teff, logg, Z, filter_names[, unc_mult, ...])

get Kipping quadratic limb darkening parameters (q1,q2) using ldtk (requires internet connection).

get_decorr([T_0, Period, rho_star, Duration, D_occ, ...])

Function to obtain best decorrelation parameters for each light-curve file using the

lc_baseline([fit_offset, dcol0, dcol3, dcol4, dcol5, ...])

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.

limb_darkening([q1, q2, verbose])

Setup Kipping quadratic limb darkening LD coefficient (q1, q2) for transit light curves.

mask_points([lc_list, condition, show_plot, verbose])

Function to mask points in the lightcurves based on a condition. These points are removed from the injested data

phasecurve([D_occ, Fn, ph_off, A_ev, f1_ev, A_db, ...])

Setup phase curve parameters for each unique filter in loaded lightcurve.

planet_parameters([RpRs, Impact_para, rho_star, ...])

Define parameters and priors of model parameters. By default, the parameters are fixed to

plot([plot_cols, col_labels, nrow_ncols, figsize, ...])

visualize data

print([section])

Print out all input configuration (or particular section) for the light curve object.

rescale_data_columns([method, columns, verbose])

Function to rescale the data columns of the lightcurves. This can be important when

save_LCs([save_path, suffix, overwrite, verbose])

Save each of the loaded light curves to a .dat file

supersample([lc_list, ss_factor, verbose])

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.

transit_depth_variation([ddFs, dRpRs, divwhite, verbose])

Include transit depth variation between the different filters. Note 'RpRs' must be fixed to

transit_timing_variation([ttvs, dt, baseline_amount, ...])

include transit timing variation between the transit. Note: Reference 'T_0' and 'P' values

update_planet_parameters([RpRs, Impact_para, ...])

Update parameters and priors of model parameters. By default, the parameters are all set to None for no update on them.