line_shift
- NoiseGenerator.line_shift(data_map, ave_pixels, axis, shift_positive=True)
Adds latching-like effects to
data_map.Note, if excited data is available,
latching_noise()is better to use instead.This is done by shifting each line in
data_mapby a random number of pixels along the direction of the line.Specifically, each line is shifted by
x-1pixels, wherexis drawn from a geometric distribution with meanave_pixels + 1.- Parameters:
data_map (ndarray[float]) – The data to shift. Must be at least 2d.
ave_pixels (float) – The average number of pixels by which to shift each line. Specifically, each line is shifted by
x-1pixels, wherexis drawn from a geometric distribution with meanave_pixels + 1.axis (int) – Which axis to shift lines along. Each line running parallel to
axiswill be shifted by some amount in the direction parallel toaxis.shift_positive (bool) – Whether to shift in the positive or negative direction. If True, each line will be shifted towards positive infinity.
- Returns:
data_mapwith each line randomly shifted by some amount.- Return type:
ndarray[float]