pelagos_py.steps.quality_control.visual_qc#
- class pelagos_py.steps.quality_control.visual_qc.visual_qc(data, **kwargs)[source]#
Bases:
pelagos_py.steps.base_qc.BaseQCFlag samples inside (or outside) boxes drawn on an
x_variablevsy_variableplot. Boxes can be drawn interactively or added to YAML; either way they are plain YAML, so the run can be repeated anywhere.variableslists the variables to QC: a name, or a list of names flagged together. Each box flags its ownvariables(default: itsy_variable).A box replaces existing flags, bad -> good included, and later boxes win where they overlap. With
override: falseit merges by the Argo combinatrix instead, so a flag can only get worse.A box with single
xandyvalues is a point: it flags the nearest sample.A box can name its own
x_variable/y_variable, else it uses the test’s.profiles(orcycles) limits a box to thosePROFILE_NUMBER(orCYCLE) values, so Find Profiles must have run.Missing samples stay 9. Samples no box touches get 1 when
flag_remaining_goodis on (the default), else keep their flag.
Target Variable: Any Flag Number: Any (user-defined, 0-9) Variables Flagged:
variables, plus each box’s ownExample
- name: "Apply QC" parameters: qc_settings: visual qc: variables: [CHLA, [TEMP, PSAL]] # CHLA alone, TEMP and PSAL together x_variable: TIME # axes for boxes that don't name their own y_variable: PRES boxes: - {x: ["2024-05-02T10:00:00", "2024-05-02T14:30:00"], y: [0, 15], flag: 4, mode: inside, variables: [TEMP, PSAL]} # everything outside, merged so no flag gets better - {x: ["2024-05-01", "2024-05-20"], y: [0, 1000], flag: 3, mode: outside, override: false} # a point: the nearest sample only - {x: ["2024-05-03T08:12:30"], y: [42.5], flag: 4} - x: ["2024-05-04", "2024-05-05"] y: [10, 12] flag: 3 y_variable: TEMP # drawn on TEMP vs TIME, flags TEMP # only within profile 42 - {x: [0.8, 3], y: [0, 20], flag: 4, x_variable: CHLA, y_variable: DEPTH, variables: [CHLA], profiles: [42]} flag_remaining_good: true # untouched samples become 1 (good) diagnostics: true