Open elduvelle opened 7 months ago
Interlude: how does our sorting pipeline work??
run_MS_on_folder
)
2.1. get filenames if not previously provided or get list of files to sort together
2.2. For each Tetrode:
2.2.1. Create a parameter file params.json
and geometry file geom.csv
that will apply to each tetrode (?) in the .mountainsort folder (creatparam
)
2.2.2. create a recording extractor object (?) for MDA files se.MdaRecordingExtractor
using the params and geometry provided. NOTE we might be able to obtain the start and end of recording here???
2.2.3. Filter the data in spike band (300-6000 Hz)
2.2.4. run mountainsort with run_Mountainsort
2.2.4.1. create parameters ? ss.Mountainsort4Sorter.default_params()
2.2.4.2. run mountainsort ss.run_mountainsort4
2.2.4.3. extract waveforms to output folder as well si.extract_waveforms
2.2.4.4. export to phy export_to_phy
Useful links: remove bad channels in spike interface : https://spikeinterface.readthedocs.io/en/latest/how_to/analyse_neuropixels.html?highlight=remove%20bad%20channels#preprocess-the-recording concatenate segments in spike interface: https://spikeinterface.readthedocs.io/en/latest/modules_gallery/core/plot_5_append_concatenate_segments.html?highlight=concatenate#append-and-or-concatenate-segments another spike interface page on concatenated sorting: https://spikeinterface.readthedocs.io/en/0.13.0/modules/sorters/plot_4_sorting_concatenated_recordings.html
Info on time sync: https://spikeinterface.readthedocs.io/en/latest/modules_gallery/core/plot_6_handle_times.html
link to spikeinterface page about this
[x] find how to select multiple folders at the same time in python (or maybe just select the parent folder and include all session folders inside it ordered alphabetically??
[ ] keep track of start and end times of each session
[ ] USE Unix time to recreate the timestamps to keep track of actual time elapsed between sessions
[ ] concatenate
[ ] run the sorting into a new, separate folder starting with the name of the first session and the number of sessions
[ ] check that phy can open the concatenated files for manual refinement
[ ] make sure we can accurately mark the start and end of each session in the final sorted files
the other data streams (LFP etc.) should be concatenated in the same way in a different program (e.g. Matlab)