ibllib.qc.alignment_qc

Functions

get_aligned_channels

Classes

AlignmentQC

Class that is used to update the extended_qc of the probe insertion fields with the results from the ephys alignment procedure

class AlignmentQC(probe_id, one=None, brain_atlas=None, channels=True, collection=None)[source]

Bases: QC

Class that is used to update the extended_qc of the probe insertion fields with the results from the ephys alignment procedure

load_data(prev_alignments=None, xyz_picks=None, depths=None, cluster_chns=None, chn_coords=None)[source]

” Load data required to assess alignment qc and compute similarity matrix. If no arguments are given load_data will fetch all the relevant data required

compute()[source]

Computes the similarity matrix if > 2 alignments. If no data loaded, wraps around load_data to get all relevant data needed

run(update=True, upload_alyx=True, upload_flatiron=True)[source]

Compute alignment_qc for a specified probe insertion and updates extended qc field in alyx. If alignment is resolved and upload flags set to True channels from resolved alignment will be updated to alyx and datasets sent to ibl-ftp-patcher to be uploaded to flatiron

resolve_manual(align_key, update=True, upload_alyx=True, upload_flatiron=False, force=False)[source]

Method to manually resolve the alignment of a probe insertion with a given alignment regardless of the number of alignments or the alignment qc value. Channels from specified alignment will be uploaded to alyx and datasets sent to ibl-ftp-patcher to be uploaded to flatiron. If alignment already resolved will only upload if force flag set to True

compute_similarity_matrix()[source]

Computes the similarity matrix between each alignment stored in the ephys aligned trajectory. Similarity matrix based on number of clusters that share brain region and parent brain region

compute_alignment_status()[source]

Determine whether alignments agree based on value in similarity matrix. If any alignments have similarity of 0.8 set the alignment to be resolved

upload_channels(alignment_key, upload_alyx, upload_flatiron)[source]

Upload channels to alyx and flatiron based on the alignment specified by the alignment key

update_experimenter_evaluation(prev_alignments=None, override=False)[source]
get_aligned_channels(ins, chn_coords, one, ba=None, save_dir=None)[source]