pub fn response_onset(
binary_train: &[i32],
baseline_steps: usize,
dt: f64,
threshold_sigma: f64,
) -> f64Expand description
Detect response onset as first bin exceeding baseline + threshold_sigma * std. Returns onset time (seconds), or NaN.