Check if gun data missing for entire line.

The `sequences` object now carries the attribute
`has_smsrc_data`, a boolean which is true iff
there is at least one `smsrc` record in the raw
shots metadata.

This is used by:

1. A new sequence-wise test which reports if gun
   data is missing for the entire sequence.

2. The individual `missing_gun_data` test which
   is inhibited if `has_smsrc_data` for the
   corresponding sequence is false.

Closes #93.
This commit is contained in:
D. Berge
2021-05-07 14:04:48 +02:00
parent ea499a645b
commit f87aa08246
2 changed files with 16 additions and 2 deletions

View File

@@ -20,11 +20,20 @@
disabled: false
labels: [ "QC", "QCGuns" ]
children:
-
name: "Sequences without gun data"
iterate: "sequences"
id: seq_no_gun_data
check: |
const sequence = currentItem;
currentItem.has_smsrc_data || "Sequence has no gun data"
-
name: "Missing gun data"
id: missing_gun_data
check: |
!!currentItem._("raw_meta.smsrc.guns") || "Missing gun data"
sequences.some(s => s.sequence == currentItem.sequence && s.has_smsrc_data)
? (!!currentItem._("raw_meta.smsrc.guns") || "Missing gun data")
: true
-
name: "No fire"