Skip to content

Commit c2b6f37

Browse files
committed
Output corrected recordings.
1 parent 65c93e3 commit c2b6f37

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/spikeinterface/generation/drifting_generator.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,15 @@ def make_one_displacement_vector(
141141
else:
142142
displacement_vector[ind0:ind1] = -0.5
143143

144+
elif drift_mode == "slope":
145+
146+
slope = np.linspace(0, 1, end_drift_index - start_drift_index) # TODO: check amplitude
147+
148+
displacement_vector[start_drift_index:end_drift_index] = slope
149+
displacement_vector[end_drift_index:] = slope[-1]
150+
144151
else:
145-
raise ValueError("drift_mode must be 'zigzag' or 'bump'")
152+
raise ValueError("drift_mode must be 'zigzag', 'bump' or 'slope'")
146153

147154
return displacement_vector * amplitude_factor
148155

0 commit comments

Comments
 (0)