ArgoCanada / medsrtqc

An experimental container for Argo Canada realtime quality control code
https://argocanada.github.io/medsrtqc/
MIT License
0 stars 1 forks source link

BBP spike test #9

Closed cgrdn closed 2 years ago

cgrdn commented 2 years ago

Test set up to find negative spikes, as positive spikes contain valid information.

Calculate the residual between the profile and a 5-point running median filter:

RES = BBPxxx(z0) - median(z0 - 2 : z0 + 2)

Then, calculate the 10th percentile of the difference. If RES is smaller than 2 times the 10th percentile, it is considered a spike:

[1] RES < 2*percentile(RES, 10)

if [1] is TRUE, BBPxxx_QC= 4 at that point.