Quality control of raw Neuropixel electrophysiology data.

ibllib.ephys.ephysqc.extract_rmsmap(fbin, out_folder=None, overwrite=False)

Wrapper for rmsmap that outputs _ibl_ephysRmsMap and _ibl_ephysSpectra ALF files

  • fbin – binary file in spike glx format (will look for attached metatdata)
  • out_folder – folder in which to store output ALF files. Default uses the folder in which the fbin file lives.
  • overwrite – do not re-extract if all ALF files already exist
  • label – string or list of strings that will be appended to the filename before extension


ibllib.ephys.ephysqc.qc_fpga_task(fpga_trials, alf_trials)

:fpga_task is the dictionary output of ibllib.io.extractors.ephys_fpga.extract_behaviour_sync : bpod_trials is the dictionary output of ibllib.io.extractors.ephys_trials.extract_all : alf_trials is the ALF _ibl_trials object after extraction (alf.io.load_object) :return: qc_session, qc_trials, True means QC passes while False indicates a failure

ibllib.ephys.ephysqc.raw_qc_session(session_path, overwrite=False)

Wrapper that exectutes QC from a session folder and outputs the results whithin the same folder as the original raw data. :param session_path: path of the session (Subject/yyyy-mm-dd/number :param overwrite: bool (False) Force means overwriting an existing QC file :return: None


Computes RMS map in time domain and spectra for each channel of Neuropixel probe

Parameters:fbin (str or pathlib.Path) – binary file in spike glx format (will look for attached metatdata)
Returns:a dictionary with amplitudes in channeltime space, channelfrequency space, time and frequency scales
ibllib.ephys.ephysqc.unit_metrics_ks2(ks2_path=None, m=None, save=True)

Given a path containing kilosort 2 output, compute quality metrics and optionally save them to a clusters_metric.csv file :param ks2_path: :param save :return:

ibllib.ephys.ephysqc.validate_ttl_test(ses_path, display=False)

For a mock session on the Ephys Choice world task, check the sync channels for all device properly connected and perform a synchronization if dual probes to check that all channels are recorded properly :param ses_path: session path :param display: show the probe synchronization plot if several probes :return: True if tests pass, errors otherwise