CanonicalSampler#
- class uvex_transients.phase_space.sampling.canonical.CanonicalSampler(schedule: SurveySchedule, mission=None, *, spectral_index: float | None = None, rise_ratio: float | None = None, fade_mag: float | None = None, cosmology: Cosmology | None = None, schedule_name: str | None = None, **survey)[source]#
Count the recoveries of a canonical transient at points of the luminosity-half-decline-time plane.
The transient has a fast-rise, exponential-decay light curve and a power-law spectrum (see
_CanonicalTransient). A point isx = (log10 L_band / (erg/s), log10 t_half / day). \(L_\mathrm{band}\) is the peak rest-frame luminosity emitted in the band, \(L_\nu\Delta\nu\) for the equivalent bandwidth \(\Delta\nu\) of the band with \(L_\nu\) taken at its effective frequency. One sampler makes the map of one band.Both axes are derived quantities, not parameters of the SED, so this sampler places a point itself instead of binding axes to parameters.
Every argument that is None (the default) takes
config["phase_space.canonical.<name>"]for the shape of the transient, and whatSurveySettingsresolves for the rest.- Parameters:
schedule (
SurveySchedule) – The survey to recover events against.mission (
strorm4opt.missions.Mission, optional) – The mission (detector and background), or the name of one.spectral_index (
float, optional) – The index \(\alpha\) of the spectrum, \(L_\nu\propto\nu^\alpha\), which sets the K-correction \((1+z)^{1+\alpha}\). A spectrum rising steeply to the blue (about 3) has no redshift limit and raises ValueError.rise_ratio (
float, optional) – The ratio of the rise to the decay time of the light curve.fade_mag (
float, optional) – How far below its peak, in magnitudes, an event is followed by the survey.cosmology (
Cosmology, optional) – Defaults to the configured cosmology.schedule_name (
str, optional) – The registry name of schedule, recorded insettingsso thatfrom_settings()can fetch the same schedule.**survey – What counts as a recovery and how a point is simulated:
band(the one that recovers events and in which the luminosity is measured),snr_threshold,n_visits,exclude_first_visit_detections,detection,mag_limit,time_bins,nsideandorder. SeeSurveySamplerandSurveySettings.
Methods
Return the volume-time of the whole sky over the whole survey out to the redshift limit, in Mpc^3 yr.
annotate_map(ax, overlay)Shade the region of the map that each shipped class occupies, each in its own colour.
coverage(x)Return the fraction of the sky and survey window that the sampled footprint covers, for points of the space.
describe(settings)Describe the map of a survey sampler: its band and what it counts as a detection.
detect(simulator, catalog)Return the events of a catalog that count as recovered.
draw(x, n, seed)Simulate n events at a point and return how many the survey recovers.
draw_map(grid, points, path, title, *[, ...])Draw the canonical map, with its four panels and the shipped classes shaded if there is an overlay.
from_run_config(run, **options)Build a sampler from the arguments of a map in a run-config, for the survey and mission the run-config names.
from_settings(settings, *[, schedule, ...])Rebuild a sampler from the settings of another one.
kinds()Return the registered kinds this class is, the most specific first.
Return a transient of this sampler's spectrum, whose luminosities are taken at reference_frequency.
measure_overlay([n_draws, seed])Measure the shipped transient classes in the band of the map, to shade on its figure.
Return the SED parameters that a point of the space sets, from the axes bound to a parameter.
rate_products(rate)Return the products that need a volumetric rate: the expected number of recoveries over the survey.
Return the redshift out to which events are drawn at points of the space.
volume_time(x)Return the effective volume-time \(\mathcal V T\) of points of the space, in Mpc^3 yr.
Attributes
Whether
measure_overlay()is implemented, for the callers that decide whether to ask for one.The name the one transient goes by in the simulator.
The name the class is registered under, which a file records.
The axes that are parameters of the SED, which
parameters_at()uses to place a point.The quantities of a map of this sampler beyond the success fraction.
The arguments that rebuild this sampler, as plain types that an ECSV header can hold.
The axes of the sampler, with their default ranges.
What a figure of this sampler's maps needs to label the luminosity axis.
The name of the
Scaleproduct that turns the success fraction into the quantity two maps are compared on (the volume-time, for a survey sampler: the recovered volume-time is its product with the fraction).What counts as a recovery and how a point is simulated, with the defaults applied.
The cuts that define a recovery, or None for the default (see
detect()).