sage.plotting.efficiency_curves

Filename : efficiency_curves.py Description : Short description of the file

Created on 2026-03-21 17:31:11

__author__ = Narenraju Nagarajan __copyright__ = Copyright 2026, ProjectName __license__ = MIT Licence __version__ = 0.0.1 __maintainer__ = Narenraju Nagarajan __affiliation__ = N/A __email__ = N/A __status__ = [‘inProgress’, ‘Archived’, ‘inUsage’, ‘Debugging’]

GitHub Repository: NULL

Documentation: NULL

Functions

plot_efficiency_curves(epoch, source_params, ...[, ...])

Plot detection efficiency as a function of each source parameter.

Module Contents

plot_efficiency_curves(epoch, source_params, pred_stat, labels, export_dir=None, save=True, save_name='stat', bin_width=500, step=10)[source]

Plot detection efficiency as a function of each source parameter.

For each continuous source parameter (chirp mass, distance, SNR, etc.) bins the detected fraction (pred_stat > threshold) as a function of the parameter value and overlays curves for a sweep of thresholds.

Parameters:
  • epoch (int or str) – Epoch identifier used in the output directory name.

  • source_params (dict[str, array-like]) – Dictionary mapping parameter name to per-signal values.

  • pred_stat (array-like, shape (N_signal,)) – Predicted ranking statistic for signal events only.

  • labels (array-like, shape (N,)) – Binary labels (1 = signal) for the full validation set.

  • export_dir (str or None) – Parent directory; plots are saved under EFFICIENCY/epoch_{epoch}/.

  • save (bool) – If True, save figures to disk; otherwise display interactively.

  • save_name (str) – Prefix for saved filenames (default "stat").

  • bin_width (int) – Number of samples per parameter bin (default 500).

  • step (float) – Step size for threshold sweep (default 10).