cibrrig.sorting.export_to_alf

Attributes

_log

AMPLITUDE_CUTOFF

SLIDING_RP

AMP_THRESH

MIN_SPIKES

HUGGING_FACE_LOCAL

Classes

ALFExporter

Functions

test_unit_refine_model_import()

Test if the UnitRefine model is available.

Module Contents

cibrrig.sorting.export_to_alf._log[source]
cibrrig.sorting.export_to_alf.AMPLITUDE_CUTOFF = 0.1[source]
cibrrig.sorting.export_to_alf.SLIDING_RP = 0.1[source]
cibrrig.sorting.export_to_alf.AMP_THRESH = 40.0[source]
cibrrig.sorting.export_to_alf.MIN_SPIKES = 500[source]
cibrrig.sorting.export_to_alf.HUGGING_FACE_LOCAL[source]
cibrrig.sorting.export_to_alf.test_unit_refine_model_import()[source]

Test if the UnitRefine model is available.

class cibrrig.sorting.export_to_alf.ALFExporter(analyzer: spikeinterface.core.SortingAnalyzer, dest: pathlib.Path, bin_path: pathlib.Path | None = None, copy_binary: bool = False, job_kwargs: dict = dict(n_jobs=1, chunk_size='1s'), testing: bool = False)[source]
analyzer[source]
alf_path[source]
bin_path = None[source]
copy_binary = False[source]
job_kwargs[source]
testing = False[source]
templates[source]
used_sparsity[source]
sparse_templates[source]
get_channel_indices()[source]

Get the channel indices for each unit.

get_lfp_recording()[source]

Get the LFP recording if available.

save_templates()[source]

Save templates in ALF format

Cluster waveforms and template waveforms are identical

_apply_unit_refine_labels()[source]

Apply UnitRefine (https://spikeinterface.readthedocs.io/en/stable/tutorials/curation/plot_1_automated_curation.html#sphx-glr-tutorials-curation-plot-1-automated-curation-py) to auto label the noise, multi-unit activity (MUA), and single-unit activity (SUA) clusters.

create_full_metrics()[source]

Extract the metrics from the analyzer, join them together, apply the unitrefine model, and save

create_pca_features()[source]

Extract the PC features from the analzyer and save to the target folder.

This takes a while.

save_extracted_waveforms()[source]

Write already extracted waveforms to target folder

write_params()[source]

Copy the binary and write the params.py file. The params.py file will point to the local recording.

save_depths()[source]

Save the depths of each unit relative to channel 0

run()[source]

Run all steps to export sorting as ALF/IBL structure