Build a full Sorting pipeline with dicts ======================================== When using ``SpikeInterface`` there are two phases. First, you should play: try to figure out any special steps or parameters you need to play with to get everything working with your data. Once you’re happy, you then need to build a sturdy, consistent pipeline to process all your ephys sessions. It is now possible to create a flexible spike sorting pipeline using three simple dictionaries: one for preprocessing (and the ``PreprocessingPipeline``), another for sorting (and ``run_sorter``), and a final one for postprocessing (and the ``compute`` method). Here’s an example: .. code:: import spikeinterface.full as si my_protocol = { 'preprocessing': { 'bandpass_filter': {}, 'common_reference': {'operator': 'average'}, 'detect_and_remove_bad_channels': {}, }, 'sorting': { 'sorter_name': 'mountainsort5', 'verbose': False, 'snippet_T2': 15, 'remove_existing_folder': True, 'progress_bar': False }, 'postprocessing': { 'random_spikes': {}, 'noise_levels': {}, 'templates': {}, 'unit_locations': {'method': 'center_of_mass'}, 'spike_amplitudes': {}, 'correlograms': {}, }, } # Usually, you would read in your raw recording rec, _ = si.generate_ground_truth_recording(num_channels=4, durations=[60], seed=0) preprocessed_rec = si.apply_preprocessing_pipeline(rec, my_protocol['preprocessing']) sorting = si.run_sorter(recording=preprocessed_rec, **my_protocol['sorting']) analyzer = si.create_sorting_analyzer(recording=preprocessed_rec, sorting=sorting) analyzer.compute(my_protocol['postprocessing']) .. parsed-literal:: detect_bad_channels (no parallelization): 0%| | 0/100 [00:00