Skip to content

Commit

Permalink
Merge pull request #2648 from zm711/fix-module-gallery
Browse files Browse the repository at this point in the history
Fix SortingAnalyzer tutorial
  • Loading branch information
alejoe91 authored Mar 29, 2024
2 parents eef9b1a + ec140eb commit 225d75f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion examples/modules_gallery/core/plot_4_sorting_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@


###############################################################################
# To speed up computation, some steps like ""waveforms" can also be extracted
# To speed up computation, some steps like "waveforms" can also be extracted
# using parallel processing (recommended!). Like this

analyzer.compute(
Expand All @@ -107,6 +107,16 @@
job_kwargs = dict(n_jobs=8, chunk_duration="1s", progress_bar=True)
analyzer.compute("waveforms", ms_before=1.0, ms_after=2.0, return_scaled=True, **job_kwargs)

#################################################################################
# Because certain extensions rely on others (e.g. we need waveforms to calculate
# the templates) if we recompute an extension it will delete any children extensions
# Since we just recalculated "waveforms" when we print our analyzer we will see
# that it no longer has templates

print(analyzer)

# so let's get our templates back.
analyzer.compute("templates", operators=["average", "median", "std"])

###############################################################################
# Each extension can retrieve some data
Expand Down

0 comments on commit 225d75f

Please sign in to comment.