convnwb.sorting.io.load_sorting_data_file¶
- convnwb.sorting.io.load_sorting_data_file(channel, folder, polarity, user)[source]¶
Load a combinato sorting output file - files with the file name sort_cat.h5.
- Parameters:
- channelint or str
The channel number / label of the file to load.
- folderstr or Path
Directory to load sort_cat file from.
- polarity{‘neg’, ‘pos’}
Which polarity of sorting results to load.
- userstr
The 3 character user label to load.
- Returns:
- outputsdict
Extracted outputs from the data file, including the fields:
channel: stores the channel number / label.
polarity: stores the polarity spikes were sorted.
groups: class & group assignments, shape [n_groups, 2]: 1st col: class; 2nd col: group.
index: indices corresponding to the spike times.
classes: classes corresponding to the spike times.
Notes
The index and classes fields are shorter than the number of spike times (& waveforms). This is due to spikes that are marked as artifacts prior to the clustering process. The ‘index’ field maps the index of each spike in the data files to it’s label in this file.
Not all keys are loaded from the sort_cat file in this function.
The full set of keys in a sort_cat includes: artifacts, artifacts_prematch, classes, distance, groups, groups_orig, index, matches, types, types_orig.