Gaussian Process¶
The Gaussian Process module is used to fit the SN light curves and mangle the SED template (PISCOLA makes use of tinygp). This module is documented bellow:
- piscola.gaussian_process.fit_gp_model(times, wavelengths, fluxes, flux_errors, k1='Matern52', fit_mean=False, fit_log=False, wave_log=True)¶
Fits a Gaussian Process model to a SN multi-colour light curve.
All input arrays MUST have the same length.
- Parameters:
times (ndarray) – Light-curve epochs.
wavelengths (ndarray) – Light-curve effective wavelength.
fluxes (ndarray) – Light-curve fluxes.
flux_errors (ndarray) – Light-curve flux errors.
k1 (str) – Kernel to be used for the time axis. Either
Matern52,Matern32orExpSquared.fit_log (bool, default
False.) – Whether to fit the light curves in logarithmic (base 10) scale.wave_log (bool, default
True.) – Whether to use logarithmic (base 10) scale for the wavelength axis.
- Returns:
gp_model – Gaussian Process multi-colour light-curve model.
- Return type:
GaussianProcess
- piscola.gaussian_process.fit_single_lightcurve(times, fluxes, flux_errors, k1='Matern52')¶
Fits a Gaussian Process model to a single SN light curve.
All input arrays MUST have the same length.
- Parameters:
times (ndarray) – Light-curve epochs.
fluxes (ndarray) – Light-curve fluxes.
flux_errors (ndarray) – Light-curve flux errors.
k1 (str) – Kernel to be used for the time axis. Either
Matern52,Matern32orExpSquared.
- Returns:
gp_model – Gaussian Process light-curve model.
- Return type:
GaussianProcess
- piscola.gaussian_process.prepare_gp_inputs(times, wavelengths, fluxes, flux_errors, fit_log, wave_log)¶
Prepares the inputs for the Gaussian Process model fitting.
- Parameters:
times (ndarray) – Light-curve epochs.
wavelengths (ndarray) – Light-curve effective wavelength.
fluxes (ndarray) – Light-curve fluxes.
flux_errors (ndarray) – Light-curve flux errors.
fit_log (bool) – Whether to fit the light curves in logarithmic (base 10) scale.
wave_log (bool) – Whether to use logarithmic (base 10) scale for the wavelength axis.
- Returns:
X (ndarray) – X-axis array for the Gaussian Process model.
y (ndarray) – Y-axis array for the Gaussian Process model.
yerr (ndarray) – Y-axis errors for the Gaussian Process model.
y_norm (float) – Normalisation used for the fluxes and errors. The maximum of the fluxes is used.