Could we incorporate outlier detection within the wizards staff pipeline?
Modified Z-score on per-neuron summary statistics:
For each neuron from the df/f npy file, compute three metrics:
- max df/f
- mean df/f
- standard deviation
Then for each metric across all neurons, calculate this:
- The median of that metric across the population
- The MAD (mean absolute deviation) - the median of the absolute difference from the median
- A modified Z-score for each neuron: (0.6745*(value-median)/MAD
Any neuron within a modified Z-score above 3.5 (in absolute value) gets flagged.
Although it won't catch artifacts that happen to stay within normal df/f range, we can set up some sort of waveform template matching or frequency-domain analysis in the future.
Could we incorporate outlier detection within the wizards staff pipeline?
Modified Z-score on per-neuron summary statistics:
For each neuron from the df/f npy file, compute three metrics:
Then for each metric across all neurons, calculate this:
Any neuron within a modified Z-score above 3.5 (in absolute value) gets flagged.
Although it won't catch artifacts that happen to stay within normal df/f range, we can set up some sort of waveform template matching or frequency-domain analysis in the future.