analysis.lc_colors¶
The lc_colors
module fits tabulates the chi-squared values for colors modeled by
an SNCosmo model. It also tabulates modeled and observed delta color over 15
days.
Function Documentation¶
-
analysis.lc_colors.
calc_color_chisq
(data_table, model, band1, band2, interval=1, prange=None)[source]¶ Calculate the chi-squared for observed and modeled color
Assumes time values in the data and model are relative to the same zero point.
Parameters: - data_table (Table) – Data table from sndata (format_sncosmo=True)
- model (Model) – An sncosmo model
- band1 (str) –
- band2 (str) –
- interval (int) – Spacing between phases when summing chisq
- prange (tuple) – Optional start and end phase for color evolution
Returns: - The chi-square value
- The degrees of freedom
-
analysis.lc_colors.
create_empty_output_table
(color_bands, suffixes)[source]¶ Create an empty astropy table for storing color dependant values
Returns an empty table with columns for each color defined by color_bands. Additional columns can be added with the same names but with an added suffix by specifying the
suffixes
argument.Parameters: - color_bands (list[Tuple]) – List of tuples with two band names
- suffixes (list[str]) – Include additional columns with suffixes
Returns: An empty, masked astropy table
-
analysis.lc_colors.
get_observed_color_times
(data, band1, band2)[source]¶ Return the time range for which observations overlap in two band passes
Parameters: - data (Table) – Astropy table with columns ‘band’ and ‘time’
- band1 (str) – The name of a bandpass in data[‘band’]
- band2 (str) – The name of a bandpass in data[‘band’]
Returns: The start time The end time
-
analysis.lc_colors.
tabulate_chisq
(data_release, models, colors, interval=1, prange=None, out_path=None)[source]¶ Tabulate color chi-squared for multiple models
Integrate the chi-squared of the color evolution over the phase range
prange
. The phase range should be specified relative to B-band max. Ifprange
is not specified, use the largest integration range allowed by the data on a color by color basis.Parameters: - data_release (module) – An sndata data release
- models (list) – A list of sncosmo models
- colors (list) – List of tuples with band names
- interval (int) – Spacing between phases when summing chisq
- prange (tuple) – Optional start and end phases
- out_path (str) – Optionally write to path with each iteration
-
analysis.lc_colors.
tabulate_delta_15
(data_release, models, band_combos, out_path=None, t0_band='csp_dr3_B')[source]¶ Tabulate observed and modeled delta color over 15 days
Parameters: - data_release (module) – An sndata data release
- models (list) – A list of sncosmo models
- band_combos (list) – List of tuples with band names
- out_path (str) – Optionally write to path with each iteration
- t0_band (str) – Band to use when setting model t0 to peak
Returns: An astropy table