CONAN._classes.load_lightcurves.add_GP#
- CONAN._classes.load_lightcurves.add_GP(lc_list=None, par=['col0'], kernel=['mat32'], operation=[''], amplitude=[], lengthscale=[], h3=None, h4=None, gp_pck='ce', verbose=True)#
Define GP hyperparameters for each lc. The first hyperparameter h1 is amplitude (standard deviation) in ppm while the second h2 is lengthscale in unit of the desired column. h3 and h4 are the 3rd and 4th hyperparameters whose definitions depend on the choice of gp kernel. see titans-ge/CONAN
The priors for the hyperparameters can be defined in following ways:
fixed value as float or int, e.g amplitude = 2
normal prior as tuple of len 2, (mu, std) e.g. amplitude = (2, 1)
uniform (or loguniform prior) as tuple of length 3, (min,start, max) e.g. amplitude = (1,2,5)
loguniform: add “LU” to a for loguniform e.g (1,2,5,”LU”)
truncnorm as tuple of length 4, (min, max, mu, std) e.g. q1 = (0,1,0.3,0.1)
Note: using GP on a lc sets fit_offset=”n” for that lc. users can turn it back on for each lc from the ._fit_offset list attribute. e.g. lc_obj._fit_offset = [“y”,”y”,”y”]
If multiplying GP kernels together, the amplitudes are degenerate and only one amplitude is required, that of the first kernel. set the other amplitudes to –1 to disable them.
- Parameters:
lc_list (str, list;) – list of lc files to add GP to. Default is None for no GP. if “all” is given, GP is added to all lc files where gp use has been indicated in
lc_baseline(). If “same” is given, a global (same) GP is used for all indicated lc files inlc_baseline().par (str, tuple, list;) – column of the input data to use as the GP independent variable. a list is expected if different columns are to be used for the lc files given in lc_list. To use 2 different kernels on a single lc file, give column name for each kernel as a tuple of length 2. e.g. lc_list=[“lc1.dat”,”lc2.dat”], par = [(“col0”,”col0”),”col3”] to use col0 for both kernels of lc1, and col3 for lc2.
kernel –
kernel to use for the GP.
if George package, kernel must be in [‘mat32’, ‘mat52’, ‘exp’, ‘cos’, ‘expsq’,’exps2’,’qp’,’rquad’]
if celerite package, kernel must in [‘mat32’, ‘exp’, ‘cos’, ‘sho’,’qp_ce’]
if spleaf package, kernel must be in [‘mat32’, ‘mat52’, ‘exp’, ‘cos’, ‘sho’, ‘expsq’, ‘exps2’, ‘qp’, ‘qp_sc’, ‘qp_mp’]
- operationstr, tuple, list;
operation to combine kernels. Must be one of [“+”,”*”]. Default is “” for no combination.
- amplitudefloat, tuple, list;
amplitude of the GP kernel in ppm. Must be list of int/float or tuple of length 2/3/4
- lengthscalefloat, tuple, list;
lengthscale of the GP kernel in units of the column array specified in par. Must be list of int/float or tuple of length 2/3/4
- h3float, tuple, list;
3rd hyperparameter of the GP kernel. Must be list of int/float or tuple of length 2/3/4
- h4float, tuple, list;
4th hyperparameter of the GP kernel. Must be list of int/float or tuple of length 2/3/4
- gp_pckstr, list;
package to use for the GP. Must be one of [“ge”,”ce”,”sp”]. Default is “ce” for celerite. A str or list of str can be given to specify package for each lc file in GP lc_list.
- verbosebool;
print output. Default is True.
- _GP_dict#
dictionary of GP configuration for each lc file. Default is None for no GP.
- Type:
dict
- _sameLCgp#
flag to indicate if same GP is to be used for all lcs. Default is False.
- Type:
SimpleNamespace
- _useGPphot#
list of GP packages to use for each lc file. Default is None for no GP.
- Type:
list
- _allLCgp#
flag to indicate if GP is to be used for all lcs. Default is False.
- Type:
bool
- _fit_offset#
list of flags to indicate if offset is to be fit for each lc file. Default is “y” for all. This is set to “n” for the lcs where GP is used.
- Type:
list