.. _catalyst-sec-qc: Quality control =============== |package| computes a set of quality metrics for every origin and shows them as columns of the origin table. On the **REFINE → QC** tab, conditions on these metrics are combined into rules that select, star, confirm, reject or remove origins. Rules can be saved as named rule sets, so the same checks are applied the same way on every run. .. _catalyst-sec-qc-metrics: Quality metrics --------------- Metrics marked *0 = good* are badness scores between 0 (good) and 1 (bad). .. csv-table:: :header: "Code", "Metric", "Description" :widths: 8, 22, 70 "0", "Depth [km]", "Hypocentre depth." "1", "Phase count", "Number of arrivals." "2", "Azimuthal gap", "Largest azimuthal gap between the stations [deg]." "3", "RMS [s]", "Root mean square of the travel-time residuals." "4", "Mismatch", "Weighted fraction of the nearby stations that were available but not used by the origin. 0 = used all of them, 1 = used none. A high value points to a mislocation, unless the event is far away and the nearby stations could not see it." "5", "Move-out 0-1", "How badly the arrivals follow a straight move-out: the scatter of the apparent-velocity fit and an unrealistically high apparent velocity, per P and S. 0 = good." "6", "DD ref ties", "Number of accepted differential times in the last DD relocation." "7", "DD residual [s]", "Residual of those differential times." "8", "DD qual", "DD quality from ties and residual. 0 = good." "9", "S cov", "Missing S coverage: of all stations that recorded the event, the fraction without an S pick near the predicted S time. A real local event is usually seen in S at most stations; a spurious P-only coincidence is not. 0 = good." "10", "Fault Q", "How well the hypocentre fits the loaded fault model. 0 = good. Needs faults loaded in the 3D view." "11", "Min sta dist [km]", "Distance to the nearest station used." "12", "Mode", "Evaluation mode: 0 = automatic, 1 = manual." "13", "Status", "Evaluation status: 0 = preliminary, 1 = confirmed, 2 = reviewed, 3 = final, 4 = rejected, 5 = reported." "14", "Zone", "Number of the QC zone that contains the epicentre. 0 = outside all zones." "15", "Clean Q", "Weakness of the pick evidence. Each arrival at a station that is not over-detecting counts 1/(1 + d/100 km), where d is the station distance; four or more such arrivals count as good. 0 = good." "16", "Score", "Origin score of the :program:`scevent` OriginMultiFeature score processor. Higher is better." *Mode* and *Status* use the |scname| enumeration values, so they are best tested with *=* or *≠*, for example *Status = 4* for rejected origins. The code is the number used for the metric in saved rule sets and in the profile. Score ^^^^^ The score is computed automatically for every origin when the ``scoremf`` plugin is loaded (see :ref:`catalyst-sec-configuration`). **Calculate score** re-reads the score configuration and recomputes all scores, for example after the ``score.mf.*`` parameters were changed. .. _catalyst-sec-qc-rules: Conditions and rules -------------------- A rule is a chain of conditions. Each condition compares one metric with a threshold, using ``<``, ``≤``, ``>``, ``≥``, ``=`` or ``≠``. * **+ condition** adds a condition. * The AND/OR box joins a condition to the one above. AND binds more tightly than OR. * The indent buttons group conditions in brackets. Consecutive indented conditions form one bracket, joined to the condition above by the AND/OR of the first indented one. For example, *A*, then *AND* indented *B*, then *OR* indented *C*, reads *A AND (B OR C)*. Up to four levels are possible. * **Clear conditions** removes all conditions. **Match** shows how many visible origins fulfil the rule. It updates when the conditions, the origin filter or the origins change. Only origins visible in the origin table are tested. Use the origin filter to limit a rule to a subset. Actions ^^^^^^^ .. csv-table:: :header: "Button", "Effect on the matching origins" :widths: 25, 75 "Select matching", "Select them in the origin table." "Star matching", "Add a star. **Clear stars** removes all stars." "Confirm matching", "Set the evaluation status to *confirmed* and the evaluation mode to *manual*." "Reject matching", "Set the evaluation status to *rejected*. The picks are kept. Relocating or accepting an origin clears the rejection." "Remove matching", "Delete them from the working set. This cannot be undone; check them with *Select matching* or *Star matching* first." **Reject** next to **mismatch >** rejects every visible origin whose mismatch is above the threshold. **Clear origins** removes all origins after a confirmation; the picks are kept. .. _catalyst-sec-qc-rulesets: Rule sets --------- A rule set is a saved rule with a name. * Select a rule set in **Rule set** to load its conditions. * **+ Save as…** saves the current conditions under a new name. * **Delete** removes the selected rule set. Origins are not changed. * *(custom)* is a scratch rule that is not saved. Rule sets are stored in the current :ref:`processing profile ` (key ``qcProfiles``) when the profile is saved, so each network or region can have its own checks. Example rule set that flags poorly constrained origins in zone 2, with the second and third conditions indented one level: .. code-block:: none Zone = 2 AND Azimuthal gap > 180 OR Phase count < 6 It reads *Zone = 2 AND (Azimuthal gap > 180 OR Phase count < 6)*. Without the indentation it would read *(Zone = 2 AND Azimuthal gap > 180) OR Phase count < 6*, because AND binds more tightly than OR. .. _catalyst-sec-qc-zones: QC zones -------- Zones divide the region into areas with different quality expectations, for example the network interior, the coast and offshore areas with poor coverage. **Load zones (GeoJSON)…** loads a GeoJSON FeatureCollection of polygons: * the integer property ``zone`` of each feature is the value of the *Zone* metric, * the property ``name`` is shown in the zone legend. .. code-block:: json { "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "zone": 1, "name": "Network interior" }, "geometry": { "type": "Polygon", "coordinates": [[[-22.0, 63.8], [-18.0, 63.8], [-18.0, 66.0], [-22.0, 66.0], [-22.0, 63.8]]] } } ] } Loading assigns a zone to all origins at once. Origins loaded or relocated later get their zone automatically. The path of the zone file is saved in the profile (``qcZones``), and the zones are loaded with the profile.