Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for module_gallery with new sparsity default #2100

Merged
merged 3 commits into from
Oct 14, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions examples/modules_gallery/core/plot_4_waveform_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@

###############################################################################
# A :py:class:`~spikeinterface.core.WaveformExtractor` object can be created with the
# :py:func:`~spikeinterface.core.extract_waveforms` function:
# :py:func:`~spikeinterface.core.extract_waveforms` function (this defaults to a sparse
# representation of the waveforms):

folder = 'waveform_folder'
we = extract_waveforms(
Expand Down Expand Up @@ -87,6 +88,7 @@
recording,
sorting,
folder,
sparse=False,
ms_before=3.,
ms_after=4.,
max_spikes_per_unit=500,
Expand Down Expand Up @@ -149,7 +151,7 @@
#
# Option 1) Save a dense waveform extractor to sparse:
#
# In this case, from an existing waveform extractor, we can first estimate a
# In this case, from an existing (dense) waveform extractor, we can first estimate a
# sparsity (which channels each unit is defined on) and then save to a new
# folder in sparse mode:

Expand All @@ -173,7 +175,7 @@


###############################################################################
# Option 2) Directly extract sparse waveforms:
# Option 2) Directly extract sparse waveforms (current spikeinterface default):
#
# We can also directly extract sparse waveforms. To do so, dense waveforms are
# extracted first using a small number of spikes (:code:`'num_spikes_for_sparsity'`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# because it contains a reference to the "Recording" and the "Sorting" objects:

folder = 'waveforms_mearec'
we = si.extract_waveforms(recording, sorting, folder,
we = si.extract_waveforms(recording, sorting, folder, sparsity=False,
ms_before=1, ms_after=2., max_spikes_per_unit=500,
n_jobs=1, chunk_durations='1s')
print(we)
Expand Down
Loading