systole.utils.norm_triggers#

systole.utils.norm_triggers(triggers: List | ndarray, threshold: int = 1, n: int = 5, direction: str = 'higher') ndarray[source]#

Ceaning noisy triggers into boolean vecor with a unique spike for each event.

Parameters:
triggers

The triggers array.

threshold

Threshold for triggering values. Default is 1.

n

The number of values to force to 0 after each triggers. Default is 5.

direction

Indicates if triggers are higher or lower than threshold. Can be`”higher”` or “lower”. Default sets to “higher”.

Returns:
y

The filterd triggers array.