Skip to content

Commit

Permalink
improve comment attribute; merge manualQc and historicalQc together
Browse files Browse the repository at this point in the history
  • Loading branch information
lbesnard committed Jul 24, 2023
1 parent c43afae commit 5192361
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
6 changes: 5 additions & 1 deletion AutomaticQC/qcFilterMain.m
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,11 @@ function addFailedTestsFlags()
else

failedTests = zeros(size(failedTestsIdx));
failedTests(logical(failedTestsIdx)) = imosQCTest(filterName);
if strcmp(filterName, 'imosHistoricalManualSetQC')
failedTests(logical(failedTestsIdx)) = imosQCTest('userManualQC'); % we replace imosHistoricalManualSetQC with userManualQC so that we only have 1 flag_value/flag_meaning combo in the NetCDF for something very similar in the end
else
failedTests(logical(failedTestsIdx)) = imosQCTest(filterName);
end
failedTests = int32(failedTests);

if ~isfield(sam.(type{m}){k},'failed_tests') % if the flat_tests field does not exist yet
Expand Down
1 change: 0 additions & 1 deletion IMOS/imosQCTests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
%
% QC routine, positional integer
userManualQC, 0
imosHistoricalManualSetQC, 0
imosCorrMagVelocitySetQC, 1
imosDensityInversionSetQC, 2
imosEchoIntensitySetQC, 3
Expand Down
2 changes: 1 addition & 1 deletion NetCDF/template/failed_tests_attributes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ S, standard_name = [mat regexprep(strcat(imosParameters(s
Q, _FillValue = [mat int32(0)]
N, add_offset =
N, scale_factor =
S, comment = variable to inform on which QC routine(s) was(were) responsible for not flagging a data point as Good. The result value is the sum of flag_masks associated to each QC routine. Every number needs to be split into the sum of power 2 to match witch every flag_masks/flag_meanings combination.
S, comment = The flag_masks attribute is the same type as the variable to which it is attached, and contains a list of values matching unique bit fields. The flag_meanings attribute is defined as above, one for each flag_masks value. A flagged condition is identified by performing a bitwise AND of the variable value and each flag_masks value; a non-zero result indicates a true condition. Thus, any or all of the flagged conditions may be true, depending on the variable bit settings.
S, history =
S, references =

Expand Down

0 comments on commit 5192361

Please sign in to comment.