Skip to content

compute_peak_to_mean_ratio

function grb_trigger.features

grb_trigger.features.compute_peak_to_mean_ratio(fg_window)

Compute the peak-to-mean ratio of the foreground window.

Parameters

fg_window tuple of numpy.ndarray

Foreground window returned by split_windows.

Returns

numpy.ndarray, shape (2,)

max / mean for the low and high channel (0 if the mean is 0).

Raises

ValueError

If a channel of fg_window is empty.