-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3292 from chrishalcrow/quality_metrics_update
Do not delete quality and template metrics on recompute
- Loading branch information
Showing
7 changed files
with
458 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import pytest | ||
|
||
from spikeinterface.core import ( | ||
generate_ground_truth_recording, | ||
create_sorting_analyzer, | ||
) | ||
|
||
|
||
def _small_sorting_analyzer(): | ||
recording, sorting = generate_ground_truth_recording( | ||
durations=[2.0], | ||
num_units=10, | ||
seed=1205, | ||
) | ||
|
||
sorting_analyzer = create_sorting_analyzer(recording=recording, sorting=sorting, format="memory") | ||
|
||
extensions_to_compute = { | ||
"random_spikes": {"seed": 1205}, | ||
"noise_levels": {"seed": 1205}, | ||
"waveforms": {}, | ||
"templates": {"operators": ["average", "median"]}, | ||
"spike_amplitudes": {}, | ||
} | ||
|
||
sorting_analyzer.compute(extensions_to_compute) | ||
|
||
return sorting_analyzer | ||
|
||
|
||
@pytest.fixture(scope="module") | ||
def small_sorting_analyzer(): | ||
return _small_sorting_analyzer() |
102 changes: 102 additions & 0 deletions
102
src/spikeinterface/postprocessing/tests/test_template_metrics.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.