-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test in the no concatneation case.
- Loading branch information
1 parent
44c5cef
commit f3e1af7
Showing
9 changed files
with
1,829 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
Large diffs are not rendered by default.
Oops, something went wrong.
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,46 @@ | ||
import json | ||
from pathlib import Path | ||
|
||
from spikeinterface import load_extractor | ||
from spikeinterface.sorters import run_sorter_local | ||
|
||
if __name__ == "__main__": | ||
# this __name__ protection help in some case with multiprocessing (for instance HS2) | ||
# load recording in container | ||
json_rec = Path( | ||
"/fMRIData/git-repo/spikewrap/tests/data/small_toy_data/in_container_recording.json" | ||
) | ||
pickle_rec = Path( | ||
"/fMRIData/git-repo/spikewrap/tests/data/small_toy_data/in_container_recording.pickle" | ||
) | ||
if json_rec.exists(): | ||
recording = load_extractor(json_rec) | ||
else: | ||
recording = load_extractor(pickle_rec) | ||
|
||
# load params in container | ||
with open( | ||
"/fMRIData/git-repo/spikewrap/tests/data/small_toy_data/in_container_params.json", | ||
encoding="utf8", | ||
mode="r", | ||
) as f: | ||
sorter_params = json.load(f) | ||
|
||
# run in container | ||
output_folder = ( | ||
"/fMRIData/git-repo/spikewrap/tests/data/small_toy_data/mountainsort5_output" | ||
) | ||
sorting = run_sorter_local( | ||
"mountainsort5", | ||
recording, | ||
output_folder=output_folder, | ||
remove_existing_folder=False, | ||
delete_output_folder=False, | ||
verbose=False, | ||
raise_error=True, | ||
with_output=True, | ||
**sorter_params, | ||
) | ||
sorting.save_to_folder( | ||
folder="/fMRIData/git-repo/spikewrap/tests/data/small_toy_data/mountainsort5_output/in_container_sorting" | ||
) |
Binary file added
BIN
+1.54 KB
tests/data/small_toy_data/mountainsort5_output/sorter_output/firings.npz
Binary file not shown.
8 changes: 8 additions & 0 deletions
8
tests/data/small_toy_data/mountainsort5_output/spikeinterface_log.json
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,8 @@ | ||
{ | ||
"sorter_name": "mountainsort5", | ||
"sorter_version": "0.3.0", | ||
"datetime": "2023-12-18T18:48:45.578078", | ||
"runtime_trace": [], | ||
"error": false, | ||
"run_time": 0.26515789999393746 | ||
} |
25 changes: 25 additions & 0 deletions
25
tests/data/small_toy_data/mountainsort5_output/spikeinterface_params.json
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,25 @@ | ||
{ | ||
"sorter_name": "mountainsort5", | ||
"sorter_params": { | ||
"scheme": "2", | ||
"detect_threshold": 5.5, | ||
"detect_sign": -1, | ||
"detect_time_radius_msec": 0.5, | ||
"snippet_T1": 20, | ||
"snippet_T2": 20, | ||
"npca_per_channel": 3, | ||
"npca_per_subdivision": 10, | ||
"snippet_mask_radius": 250, | ||
"scheme1_detect_channel_radius": 150, | ||
"scheme2_phase1_detect_channel_radius": 200, | ||
"scheme2_detect_channel_radius": 50, | ||
"scheme2_max_num_snippets_per_training_batch": 200, | ||
"scheme2_training_duration_sec": 300, | ||
"scheme2_training_recording_sampling_mode": "uniform", | ||
"scheme3_block_duration_sec": 1800, | ||
"freq_min": 300, | ||
"freq_max": 6000, | ||
"filter": false, | ||
"whiten": false | ||
} | ||
} |
869 changes: 869 additions & 0 deletions
869
tests/data/small_toy_data/mountainsort5_output/spikeinterface_recording.json
Large diffs are not rendered by default.
Oops, something went wrong.
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