uvex_transients.utils.plotting.plot_swift_uv_calibration#

uvex_transients.utils.plotting.plot_swift_uv_calibration(sed, sn_type: str, *, band: str = 'UVW1', n_models: int = 100, n_observed: int = 20, min_points: int = 4, fixed: Mapping[str, float] | None = None, rng: Generator | int | None = 0, ax: Axes | None = None) → Figure[source]#

Overplot Swift/UVOT light curves on a supernova SED’s simulated light curves in one UV band.

Parameters of sed are drawn from its priors, and each draw is integrated through the SVO transmission curve of the UVOT filter (see ~uvex_transients.utils.filter_utils.get_bandpass) at the median redshift of the plotted supernovae. The result is expressed as the quantity the Swift archive stores, \(\nu_\mathrm{eff} L_\nu = 4 \pi d_L^2 \nu_\mathrm{eff} f_\nu\), so model and data are compared directly. Observed light curves are a random sample of the archive’s supernovae of type sn_type. Those timed from an estimated explosion date are drawn in black, and those timed from discovery in grey, since discovery lags explosion by an unknown amount.

Parameters:
  • sed (type) – A ~uvex_transients.models.core.base.SpectralModel subclass, e.g. ~uvex_transients.models.supernovae.TypeIaSED.

  • sn_type (str) – The type_standard of the Swift supernovae to overplot, e.g. "Ia" or "SLSN-I".

  • band (str, optional) – UVOT band, one of "UVW1", "UVM2" or "UVW2". The default is "UVW1", the best sampled.

  • n_models (int, optional) – Number of simulated light curves. The default is 100.

  • n_observed (int, optional) – Maximum number of observed supernovae to overplot. The default is 20.

  • min_points (int, optional) – Minimum number of detections in band for a supernova to be eligible. The default is 4.

  • fixed (mapping of str to float, optional) – Dimensionless parameters of sed to fix at one value for every draw, in place of drawing them, for example {"csm": 1.0} to show only the Type IIP events with circumstellar material. They are fixed in the model (see ~uvex_transients.models.core.base.SpectralModel), so that the parameters that depend on them are drawn consistently. The default is to draw every parameter.

  • rng (numpy.random.Generator or int, optional) – Random-number source for the parameter draws and the observed sample. The default is 0.

  • ax (matplotlib.axes.Axes, optional) – Axes to draw on. If None, a new figure is created.

Returns:

The figure.

Return type:

matplotlib.figure.Figure