From 7aa85137f07d564c110aece97ad15a1769f2e263 Mon Sep 17 00:00:00 2001 From: Hugo Oliveira Date: Tue, 25 Aug 2020 16:25:24 +1000 Subject: [PATCH] BREAKING CHANGES(qc): ErrorVelocity adcp markings This changes the way we classify adcp data based on Error Velocity fields by using the mean value plus a threshold (error_velocity). --- AutomaticQC/imosErrorVelocitySetQC.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/AutomaticQC/imosErrorVelocitySetQC.m b/AutomaticQC/imosErrorVelocitySetQC.m index be1013fbb..ab3404af2 100644 --- a/AutomaticQC/imosErrorVelocitySetQC.m +++ b/AutomaticQC/imosErrorVelocitySetQC.m @@ -96,8 +96,9 @@ % NaN for erv doesn't mean data is bad, it is just a 3 beam solution and ECUR is not available iNaNerv = isnan(erv); -% Run QC -iPass = abs(erv) <= err_vel; +% Run QC NEED TO edit this as it should be the mean +/- the threshold. +ervm = nanmean(erv(:)); +iPass = erv >= ervm - err_vel | erv <= ervm + err_vel; iPass(iNaNerv) = true; iFail = ~iPass;