{# Quality flags of one instrument — the `qc` panel payload (kind="html"): the flags by variable, the originator's and oceanarray's in separate column groups (classes other than good only, as the deployment page's QC table), the one-line notes, and the limits of oceanarray's tests. `table` is _instrument_text.FlagTable. #} {% import "_mooring_cols.html" as cols %}

Flags by variable

{% if table.rows %}

Share of each variable's values in each flag class other than good, as flagged {% for g in table.groups %}{% if not loop.first %} and {% endif %}{% if g.suffix.endswith("mapped") %}by the originator (their flags translated to oceanarray's by meaning){% else %}by oceanarray (its automatic tests){% endif %}{% endfor %}. Variables with every value good are not listed. Colours are the flag classes. {{ good_sentence }}

{% for f in table.legend %}{{ f.label }} {% endfor %}
{% for g in table.groups %}{% endfor %} {% for g in table.groups %}{{ cols.th("Good", "%", true) }}{% for f in g.flags %}{{ cols.th(f.label | capitalize, "%", true) }}{% endfor %}{% endfor %} {% for row in table.rows %} {% for g in table.groups %}{% set s = row.sets.get(g.suffix) %} {% for f in g.flags %}{% endfor %} {% endfor %} {% endfor %}
Variable Values{{ g.heading }}
Distribution
{{ row.var }} {{ "{:,}".format(row.n) }}{% if s %}{{ s.good.text }}{% else %}–{% endif %}{% if s and s.pct.get(f.flag) %}{{ s.pct[f.flag] }}{% else %}–{% endif %}{% if s %}
{% for b in s.bar %}
{% endfor %}
{% else %}—{% endif %}
{% endif %} {% for line in table.lines %}

{{ line }}

{% endfor %} {% if table.n_good %}

{% if table.rows %}All other variables{% else %}All variables{% endif %} ({{ table.n_good }}): every value good.

{% endif %} {% if qc_thresholds %}

QC test limits

Limits of oceanarray's automatic tests, as stored with each flag variable: a value outside the suspect range (or changing by more than the spike threshold) is flagged suspect, outside the fail range bad.

{% for row in qc_thresholds %} {% endfor %}
Variable Test Suspect range / threshold Fail range / threshold
{{ row.var }} {{ row.test }} {{ row.suspect }} {{ row.fail }}
{% endif %}