li_ma_snr#
- jinwu.lightcurve.li_ma_snr(n_on: float, n_off: float, alpha: float, *, signed: bool = True) float[source]#
Compute Li & Ma significance (Eq. 17 in Li & Ma 1983).
- Parameters:
n_on (float) – Total counts in ON region.
n_off (float) – Total counts in OFF region (reference background).
alpha (float) – Exposure/area scaling: alpha = (A_on/A_off) * (t_on/t_off).
signed (bool) – If
True(default), return a signed significance — positive for source excess, negative for background deficit. Passsigned=Falseto get the unsigned magnitude (deviation from background hypothesis regardless of direction).
- Returns:
Li & Ma significance. Returns 0.0 for degenerate inputs.
- Return type: