Skip to content

Commit

Permalink
Merge pull request #2100 from zm711/module-gallery
Browse files Browse the repository at this point in the history
Fix for `module_gallery` with new sparsity default
  • Loading branch information
alejoe91 authored Oct 14, 2023
2 parents 728351a + bf8c5d1 commit 8a5f544
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
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, sparse=False,
ms_before=1, ms_after=2., max_spikes_per_unit=500,
n_jobs=1, chunk_durations='1s')
print(we)
Expand Down

0 comments on commit 8a5f544

Please sign in to comment.