Files
dougal-software/etc/qc/default/definitions.yaml
D. Berge 8841ffc10b Add QC definitions and parameters for Siddis surveys.
These are incomplete but meant to serve as a starting
point for other projects.
2020-09-10 23:20:58 +02:00

62 lines
2.7 KiB
YAML

# QC definition file
shot:
#-
#group: "Gun QC"
#children:
#-
#group: "Single gun / cluster"
#children:
#-
#group: "Source depth"
#check: |
#let _result_;
#_depth=10;
#const gunData = currentShot._("meta.smsrc.guns");
#if (!gunData) {
#_result_ = "Missing gun data";
#} else if (gunData.every(gun => Math.abs(gun[_depth]-parameters.gunDepth) <= parameters.gunDepthTolerance)) {
#_result_ = true;
#} else {
#const bad_guns = gunData.filter(gun => Math.abs(gun[_depth]-parameters.gunDepth) > parameters.gunDepthTolerance).map(gun => {
#return `source ${gun[2]}, string ${gun[0]}, gun ${gun[1]}, depth: ${gun[10]}`;
#});
#_result_ = `Depth error: ${bad_guns.join("; ")}`;
#}
#_result_
#-
#group: "Autofire"
#check: |
#let _result_;
#_autofire=5;
#const gunData = currentShot._("meta.smsrc.guns");
#if (!gunData) {
#_result_ = "Missing gun data";
#} else if (gunData.every(gun => gun[_autofire] == false)) {
#_result_ = true;
#} else {
#const bad_guns = gunData.filter(gun => gun[_autofire]).map(gun => {
#return `source ${gun[2]}, string ${gun[0]}, gun ${gun[1]}, depth: ${gun[10]}`;
#});
#_result_ = `Depth error: ${bad_guns.join("; ")}`;
#}
#_result_
-
group: "Centre of source preplot deviation"
children:
-
group: "Crossline"
check: |
Math.abs(currentShot.error_i) <= parameters.crosslineError
|| `Crossline error: ${currentShot.error_i.toFixed(1)} > ${parameters.crosslineError}`
-
group: "Inline"
check: |
Math.abs(currentShot.error_j) <= parameters.inlineError
|| `Inline error: ${currentShot.error_j.toFixed(1)} > ${parameters.inlineError}`
sequence: