Skip to content

Commit

Permalink
Merge pull request #3461 from jakeswann1/plot_traces_vspacing
Browse files Browse the repository at this point in the history
Add vspacing_factor as a param for TracesWidget
  • Loading branch information
alejoe91 authored Nov 4, 2024
2 parents 309ce30 + c1504f6 commit e525d85
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/spikeinterface/widgets/traces.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ class TracesWidget(BaseWidget):
If dict, keys should be the same as recording keys
scale : float, default: 1
Scale factor for the traces
vspacing_factor : float, default: 1.5
Vertical spacing between channels as a multiple of maximum channel amplitude
with_colorbar : bool, default: True
When mode is "map", a colorbar is added
tile_size : int, default: 1500
Expand Down Expand Up @@ -82,6 +84,7 @@ def __init__(
tile_size=1500,
seconds_per_row=0.2,
scale=1,
vspacing_factor=1.5,
with_colorbar=True,
add_legend=True,
backend=None,
Expand Down Expand Up @@ -168,7 +171,7 @@ def __init__(
traces0 = list_traces[0]
mean_channel_std = np.mean(np.std(traces0, axis=0))
max_channel_amp = np.max(np.max(np.abs(traces0), axis=0))
vspacing = max_channel_amp * 1.5
vspacing = max_channel_amp * vspacing_factor

if rec0.get_channel_groups() is None:
color_groups = False
Expand Down

0 comments on commit e525d85

Please sign in to comment.