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:

  1. Repeat detections: n_det is at least min_detections. A lone detection is hard to tell apart from noise or an artifact.

  2. Bright peak: peak_mag is below peak_mag_limit.

  3. Bracketed explosion: t_first_det - t_last_constraining_nondet is 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 the meta entries in REQUIRED_META.

  • populations (Mapping of str to PopulationSpec) – The populations to report, keyed by the transient_type they 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 the snr_threshold in its meta, or 5 if it has none.

Variables:
  • summary (QTable) – The table, as given.

  • populations (dict of str to PopulationSpec) – The populations being reported, each with its color filled in.

  • detected (numpy.ndarray of bool) – 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 meta entry.

  • 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_distributions()

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.

stage_counts()

Count the Monte Carlo events of each population that reach every stage of the funnel.

yield_table()

Summarize the expected yield of every population as a table of display strings.

yields()

Estimate the expected number of selected events per population.

Attributes

STAGE_NAMES

The stages of the detection funnel, in order.

stage_masks

The row mask of each funnel stage after the first, as STAGE_NAMES lists them.