asascience-open / QARTOD

Collection of utilities, scripts and tests to assist in automated quality assurance and quality control for oceanographic datasets and observing systems.
Apache License 2.0
2 stars 4 forks source link

Currents - Stuck Sensor Test #56

Closed lukecampbell closed 8 years ago

lukecampbell commented 9 years ago

Verify that the existing stuck sensor test meets the criteria specified here: screen shot 2015-10-01 at 11 41 44 am

If it doesn't then:

ocefpaf commented 9 years ago

@lukecampbell if my understanding is correct this test is the similar to flat_line_check with the default values low_reps=2 and high_reps=5, correct?

lukecampbell commented 9 years ago

Yeah that's my understanding as well

ocefpaf commented 8 years ago

After some reading I found that Stuck Sensor Test is "outdated." In page v of qartod_wave_data_manual.pdf:

Change Stuck Sensor Test (Test 16) to Flat Line Test
(pages 13, 14, 35, and Table of Contents)

(Read all 9 manuals and of course the information was in the last one!)

The full name of the test, in pages 13, 14, 32 (not 35), is LT Time Series Flat Line (Test 16).

Questions:

  1. Should we add this one too? Or should we just wrap Flat Line (Test 8) with modified inputs? (This version suggests the defaults of low_reps=3, high_reps=5.)
  2. If I get the @add_qartod_ident decorator correctly the number is the QARTOD ID and the text is the test name. If so this test must be decorate with @add_qartod_ident(16, 'Time Series Flat Line Test'). Is that correct?
  3. The manual uses the lingo rep_cnt_suspect and rep_cnt_fail instead of low_reps and high_reps. I made a mock-up PR (#58) using that but I guess we must be consistent and either change this test back to {low,high}_reps or change the original flat line test to use rep_cnt_{fail,suspect}.

The mock PR #58 implement this test. However, just close it if that does not make sense and I can implement my suggestion in (1).

flat_line

ocefpaf commented 8 years ago

I am starting to think that,

@add_qartod_ident(16, 'Time Series Flat Line Test')
def ts_flat_line_check(arr, low_reps=3, high_reps=5, eps=None, prev_qc=None):
    return flat_line_check(arr, low_reps, high_reps, eps, prev_qc)

is the way to go here...