uvex_transients.simulation.event_catalog.EventCatalog.compute_detection_efficiency#
- EventCatalog.compute_detection_efficiency(detected: EventCatalog, confidence: float = 0.9) dict[str, dict[str, float]][source]#
Estimate each transient type’s detection efficiency \(\hat\epsilon = k/n\).
nis this catalog’s own row count for a type – the number of feasible Monte Carlo events actually drawn for it (within the survey’s footprint and the transient’s redshift limit, before any detection cut) – andkis detected’s row count for that same type, after whatever cut(s) produced it (see ~uvex_transients.simulation.core.SurveySimulator.run_cut). This is exactly Yield Statistics’s “Estimating the expected yield” and “Confidence bounds from the simulated catalog” sections; see clopper_pearson_interval for the binomial bounds themselves.- Parameters:
detected (
EventCatalog) – The subset of self that satisfied the detection criterion – typically one or more SurveySimulator.run_cut calls applied to self.confidence (
float, optional) – Confidence level for the Clopper-Pearson interval. The default is0.9.
- Returns:
{transient type: {"n", "k", "efficiency", "efficiency_lower", "efficiency_upper"}}, one entry per distinct transient_type present in self.efficiencyis numpy.nan whenn == 0(unidentified; see Yield Statistics – this is deliberately not read as zero).- Return type:
dict[str,dict[str,float]]