|
14 | 14 | from ..utils.arrays import recarray_drop_columns |
15 | 15 | from . import metadata |
16 | 16 | from .hdf5dataformat import ( |
| 17 | + DL0_SUBARRAY_QUALITY_GROUP, |
17 | 18 | DL0_TEL_POINTING_GROUP, |
| 19 | + DL0_TEL_QUALITY_GROUP, |
18 | 20 | DL1_CAMERA_COEFFICIENTS_GROUP, |
19 | 21 | DL1_COLUMN_NAMES, |
20 | 22 | DL1_IMAGE_STATISTICS_TABLE, |
21 | 23 | DL1_PIXEL_STATISTICS_GROUP, |
22 | 24 | DL1_SUBARRAY_POINTING_GROUP, |
| 25 | + DL1_SUBARRAY_QUALITY_GROUP, |
23 | 26 | DL1_SUBARRAY_TRIGGER_TABLE, |
24 | 27 | DL1_TEL_CALIBRATION_GROUP, |
25 | 28 | DL1_TEL_ILLUMINATOR_THROUGHPUT_GROUP, |
|
29 | 32 | DL1_TEL_OPTICAL_PSF_GROUP, |
30 | 33 | DL1_TEL_PARAMETERS_GROUP, |
31 | 34 | DL1_TEL_POINTING_GROUP, |
| 35 | + DL1_TEL_QUALITY_GROUP, |
32 | 36 | DL1_TEL_TRIGGER_TABLE, |
33 | 37 | DL2_EVENT_STATISTICS_GROUP, |
34 | 38 | DL2_SUBARRAY_CROSS_CALIBRATION_GROUP, |
|
53 | 57 | COMPATIBLE_DATA_MODEL_VERSIONS = [ |
54 | 58 | "v7.2.0", |
55 | 59 | "v7.3.0", |
| 60 | + "v7.4.0", |
56 | 61 | ] |
57 | 62 |
|
58 | 63 |
|
@@ -475,9 +480,11 @@ def _append_monitoring_data(self, other): |
475 | 480 | """Append monitoring data (pointing, calibration, throughput, pixel statistics).""" |
476 | 481 | self._append_monitoring_subarray_groups(other) |
477 | 482 | self._append_monitoring_dl2_groups(other) |
| 483 | + self._append_quality_subarray_groups(other) |
478 | 484 | if self.telescope_events: |
479 | 485 | self._append_monitoring_telescope_groups(other) |
480 | 486 | self._append_pixel_statistics(other) |
| 487 | + self._append_quality_telescope_groups(other) |
481 | 488 |
|
482 | 489 | def _append_monitoring_subarray_groups(self, other): |
483 | 490 | """Append monitoring subarray groups.""" |
@@ -523,6 +530,32 @@ def _append_pixel_statistics(self, other): |
523 | 530 | other, other.root[key], once=self.single_ob |
524 | 531 | ) |
525 | 532 |
|
| 533 | + def _append_quality_telescope_groups(self, other): |
| 534 | + """Append quality telescope groups. |
| 535 | +
|
| 536 | + Traverses ``DL0_TEL_QUALITY_GROUP`` and ``DL1_TEL_QUALITY_GROUP`` and |
| 537 | + appends all subgroups, which have the structure |
| 538 | + ``{quality_group}/{metric}/{tel_XXX}``. |
| 539 | + """ |
| 540 | + for root_group in (DL0_TEL_QUALITY_GROUP, DL1_TEL_QUALITY_GROUP): |
| 541 | + if root_group not in other.root: |
| 542 | + continue |
| 543 | + for metric_group in other.root[root_group]._f_iter_nodes("Group"): |
| 544 | + self._append_table_group(other, metric_group, once=self.single_ob) |
| 545 | + |
| 546 | + def _append_quality_subarray_groups(self, other): |
| 547 | + """Append quality subarray groups. |
| 548 | +
|
| 549 | + Traverses ``DL0_SUBARRAY_QUALITY_GROUP`` and ``DL1_SUBARRAY_QUALITY_GROUP`` |
| 550 | + and appends all subgroups, which have the structure |
| 551 | + ``{quality_group}/{array_element}/{metric}``. |
| 552 | + """ |
| 553 | + for root_group in (DL0_SUBARRAY_QUALITY_GROUP, DL1_SUBARRAY_QUALITY_GROUP): |
| 554 | + if root_group not in other.root: |
| 555 | + continue |
| 556 | + for elem_group in other.root[root_group]._f_iter_nodes("Group"): |
| 557 | + self._append_table_group(other, elem_group, once=self.single_ob) |
| 558 | + |
526 | 559 | def _append_statistics_data(self, other): |
527 | 560 | """Append processing statistics data.""" |
528 | 561 | # quality query statistics |
|
0 commit comments