The plotting
module provides functions for generating plots of
analysis results that are visually consistent and easily reproducible.
Plot a cosmological fit to a set of supernova data. |
|
Shows the change in SN color as a function of redshift with each SN color coded by PWV |
|
Single panel, multi-line plot for change in magnitude vs PWV color coded by redshift |
|
Single panel, multi-line plot of change in magnitude vs redshift color coded by PWV |
|
Plot the variation in fitted distance modulus as a function of redshift and PWV |
|
Single panel, multi-line plot of slope in delta magnitude vs redshift color coded by PWV |
|
Multi-panel plot showing subplots for each salt2 parameter vs redshift. |
|
Multi-panel plot showing magnitudes in different columns vs PWV and redshift in different rows |
|
Multi panel plot with a column for each band and rows for the change in magnitude vs pwv and redshift parameters |
|
Plot hubble residuals as a function of supernova coordinates. |
|
Plot a spectral template with overlaid PWV and bandpass throughput curves |
|
Plot PWV measurements taken over a single year as a function of time. |
|
Compare the Zenith PWV assumed by different propagation effects |
|
Compare the atmospheric transmission function for two PWV concentrations |
|
Compare the PWV absorbed flux of a SN IA for two PWV concentrations |
|
Plot the change to spectroscopic SN Ia flux over wavelength and redshift |
Single panel, multi-line plot of change in magnitude vs redshift color coded by PWV
pwv_arr (ndarray
) – Array of PWV values
z_arr (ndarray
) – Array of redshift values
delta_mag_arr (ndarray
) – Array of delta mag values
axis (Optional
[axis
]) – Optionally plot on a given axis
label (Optional
[str
]) – Optional label to format with PWV
None
Single panel, multi-line plot for change in magnitude vs PWV color coded by redshift
pwv_arr (ndarray
) – Array of PWV values
z_arr (ndarray
) – Array of redshift values
delta_mag_arr (ndarray
) – Array of delta mag values
axis (Optional
[axis
]) – Optionally plot on a given axis
label (Optional
[str
]) – Optional label to format with redshift
None
Single panel, multi-line plot of slope in delta magnitude vs redshift color coded by PWV
pwv_arr (ndarray
) – Array of PWV values
z_arr (ndarray
) – Array of redshift values
slope_arr (ndarray
) – Slope of delta mag at reference PWV
axis (Optional
[axis
]) – Optionally plot on a given axis
None
Multi panel plot with a column for each band and rows for the change in magnitude vs pwv and redshift parameters
delta_mag
is expected to have band names as keys, and 2d arrays as
values. Each array should represent the change in magnitude for each
given PWV and redshift
pwv_arr (ndarray
) – PWV values used in the calculation
z_arr (ndarray
) – Redshift values used in the calculation
delta_mag (dict
) – Dictionary with delta mag for each band
slopes (ndarray
) – Slope in delta_mag for each redshift
bands (List
[str
]) – Order of bands to plot
figsize (Tuple
[Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
], Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
]]) – The size of the figure
Tuple
[Figure
, Axes
]
The matplotlib figure and axis
Return a string representation of number in scientific notation.
str
Plot a spectral template with overlaid PWV and bandpass throughput curves
source (Union
[str
, Source
]) – sncosmo
source to use as spectral template
wave_arr (ndarray
) – The observer frame wavelengths to plot flux for in Angstroms
z_arr (ndarray
) – The redshifts to plot the template at
pwv (ndarray
) – The PWV to plot the transmission function for
phase (Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
]) – The phase of the template to plot
resolution (Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
]) – The resolution of the atmospheric model
figsize (Tuple
[Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
], Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
]]) – The size of the figure
Tuple
[Figure
, array
]
The matplotlib figure and an array of matplotlib axes
Plot a spectrum over the per-filter LSST hardware throughput
wave (array
) – Spectrum wavelengths in Angstroms
flux (array
) – Flux of the spectrum in arbitrary units
figsize (Tuple
[Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
], Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
]]) – Size of the figure
hardware_only – Only include hardware contributions in the plotted filters
Tuple
[figure
, Axes
]
The matplotlib figure and axis
Multi-panel plot showing magnitudes in different columns vs PWV and redshift in different rows
mags (Dict
[str
, ndarray
]) – Simulated magnitude values for each band
pwv (ndarray
) – Array of PWV values
z (ndarray
) – Array of redshift values
figsize (Tuple
[Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
], Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
]]) – Size of the figure
Tuple
[figure
, Axes
]
The matplotlib figure and axis
Multi-panel plot showing subplots for each salt2 parameter vs redshift.
Multiple lines included for different PWV values.
fitted_params (Dict
[str
, ndarray
]) – Dictionary with fitted parameters in each band
pwv_arr (ndarray
) – PWV value used for each supernova fit
z_arr (ndarray
) – Redshift value used for each supernova fit
bands (List
[str
]) – Bands to include in the plot. Must be keys of fitted_params
Tuple
[Figure
, array
]
The matplotlib figure and an array of matplotlib axes
Shows the change in SN color as a function of redshift with each SN color coded by PWV
pwv_arr (ndarray
) – Array of PWV values
z_arr (ndarray
) – Array of redshift values
mag_dict (Dict
[str
, ndarray
]) – Dictionary with magnitudes for each band
colors (List
[Tuple
[str
, str
]]) – Band combinations to plot colors for
ref_pwv (Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
]) – Plot values relative to given reference PWV
None
Plot the variation in fitted distance modulus as a function of redshift and PWV
mu (ndarray
) – Array of distance moduli
pwv_arr (ndarray
) – Array of PWV values
z_arr (ndarray
) – Array of redshift values
cosmo (Cosmology
) – Astropy cosmology to compare results against
None
Plot PWV measurements taken over a single year as a function of time.
Set missing=None
to disable plotting of missing data windows.
pwv_series (Series
) – Measured PWV index by datetime
figsize (Tuple
[Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
], Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
]]) – Size of the figure in inches
missing (Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
]) – Highlight time ranges larger than given number of days with missing PWV
Tuple
[figure
, Axes
]
The matplotlib figure and axis
Plot a cosmological fit to a set of supernova data.
data (DataFrame
) – Results from the snat_sim fitting pipeline
abs_mag (Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
]) – Intrinsic absolute magnitude of SNe Ia
H0 (Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
]) – Fitted Hubble constant at z = 0 in [km/sec/Mpc]
Om0 (Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
]) – Omega matter density in units of the critical density at z=0
w0 (Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
]) – Dark energy equation of state
alpha (Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
]) – Fitted nuisance parameter for supernova stretch correction
beta (Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
]) – Fitted nuisance parameter for supernova color correction
Tuple
[figure
, ndarray
, ndarray
]
The matplotlib figure, fitted distance modulus, and tabulated residuals
Plot hubble residuals as a function of supernova coordinates.
ra (array
) – Right Ascension for each supernova
dec (array
) – Declination of each supernova
residual (array
) – Hubble residual for each supernova
cmap (str
) – Name of the matplotlib color map to use
figsize (Tuple
[Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
], Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
]]) – The size of the figure
Tuple
[figure
, Axes
]
The matplotlib figure and axis
Compare the Zenith PWV assumed by different propagation effects
pwv_data (Series
) – Series with PWV values and a Datetime index
static (StaticPWVTrans
) – Static propagation effect
seasonal (SeasonalPWVTrans
) – Seasonal Propagation effect
variable (VariablePWVTrans
) – Variable Propagation effect
figsize (Tuple
[float
, float
]) – The size of the figure
Tuple
[figure
, Axes
]
The matplotlib figure and axis
Compare the atmospheric transmission function for two PWV concentrations
pwv1 (float
) – The first PWV concentration to plot the transmission for
pwv2 (float
) – The second PWV concentration to plot the transmission for
wave_min (float
) – Minimum wavelength to plot
wave_max (float
) – Maximum wavelength to plot
resolution (int
) – Bin the atmospheric transmission function to a lower transmission
figsize (Tuple
[Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
], Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
]]) – The size of the figure
Tuple
[figure
, Axes
]
The matplotlib figure and axis
Compare the PWV absorbed flux of a SN IA for two PWV concentrations
pwv1 (float
) – The first PWV concentration to plot the flux for
pwv2 (float
) – The second PWV concentration to plot the flux for
z (float
) – The redshift of the SN Ia
wave_min (float
) – Minimum wavelength to plot
wave_max (float
) – Maximum wavelength to plot
resolution (int
) – Bin the atmospheric transmission function to a lower transmission
figsize (Tuple
[Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
], Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
]]) – The size of the figure
Tuple
[figure
, Axes
]
The matplotlib figure and axis
Plot the change to spectroscopic SN Ia flux over wavelength and redshift
An imshow style plot with the change in flux along the color axis.
pwv (float
) – The PWV concentration to use when determining the change in flux
wave_min (float
) – Minimum wavelength to plot
wave_max (float
) – Maximum wavelength to plot
figsize (Tuple
[Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
], Union
[float
, float16
, float32
, float64
, float128
, int
, int8
, int16
, int32
, int64
, uint8
, uint16
, uint32
, uint64
, longlong
, ulonglong
]]) – The size of the figure
Tuple
[figure
, array
]
The matplotlib figure and and array of matplotlib axes