src.superphot_plus.file_utils
Methods for reading and writing input, intermediate, and output files.
Module Contents
Functions
|
Get the file name for equal weight posterior samples from a lightcurve fit. |
|
Get all EQUAL WEIGHT posterior samples from a lightcurve fit. |
|
Reads all EQUAL WEIGHT posterior samples for a set of lightcurve fits. |
|
Determine if we already have some posterior sample data for the lightcurve. |
- get_posterior_filename(lc_name, fits_dir='.', sampler=None)[source]
Get the file name for equal weight posterior samples from a lightcurve fit.
- Parameters:
lc_name (str) – Lightcurve name.
fits_dir (str, optional) – Output directory path. Defaults to FITS_DIR.
sampler (str, optional) – Variety of sampler. Can be included in the sample file name.
- Returns:
File name for numpy array file containing the posterior samples.
- Return type:
str
- get_posterior_samples(lc_name, fits_dir=None, sampler=None)[source]
Get all EQUAL WEIGHT posterior samples from a lightcurve fit.
- Parameters:
lc_name (str) – Lightcurve name.
fits_dir (str, optional) – Output directory path. Defaults to FITS_DIR.
sampler (str, optional) – Variety of sampler. Can be included in the sample file name.
- Returns:
Numpy array containing the posterior samples.
- Return type:
np.ndarray
- get_multiple_posterior_samples(lc_names, fits_dir, sampler=None)[source]
Reads all EQUAL WEIGHT posterior samples for a set of lightcurve fits.
- Parameters:
lc_names (str) – Lightcurve names.
fits_dir (str, optional) – Output directory path. Defaults to FITS_DIR.
sampler (str, optional) – Variety of sampler. Can be included in the sample file name.
- Returns:
Dictionary mapping the posterior samples to the light curves specified.
- Return type:
dict of np.ndarray
- has_posterior_samples(lc_name, fits_dir=None, sampler=None)[source]
Determine if we already have some posterior sample data for the lightcurve.
- Parameters:
lc_name (str) – Lightcurve name.
fits_dir (str, optional) – Output directory path. Defaults to FITS_DIR.
sampler (str, optional) – Variety of sampler. Can be included in the sample file name.
- Returns:
Does a file already exist for the lightcurve fit
- Return type:
boolean