... | ... | @@ -19,13 +19,13 @@ Create a single integer summarizing all the tests of interest from the 'tests' a |
|
|
Search the companion QC field for at least one of the tests to be tripped. The result of the search is an array of true-false values.
|
|
|
|
|
|
mask = qc_direct_normal_broadband & mask_test > 0
|
|
|
print mask
|
|
|
print(mask)
|
|
|
[ True True True True False False False False True False]
|
|
|
|
|
|
Then use the mask to replace values failing QC test with IEEE Not A Number to remove the data value from analysis
|
|
|
|
|
|
direct_normal_broadband[mask] = np.nan
|
|
|
print direct_normal_broadband
|
|
|
print(direct_normal_broadband)
|
|
|
[ nan nan nan nan 11. 20. 50. 110. nan 134.]
|
|
|
|
|
|
If a different set of tests were desired the only part that needs to change is 'tests', the rest of the code is independent of datastream or analysis. This will also work with multi-dimensional data. |
|
|
\ No newline at end of file |