Closed cgrdn closed 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.
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.