ioos / ioos_qc

:ballot_box_with_check: :ocean: IOOS QARTOD and other Quality Control tests implemented in Python
https://ioos.github.io/ioos_qc/
Apache License 2.0
46 stars 27 forks source link

spike test bugfix: first & last values are unknown #34

Closed jessicaaustin closed 4 years ago

jessicaaustin commented 4 years ago

If abs(inp[0])>threshold or abs(inp[-1]>threshold), then the test marked that value as QC FAIL. But the spike test is not really defined for the first or last values in the array. So always set those flags to QC unknown.

jessicaaustin commented 4 years ago

@kwilcox do you have time to review? I hope this is straightforward enough. Honestly I don't know how we didn't catch this before.

kwilcox commented 4 years ago

Love thy neighbors, no?