neuralib.util.segments.shuffle_time_normal
- neuralib.util.segments.shuffle_time_normal(t, loc=0, scale=1, segs=None, *, duration=inf, circular=True)[source]
Shuffle t with add a value from a normal distribution for t in segs.
- Parameters:
t (ndarray) – (N,) T-value array
loc (float) – mean of the normal distribution
scale (float) – std of the normal distribution
segs (ndarray | None) – (S, 2) segment, only shift time in the segments.
duration (float) – The maximal T value
circular (bool) – keep total event number. If epochs is given, keep total event number in epochs.
- Returns:
(N’,) T-value array
- Return type:
ndarray