src.superphot_plus.posterior_samples
Container for posterior samples from lightcurve fitting
Module Contents
Classes
Container for posterior samples from lightcurve fitting |
- class PosteriorSamples(samples, name=None, sampling_method=None, sn_class=None, sample_mean=None, max_flux=None, redshift=None, **kwargs)[source]
Container for posterior samples from lightcurve fitting
- sample_mean()[source]
Convenience method to get some summary statistics about the posterior samples.
- Returns:
sample_mean – Mean of samples along the 0 axis.
- Return type:
np.array
- save_to_file(output_dir)[source]
Save the posterior samples to a directory, using the lightcurve’s name.
- Parameters:
output_dir (str, optional) – Output directory path. Defaults to FITS_DIR.
- classmethod from_file(input_dir, name, sampling_method=None, **kwargs)[source]
Create a PosteriorSamples object from a file.
- Parameters:
input_dir (str, optional) – Input directory path. Defaults to FITS_DIR.
name (str) – Lightcurve name.
sampling_method (str, optional) – Variety of sampler. Can be included in the sample file name.
sn_class (int, optional) – the classification of the supernova, if known.