uvex_transients.models.core.base.ComposedSpectralModel.simulate_photometry#
- ComposedSpectralModel.simulate_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, n_sigma: float | None = None, 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) QTable#
Simulate noisy synthetic photometry of this model at given times, against a real detector.
The noise-aware counterpart to
mag()/flux()/as_source_spectrum(): those give the noiseless truth; this reports a synthetic measurement, one Gaussian realization of the true flux at each requested time and band at that time and band’s own implied uncertainty, with the magnitudes and bounds worked out from it. The measurement itself ismeasure_photometry(); this lays it out as a table.Deliberately independent of any
SurveyScheduleorEvent: t/exptime are whatever times and exposures the caller wants evaluated (for example a target of opportunity’s own cadence), not ones a schedule was queried for.- Parameters:
t (
array-likeorQuantity) – Time(s) since explosion, shape(N,)(or scalar, promoted to shape(1,)).exptime (
Quantity) – Exposure duration(s), scalar or shape matching t.detector (
Detector) – Seemeasure_photometry().coord (
SkyCoord) – Sky position of the target, scalar or shape(N,).background (
SourceSpectrum, optional) – Seemeasure_photometry().bands (
list, optional) – Seemeasure_photometry().observer_location (
EarthLocation, optional) – Seemeasure_photometry().obstime (
Time, optional) – Seemeasure_photometry().redshift (
array-likeorQuantity, optional) – Seeas_source_spectrum().luminosity_distance (
Quantity, optional) – Seeas_source_spectrum().angular_diameter_distance (
Quantity, optional) – Seeas_source_spectrum().proper_distance (
Quantity, optional) – Seeas_source_spectrum().cosmology (
FLRW, optional) – Seeas_source_spectrum().ebv (
float,Quantity,numpy.ndarray, orstr, optional) – Seeas_source_spectrum().dust_law (
float,Quantity,numpy.ndarray, orstr, optional) – Seeas_source_spectrum().in_model (
numpy.ndarray, optional) – Seemeasure_photometry(). By defaultt >= 0, or with average_exposuret + exptime > 0.average_exposure (
bool, optional) – Seemeasure_photometry(). Defaults to False.n_sigma (
float, optional) – Width, in multiples offlux_err, of theflux_upper/flux_lower/mag_upper/mag_lowerinterval. If None (the default), usesconfig["simulation.detection_n_sigma"](5 out of the box).sys_err (
floatorMapping[str,float], optional) – Seemeasure_photometry().rng (
numpy.random.Generator,int, orNone) – Seemeasure_photometry().noise_seed (optional) – See
measure_photometry().noise_observation_keys (optional) – See
measure_photometry().**parameters – This model’s parameter values. See
eval_log_cgs().
- Returns:
One row per (time, band), sorted by
tthenband, with columnst,exptime,band,snr(the measured SNR,flux / flux_err),flux/flux_err(Jy),flux_upper/flux_lower(Jy,flux ± n_sigma*flux_err),ab_mag/mag_err,mag_upper/mag_lower– then_sigmainterval transformed to magnitude, brighter bound first – andin_model. Seesimulate_photometry()for the exact semantics of every column. If sys_err is given,snr/flux_err/mag_err(and everything derived from them) reflect the combined shot-noise-plus-systematic uncertainty.- Return type:
- Raises:
ValueError – As for
measure_photometry().