Repository navigation
[WIP] IBL raw data quality metrics - #4823
Draft
JoeZiminski wants to merge 7 commits into
Draft
JoeZiminski wants to merge 7 commits into
JoeZiminski wants to merge 7 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements some (but not all) of the IBL's raw data quality metrics. According to the IBL's white paper (version two) their quality metrics are:
then take the median RMS across all of the chunks (giving noise estimate per-channel) and the 10-90 quantile across channels (giving spread of noise across channels). They also average all of the Welch PSDs into a single representattive. They do this across AP and LFP, before and after preprocessing.
They also compute a rolling RMS over consecutive 3s chunks for the recording types. I'm not sure rolling is the best word as the chunks don't overlap but I can't think of anything else at the moment.
They also do a quick spike detection using a threshold method. Here I skipped this, as it is not simple AFAICT to have a static threshold across different recordings (rather than the threshold being a multiple of the noise) and it is not easy to find such a threshold across recordings. Instead i would be better for a general-purpose DataQualityMetrics module to compute various metrics after the pipeline has run, using spikes from the sorter.
Their metrics are summarized in:
This PR computes the median RMS, 10-90 quantiles and produces plots for the PSD and rolling RMS.
This is a draft implementation that does not contain tests nor a proper plotting yet, it mainly serves as a starting point for discussions. Currently if I was a user I would not be sure how to interpret these metrics and so I'll open an issue which discusses some other possible metrics.
Some technical things for discussion: