SummaryReport#
- class uvex_transients.utils.summary_report.SummaryReport(summary: QTable, populations: Mapping[str, PopulationSpec], min_detections: int = 2, peak_mag_limit: float = 23.0, snr_threshold: float | None = None)[source]#
The science selection, yields and standard figures for the populations in an event summary table.
The selection is three cumulative cuts on the table’s rows:
Repeat detections:
n_detis at least min_detections. A lone detection is hard to tell apart from noise or an artifact.Bright peak:
peak_magis below peak_mag_limit.Bracketed explosion:
t_first_det - t_last_constraining_nondetis at most the population’s PopulationSpec.max_gap, so that the explosion time is pinned down. An event with no constraining non-detection has no bracket and is dropped.
Every count is converted to expected UVEX events with the table’s own bookkeeping: one Monte Carlo event stands for \(\mu_0 / n\) real ones, with \(n\) the number generated and \(\mu_0\) the intrinsic expected number (see ~uvex_transients.simulation.rates.estimate_yield).
- Parameters:
summary (
QTable) – A table from ~uvex_transients.simulation.core.SurveySimulator.run_event_summary_action, such as the one a release publishes. It needs the columns in REQUIRED_COLUMNS and themetaentries in REQUIRED_META.populations (
MappingofstrtoPopulationSpec) – The populations to report, keyed by thetransient_typethey have in summary. Any that summary did not generate are left out, and every other type in it is ignored.min_detections (
int, optional) – Fewest detected epochs an event may have. The default is 2.peak_mag_limit (
float, optional) – The peak AB magnitude must be below this. The default is 23.snr_threshold (
float, optional) – The detection threshold of summary, used only to label figures. The default is thesnr_thresholdin itsmeta, or 5 if it has none.
- Variables:
summary (
QTable) – The table, as given.populations (
dictofstrtoPopulationSpec) – The populations being reported, each with its color filled in.detected (
numpy.ndarrayofbool) – True for the rows of the reported populations, which have all been detected.selected (repeated, bright,) – The cumulative cuts, one entry per row of summary: the first alone, the first two, and all three.
- Raises:
ValueError – If summary lacks a required column or
metaentry.LookupError – If summary has none of the requested populations.
Methods
footprint_overlap([footprints, mask])Find what percentage of each population's events falls inside each survey's footprint.
from_release(populations[, tag])Build a report from the event summary table of a published release.
plot_detection_counts([groups, mask, ...])Plot the percentage of events detected at least \(N\) times, one panel per group of populations.
Plot the distributions of the properties behind each cut, plus the redshift.
plot_example_event(key, events, transients, ...)Plot the synthetic light curve of one randomly chosen selected event of a population.
plot_footprint_overlap([footprints, mask, ...])Plot footprint_overlap as a grid with a population per row and a survey per column.
plot_funnel([fig_size])Plot how many events of each population survive each stage of the selection.
plot_sky([footprints, mask])Plot where the detected and the selected events fall on the sky, in an Aitoff projection.
plot_yields([mask, fig_size])Plot the expected number of events of each population as a bar chart, with both uncertainties.
Count the Monte Carlo events of each population that reach every stage of the funnel.
Summarize the expected yield of every population as a table of display strings.
yields()Estimate the expected number of selected events per population.
Attributes
The stages of the detection funnel, in order.
The row mask of each funnel stage after the first, as STAGE_NAMES lists them.