phot_class.classification¶
The classification
module tabulates light-curve fits for a given survey
and determines the corresponding classification coordinates:
\[x = \chi^2_{blue}(Ia) - \chi^2_{blue}(91bg)\]
\[y = \chi^2_{red}(Ia) - \chi^2_{red}(91bg)\]
Function Documentation¶
-
phot_class.classification.
classify_targets
(fits_table, band_names=None, lambda_eff=None, out_path=None)[source]¶ Tabulate fitting coordinates for SNe based on their fit results
See the
create_empty_table
function for the assumed input table format. Ifband_names
orlambda_eff
are not given, they are taken fromfits_table.meta
. Any targets having one or more fits with the string ‘failed’ in the message are skipped (case insensitive).Parameters: - fits_table (Table) – A table of fit results
- band_names (list) – List of band names used when fitting
- lambda_eff (list) – The effective wavelength of each band in angstroms
- out_path (str) – Optionally write results to file
Returns: An astropy table of fitting coordinates
-
phot_class.classification.
tabulate_fit_results
(data_iter, band_names, lambda_eff, fit_func, fitting_method='band', config=None, out_path=None)[source]¶ Tabulate fit results for a collection of data tables
Results already written to out_path are skipped.
Parameters: - data_iter (iter) – Iterable of photometric data for different SN
- band_names (list) – Name of bands included in
data_iter
- lambda_eff (list) – Effective wavelength for bands in
band_names
- fit_func (func) – Function to use to run fits
- config (dict) – Specifies priors / kwargs for fitting each model
- out_path (str) – Optionally cache results to file
Returns: An astropy table with fit results