uvex_transients.models.supernovae.Ia.TypeIaSED.measure_photometry#

TypeIaSED.measure_photometry(t: PhysicalInput, exptime: Quantity, detector: Detector, coord: SkyCoord, *, background: SourceSpectrum | None = None, bands: list | None = None, observer_location: EarthLocation | None = None, obstime: Time | None = None, redshift: PhysicalInput | None = None, luminosity_distance: Quantity | None = None, angular_diameter_distance: Quantity | None = None, proper_distance: Quantity | None = None, cosmology: FLRW | None = None, ebv: float | Quantity | FloatArray | None = None, dust_law: str | None = None, in_model: ndarray | None = None, average_exposure: bool = False, sys_err: float | Mapping[str, float] | None = None, rng: RNGInput = None, noise_seed: int | FloatArray | None = None, noise_observation_keys: FloatArray | None = None, **parameters: ParameterValue) → tuple[FloatArray, FloatArray, FloatArray, FloatArray]#

Measure this model with a real detector at given times: one noisy measurement per epoch and band.

The array form of simulate_photometry(), with no table around it. Every epoch can belong to a different event: coord, observer_location, obstime, redshift, the distances, ebv, noise_seed, and the model parameters can each be a scalar (shared by every epoch) or an array with one entry per epoch. That makes it the one measurement routine for a single event’s photometry and for a survey-wide screening of many events.

The model is only valid from the explosion onward (some light curve shapes diverge at negative times). Epochs not in_model, by default those with t < 0, are therefore never evaluated against this model: they are measured against a flat, effectively zero-flux spectrum instead, i.e. pure background at that observation’s own depth.

By default the source is measured at the start of each exposure, which is accurate when it changes little over the exposure. With average_exposure it is instead measured as a detector does, from the photons that arrive over the whole exposure, which matters for a pulse that is short compared to it.

Parameters:
  • t (array-like or Quantity) – Time(s) since explosion, shape (N,) (or scalar, promoted to shape (1,)), one entry per epoch. This is the start of the exposure.

  • exptime (Quantity) – Exposure duration(s), scalar or shape matching t.

  • detector (Detector) – Supplies bandpasses, collecting area, plate scale, and noise terms (dark/read noise, gain, …). Its own background is used unless background is given.

  • coord (SkyCoord) – Sky position of the target, scalar or shape (N,).

  • background (SourceSpectrum, optional) – Sky background to simulate against for this call, replacing detector’s own (which is never mutated), e.g. ~m4opt.synphot.background.GalacticBackground() alone or combined with others via +.

  • bands (list, optional) – Which of detector’s bandpasses to evaluate. Defaults to every bandpass.

  • observer_location (EarthLocation, optional) – Observer location, scalar or shape (N,). Matters only insofar as background depends on it (for example ~m4opt.synphot.background.EarthshineBackground); defaults to a fixed placeholder.

  • obstime (Time, optional) – Observation time, scalar or shape (N,). Matters only insofar as background depends on it (for example ~m4opt.synphot.background.ZodiacalBackground); defaults to a fixed placeholder.

  • redshift (array-like or Quantity, optional) – See as_source_spectrum().

  • luminosity_distance (Quantity, optional) – See as_source_spectrum().

  • angular_diameter_distance (Quantity, optional) – See as_source_spectrum().

  • proper_distance (Quantity, optional) – See as_source_spectrum().

  • cosmology (FLRW, optional) – See as_source_spectrum().

  • ebv (float, Quantity, numpy.ndarray, or str, optional) – See as_source_spectrum().

  • dust_law (float, Quantity, numpy.ndarray, or str, optional) – See as_source_spectrum().

  • in_model (numpy.ndarray, optional) – Boolean, shape (N,): which epochs are evaluated against this model. By default t >= 0, or with average_exposure those whose exposure ends after the explosion (t + exptime > 0). A caller can mark more epochs as background, e.g. an exposure that runs past the end of the window it cares about.

  • average_exposure (bool, optional) – If True, the source is the flux averaged over each exposure, from t to t + exptime (see as_source_spectrum()), instead of the flux at t. An exposure that starts before the explosion is then measured too, with the flux averaged over the whole exposure and zero before the explosion. Cost grows by the number of quadrature nodes (28) in model evaluations. Defaults to False.

  • sys_err (float or Mapping[str, float], optional) – See ~uvex_transients.models._utils.measure_bands.

  • rng (numpy.random.Generator, int, or None) – See ~uvex_transients.models._utils.measure_bands.

  • noise_seed (optional) – See ~uvex_transients.models._utils.measure_bands.

  • noise_observation_keys (optional) – See ~uvex_transients.models._utils.measure_bands.

  • **parameters – This model’s parameter values. See eval_log_cgs().

Returns:

  • flux (numpy.ndarray) – Measured flux density in Jy, shape (n_bands, N).

  • flux_err (numpy.ndarray) – One-sigma uncertainty in Jy, same shape.

  • snr (numpy.ndarray) – Measured SNR, flux / flux_err, same shape.

  • snr_expected (numpy.ndarray) – Noiseless SNR, the true flux over flux_err, same shape.

Raises:

ValueError – If bands or sys_err doesn’t match detector, exptime, in_model, coord, observer_location or obstime is neither scalar nor shaped like t, or noise_seed is given without matching noise_observation_keys.