dkist-processing-common 12.4.0__tar.gz → 12.4.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/CHANGELOG.rst +24 -0
  2. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/PKG-INFO +4 -5
  3. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tasks/trial_catalog.py +25 -9
  4. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tasks/write_l1.py +1 -1
  5. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_trial_catalog.py +102 -0
  6. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common.egg-info/PKG-INFO +4 -5
  7. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common.egg-info/requires.txt +3 -4
  8. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/pyproject.toml +3 -4
  9. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/.gitignore +0 -0
  10. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/.pre-commit-config.yaml +0 -0
  11. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/.readthedocs.yml +0 -0
  12. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/.snyk +0 -0
  13. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/README.rst +0 -0
  14. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/bitbucket-pipelines.yml +0 -0
  15. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/changelog/.gitempty +0 -0
  16. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/__init__.py +0 -0
  17. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/_util/__init__.py +0 -0
  18. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/_util/constants.py +0 -0
  19. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/_util/graphql.py +0 -0
  20. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/_util/scratch.py +0 -0
  21. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/_util/tags.py +0 -0
  22. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/codecs/__init__.py +0 -0
  23. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/codecs/array.py +0 -0
  24. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/codecs/asdf.py +0 -0
  25. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/codecs/basemodel.py +0 -0
  26. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/codecs/bytes.py +0 -0
  27. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/codecs/fits.py +0 -0
  28. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/codecs/iobase.py +0 -0
  29. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/codecs/json.py +0 -0
  30. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/codecs/path.py +0 -0
  31. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/codecs/quality.py +0 -0
  32. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/codecs/str.py +0 -0
  33. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/config.py +0 -0
  34. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/fonts/Lato-Regular.ttf +0 -0
  35. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/fonts/__init__.py +0 -0
  36. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/manual.py +0 -0
  37. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/models/__init__.py +0 -0
  38. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/models/constants.py +0 -0
  39. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/models/dkist_location.py +0 -0
  40. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/models/extras.py +0 -0
  41. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/models/fits_access.py +0 -0
  42. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/models/flower_pot.py +0 -0
  43. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/models/fried_parameter.py +0 -0
  44. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/models/graphql.py +0 -0
  45. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/models/input_dataset.py +0 -0
  46. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/models/message.py +0 -0
  47. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/models/message_queue_binding.py +0 -0
  48. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/models/metric_code.py +0 -0
  49. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/models/parameters.py +0 -0
  50. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/models/quality.py +0 -0
  51. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/models/tags.py +0 -0
  52. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/models/task_name.py +0 -0
  53. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/models/telemetry.py +0 -0
  54. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/models/wavelength.py +0 -0
  55. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/parsers/__init__.py +0 -0
  56. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/parsers/average_bud.py +0 -0
  57. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/parsers/cs_step.py +0 -0
  58. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/parsers/dsps_repeat.py +0 -0
  59. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/parsers/experiment_id_bud.py +0 -0
  60. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/parsers/id_bud.py +0 -0
  61. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/parsers/l0_fits_access.py +0 -0
  62. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/parsers/l1_fits_access.py +0 -0
  63. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/parsers/lookup_bud.py +0 -0
  64. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/parsers/near_bud.py +0 -0
  65. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/parsers/observing_program_id_bud.py +0 -0
  66. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/parsers/proposal_id_bud.py +0 -0
  67. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/parsers/quality.py +0 -0
  68. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/parsers/retarder.py +0 -0
  69. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/parsers/single_value_single_key_flower.py +0 -0
  70. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/parsers/task.py +0 -0
  71. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/parsers/time.py +0 -0
  72. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/parsers/unique_bud.py +0 -0
  73. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/parsers/wavelength.py +0 -0
  74. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tasks/__init__.py +0 -0
  75. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tasks/assemble_movie.py +0 -0
  76. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tasks/base.py +0 -0
  77. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tasks/l1_output_data.py +0 -0
  78. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tasks/mixin/__init__.py +0 -0
  79. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tasks/mixin/globus.py +0 -0
  80. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tasks/mixin/interservice_bus.py +0 -0
  81. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tasks/mixin/metadata_store.py +0 -0
  82. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tasks/mixin/object_store.py +0 -0
  83. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tasks/mixin/quality/__init__.py +0 -0
  84. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tasks/mixin/quality/_base.py +0 -0
  85. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tasks/mixin/quality/_metrics.py +0 -0
  86. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tasks/output_data_base.py +0 -0
  87. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tasks/parse_l0_input_data.py +0 -0
  88. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tasks/quality_metrics.py +0 -0
  89. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tasks/teardown.py +0 -0
  90. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tasks/transfer_input_data.py +0 -0
  91. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tasks/trial_output_data.py +0 -0
  92. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tasks/write_extra.py +0 -0
  93. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tasks/write_l1_base.py +0 -0
  94. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/__init__.py +0 -0
  95. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/conftest.py +0 -0
  96. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/mock_metadata_store.py +0 -0
  97. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_assemble_movie.py +0 -0
  98. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_assemble_quality.py +0 -0
  99. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_base.py +0 -0
  100. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_codecs.py +0 -0
  101. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_constants.py +0 -0
  102. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_construct_dataset_extras.py +0 -0
  103. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_cs_step.py +0 -0
  104. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_dkist_location.py +0 -0
  105. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_fits_access.py +0 -0
  106. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_flower_pot.py +0 -0
  107. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_fried_parameter.py +0 -0
  108. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_input_dataset.py +0 -0
  109. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_interservice_bus.py +0 -0
  110. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_interservice_bus_mixin.py +0 -0
  111. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_manual_processing.py +0 -0
  112. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_output_data_base.py +0 -0
  113. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_parameters.py +0 -0
  114. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_parse_l0_input_data.py +0 -0
  115. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_publish_catalog_messages.py +0 -0
  116. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_quality.py +0 -0
  117. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_quality_mixin.py +0 -0
  118. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_scratch.py +0 -0
  119. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_stems.py +0 -0
  120. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_submit_dataset_metadata.py +0 -0
  121. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_tags.py +0 -0
  122. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_task_name.py +0 -0
  123. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_task_parsing.py +0 -0
  124. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_teardown.py +0 -0
  125. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_transfer_input_data.py +0 -0
  126. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_transfer_l1_output_data.py +0 -0
  127. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_trial_output_data.py +0 -0
  128. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_workflow_task_base.py +0 -0
  129. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common/tests/test_write_l1.py +0 -0
  130. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common.egg-info/SOURCES.txt +0 -0
  131. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common.egg-info/dependency_links.txt +0 -0
  132. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/dkist_processing_common.egg-info/top_level.txt +0 -0
  133. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/docs/Makefile +0 -0
  134. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/docs/changelog.rst +0 -0
  135. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/docs/conf.py +0 -0
  136. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/docs/index.rst +0 -0
  137. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/docs/landing_page.rst +0 -0
  138. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/docs/make.bat +0 -0
  139. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/docs/requirements.txt +0 -0
  140. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/licenses/LICENSE.rst +0 -0
  141. {dkist_processing_common-12.4.0 → dkist_processing_common-12.4.2}/setup.cfg +0 -0
@@ -1,3 +1,27 @@
1
+ v12.4.2 (2026-02-11)
2
+ ====================
3
+
4
+ Features
5
+ --------
6
+
7
+ - Update `dkist-processing-common` to use `dkist-inventory` >= v1.11.4rc1 in order to add calibration and observation frames relevant to a particular processing pipeline run to the metadata ASDF file generated in trial workflows. (`#275 <https://bitbucket.org/dkistdc/dkist-processing-common/pull-requests/275>`__)
8
+
9
+
10
+ Misc
11
+ ----
12
+
13
+ - Remove towncrier dependency from the project. (`#299 <https://bitbucket.org/dkistdc/dkist-processing-common/pull-requests/299>`__)
14
+
15
+
16
+ v12.4.1 (2026-02-04)
17
+ ====================
18
+
19
+ Bugfixes
20
+ --------
21
+
22
+ - Use a different method for calculating DATA_RMS due to overflow with the current method. (`#296 <https://bitbucket.org/dkistdc/dkist-processing-common/pull-requests/296>`__)
23
+
24
+
1
25
  v12.4.0 (2026-02-04)
2
26
  ====================
3
27
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dkist-processing-common
3
- Version: 12.4.0
3
+ Version: 12.4.2
4
4
  Summary: Common task classes used by the DKIST science data processing pipelines
5
5
  Author-email: NSO / AURA <dkistdc@nso.edu>
6
6
  License: BSD-3-Clause
@@ -43,23 +43,22 @@ Requires-Dist: pytest-xdist; extra == "test"
43
43
  Requires-Dist: pytest-cov; extra == "test"
44
44
  Requires-Dist: pytest-mock; extra == "test"
45
45
  Requires-Dist: hypothesis; extra == "test"
46
- Requires-Dist: towncrier; extra == "test"
47
46
  Requires-Dist: dkist-data-simulator>=5.2.6; extra == "test"
48
47
  Requires-Dist: dkist-processing-common[inventory]; extra == "test"
49
48
  Requires-Dist: dkist-processing-common[asdf]; extra == "test"
50
49
  Requires-Dist: dkist-processing-common[quality]; extra == "test"
51
50
  Provides-Extra: docs
51
+ Requires-Dist: setuptools; extra == "docs"
52
52
  Requires-Dist: sphinx; extra == "docs"
53
53
  Requires-Dist: sphinx-astropy; extra == "docs"
54
54
  Requires-Dist: sphinx-changelog; extra == "docs"
55
55
  Requires-Dist: sphinx-autoapi!=3.1.0; extra == "docs"
56
56
  Requires-Dist: pytest; extra == "docs"
57
- Requires-Dist: towncrier<22.12.0; extra == "docs"
58
57
  Requires-Dist: dkist-sphinx-theme; extra == "docs"
59
58
  Provides-Extra: inventory
60
- Requires-Dist: dkist-inventory<2.0,>=1.11.2; extra == "inventory"
59
+ Requires-Dist: dkist-inventory<2.0,>=1.11.4; extra == "inventory"
61
60
  Provides-Extra: asdf
62
- Requires-Dist: dkist-inventory[asdf]<2.0,>=1.11.2; extra == "asdf"
61
+ Requires-Dist: dkist-inventory[asdf]<2.0,>=1.11.4; extra == "asdf"
63
62
  Provides-Extra: quality
64
63
  Requires-Dist: dkist-quality<3.0,>=2.0.0; extra == "quality"
65
64
 
@@ -143,7 +143,17 @@ class CreateTrialAsdf(OutputDataBase):
143
143
  def run(self) -> None:
144
144
  """Generate an ASDF file simulating the ASDF file that would be produced when cataloging the dataset."""
145
145
  with self.telemetry_span("Collate input dataset parameters"):
146
- parameters = self.parse_input_dataset_parameters()
146
+ parameters = self._parse_input_dataset_part_documents(Tag.input_dataset_parameters())
147
+
148
+ with self.telemetry_span("Collate input dataset observation frames"):
149
+ observation_frames = self._parse_input_dataset_part_documents(
150
+ Tag.input_dataset_observe_frames()
151
+ )
152
+
153
+ with self.telemetry_span("Collate input dataset calibration frames"):
154
+ calibration_frames = self._parse_input_dataset_part_documents(
155
+ Tag.input_dataset_calibration_frames()
156
+ )
147
157
 
148
158
  with self.telemetry_span("Generate ASDF tree"):
149
159
  tree = asdf_tree_from_filenames(
@@ -151,6 +161,8 @@ class CreateTrialAsdf(OutputDataBase):
151
161
  hdu=1, # compressed
152
162
  relative_to=self.scratch.workflow_base_path,
153
163
  parameters=parameters,
164
+ observation_frames=observation_frames,
165
+ calibration_frames=calibration_frames,
154
166
  )
155
167
 
156
168
  trial_history = [
@@ -177,14 +189,19 @@ class CreateTrialAsdf(OutputDataBase):
177
189
  ),
178
190
  )
179
191
 
180
- def parse_input_dataset_parameters(self) -> list[dict[str, Any]]:
192
+ def _parse_input_dataset_part_documents(self, tag: Tag) -> list[dict[str, Any]]:
181
193
  """
182
- Return the parameters associated with the dataset.
194
+ Parse InputDatasetPartDocumentList records for a given tag.
195
+
196
+ Parameters
197
+ ----------
198
+ tag
199
+ The Tag used to locate the input dataset part documents.
183
200
 
184
201
  Returns
185
202
  -------
186
203
  list[dict[str, Any]]
187
- A list of dictionaries, each containing a parameter name and its values.
204
+ A list of dictionaries representing the ``doc_list`` for the given tag.
188
205
 
189
206
  Raises
190
207
  ------
@@ -192,21 +209,20 @@ class CreateTrialAsdf(OutputDataBase):
192
209
  If there is not exactly one ``InputDatasetPartDocumentList`` found.
193
210
  """
194
211
  part_docs_iter = self.read(
195
- tags=Tag.input_dataset_parameters(),
212
+ tags=tag,
196
213
  decoder=basemodel_decoder,
197
214
  model=InputDatasetPartDocumentList,
198
215
  )
199
216
  docs = list(part_docs_iter)
200
217
 
201
218
  if not docs:
202
- logger.warning("No parameter list decoded from files")
219
+ logger.warning(f"No input dataset part document list decoded from files for tag {tag}")
203
220
  return []
204
221
 
205
222
  if len(docs) > 1:
206
- raise ValueError(f"Expected 1 parameter list, found {len(docs)}")
223
+ raise ValueError(f"Expected 1 document list for tag {tag}, found {len(docs)}")
207
224
 
208
- parameters = docs[0].model_dump(by_alias=True).get("doc_list", [])
209
- return parameters
225
+ return docs[0].model_dump(by_alias=True).get("doc_list", [])
210
226
 
211
227
 
212
228
  class CreateTrialQualityReport(OutputDataBase):
@@ -152,7 +152,7 @@ class WriteL1Frame(WriteL1Base, ABC):
152
152
  header["DATAP95"] = percentiles[8]
153
153
  header["DATAP98"] = percentiles[9]
154
154
  header["DATAP99"] = percentiles[10]
155
- header["DATARMS"] = np.sqrt(np.dot(valid_data, valid_data) / valid_data.size)
155
+ header["DATARMS"] = np.sqrt(np.mean(valid_data**2))
156
156
  header["DATAKURT"] = kurtosis(valid_data)
157
157
  header["DATASKEW"] = skew(valid_data)
158
158
  return header
@@ -5,6 +5,7 @@ from string import ascii_uppercase
5
5
  from uuid import uuid4
6
6
 
7
7
  import astropy.units as u
8
+ import numpy as np
8
9
  import pytest
9
10
  from astropy.io import fits
10
11
  from dkist_data_simulator.dataset_extras import DatasetExtraBase
@@ -19,12 +20,14 @@ from dkist_processing_common.codecs.bytes import bytes_decoder
19
20
  from dkist_processing_common.codecs.fits import fits_hdulist_encoder
20
21
  from dkist_processing_common.codecs.json import json_decoder
21
22
  from dkist_processing_common.codecs.quality import quality_data_encoder
23
+ from dkist_processing_common.models.input_dataset import InputDatasetFrames
22
24
  from dkist_processing_common.models.input_dataset import InputDatasetParameter
23
25
  from dkist_processing_common.models.input_dataset import InputDatasetPartDocumentList
24
26
  from dkist_processing_common.models.tags import Tag
25
27
  from dkist_processing_common.tasks import CreateTrialAsdf
26
28
  from dkist_processing_common.tasks import CreateTrialDatasetInventory
27
29
  from dkist_processing_common.tasks import CreateTrialQualityReport
30
+ from dkist_processing_common.tests.mock_metadata_store import default_observe_frames_doc
28
31
  from dkist_processing_common.tests.mock_metadata_store import input_dataset_parameters_part_factory
29
32
 
30
33
 
@@ -80,6 +83,34 @@ def scratch_with_l1_frames_and_parameters(
80
83
  return scratch
81
84
 
82
85
 
86
+ @pytest.fixture()
87
+ def scratch_with_l1_frames_and_other_frames(
88
+ scratch_with_l1_frames,
89
+ ) -> WorkflowFileSystem:
90
+ """
91
+ Scratch instance for a recipe run id with tagged L1 frames and
92
+ input observation/calibration frames.
93
+ """
94
+ scratch = scratch_with_l1_frames
95
+
96
+ frames_doc = InputDatasetPartDocumentList(
97
+ doc_list=[InputDatasetFrames(**frame) for frame in default_observe_frames_doc]
98
+ )
99
+
100
+ file_obj = basemodel_encoder(frames_doc)
101
+ scratch.write(
102
+ file_obj,
103
+ tags=Tag.input_dataset_observe_frames(),
104
+ relative_path=f"{uuid4().hex}_obs_frames.json",
105
+ )
106
+ scratch.write(
107
+ file_obj,
108
+ tags=Tag.input_dataset_calibration_frames(),
109
+ relative_path=f"{uuid4().hex}_cal_frames.json",
110
+ )
111
+ return scratch
112
+
113
+
83
114
  @pytest.fixture()
84
115
  def create_trial_dataset_inventory_task(
85
116
  recipe_run_id,
@@ -137,6 +168,22 @@ def create_trial_asdf_task_with_params(
137
168
  task._purge()
138
169
 
139
170
 
171
+ @pytest.fixture()
172
+ def create_trial_asdf_task_with_frames(
173
+ recipe_run_id, tmp_path, scratch_with_l1_frames_and_other_frames, fake_constants_db
174
+ ) -> CreateTrialAsdf:
175
+ """An instance of CreateTrialAsdf with L1 frames and input frame docs tagged in scratch."""
176
+ task = CreateTrialAsdf(
177
+ recipe_run_id=recipe_run_id,
178
+ workflow_name="trial_asdf",
179
+ workflow_version="trial_asdf_version",
180
+ )
181
+ task.scratch = scratch_with_l1_frames_and_other_frames
182
+ task.constants._update(fake_constants_db)
183
+ yield task
184
+ task._purge()
185
+
186
+
140
187
  @pytest.fixture()
141
188
  def create_trial_quality_report_task(
142
189
  recipe_run_id, tmp_path, fake_constants_db
@@ -242,6 +289,61 @@ def test_create_trial_asdf(with_params, request, recipe_run_id, mock_input_datas
242
289
  assert ds.meta["parameters"] == []
243
290
 
244
291
 
292
+ def test_create_trial_asdf_with_frames(create_trial_asdf_task_with_frames):
293
+ """
294
+ :Given: CreateTrialAsdf with L1 frames and input frame docs in scratch
295
+ :When: CreateTrialAsdf is run
296
+ :Then: The ASDF tree contains observation and calibration input frame metadata
297
+ """
298
+ task = create_trial_asdf_task_with_frames
299
+ # When
300
+ task()
301
+
302
+ # Then
303
+ asdf_tags = [Tag.output(), Tag.asdf()]
304
+ results = list(task.read(tags=asdf_tags, decoder=asdf_decoder))
305
+ assert len(results) == 1
306
+
307
+ tree = results[0]
308
+ assert isinstance(tree, dict)
309
+
310
+ ds = tree["dataset"]
311
+ assert "observation_input_frames" in ds.meta
312
+ assert "calibration_input_frames" in ds.meta
313
+
314
+ obs_frames = ds.meta["observation_input_frames"]
315
+ cal_frames = ds.meta["calibration_input_frames"]
316
+
317
+ assert isinstance(obs_frames, list)
318
+ assert isinstance(cal_frames, list)
319
+ assert len(obs_frames) == len(default_observe_frames_doc)
320
+ assert len(cal_frames) == len(default_observe_frames_doc)
321
+
322
+ obs_meta = obs_frames[0]
323
+ cal_meta = cal_frames[0]
324
+
325
+ assert isinstance(obs_meta["bucket"], str)
326
+ assert isinstance(cal_meta["bucket"], str)
327
+
328
+ obs_keys = np.asarray(obs_meta["object_keys"])
329
+ cal_keys = np.asarray(cal_meta["object_keys"])
330
+
331
+ if obs_keys.dtype.kind != "S":
332
+ obs_keys = obs_keys.astype("S")
333
+ if cal_keys.dtype.kind != "S":
334
+ cal_keys = cal_keys.astype("S")
335
+
336
+ assert obs_keys.dtype.kind == "S"
337
+ assert cal_keys.dtype.kind == "S"
338
+
339
+ obs_keys_str = [k.decode("ascii") for k in obs_keys.tolist()]
340
+ cal_keys_str = [k.decode("ascii") for k in cal_keys.tolist()]
341
+
342
+ expected_keys = set(default_observe_frames_doc[0]["object_keys"])
343
+ assert set(obs_keys_str) == expected_keys
344
+ assert set(cal_keys_str) == expected_keys
345
+
346
+
245
347
  def test_create_trial_quality_report(create_trial_quality_report_task):
246
348
  """
247
349
  :Given: An instance of CreateTrialQualityReport with tagged quality data
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dkist-processing-common
3
- Version: 12.4.0
3
+ Version: 12.4.2
4
4
  Summary: Common task classes used by the DKIST science data processing pipelines
5
5
  Author-email: NSO / AURA <dkistdc@nso.edu>
6
6
  License: BSD-3-Clause
@@ -43,23 +43,22 @@ Requires-Dist: pytest-xdist; extra == "test"
43
43
  Requires-Dist: pytest-cov; extra == "test"
44
44
  Requires-Dist: pytest-mock; extra == "test"
45
45
  Requires-Dist: hypothesis; extra == "test"
46
- Requires-Dist: towncrier; extra == "test"
47
46
  Requires-Dist: dkist-data-simulator>=5.2.6; extra == "test"
48
47
  Requires-Dist: dkist-processing-common[inventory]; extra == "test"
49
48
  Requires-Dist: dkist-processing-common[asdf]; extra == "test"
50
49
  Requires-Dist: dkist-processing-common[quality]; extra == "test"
51
50
  Provides-Extra: docs
51
+ Requires-Dist: setuptools; extra == "docs"
52
52
  Requires-Dist: sphinx; extra == "docs"
53
53
  Requires-Dist: sphinx-astropy; extra == "docs"
54
54
  Requires-Dist: sphinx-changelog; extra == "docs"
55
55
  Requires-Dist: sphinx-autoapi!=3.1.0; extra == "docs"
56
56
  Requires-Dist: pytest; extra == "docs"
57
- Requires-Dist: towncrier<22.12.0; extra == "docs"
58
57
  Requires-Dist: dkist-sphinx-theme; extra == "docs"
59
58
  Provides-Extra: inventory
60
- Requires-Dist: dkist-inventory<2.0,>=1.11.2; extra == "inventory"
59
+ Requires-Dist: dkist-inventory<2.0,>=1.11.4; extra == "inventory"
61
60
  Provides-Extra: asdf
62
- Requires-Dist: dkist-inventory[asdf]<2.0,>=1.11.2; extra == "asdf"
61
+ Requires-Dist: dkist-inventory[asdf]<2.0,>=1.11.4; extra == "asdf"
63
62
  Provides-Extra: quality
64
63
  Requires-Dist: dkist-quality<3.0,>=2.0.0; extra == "quality"
65
64
 
@@ -24,19 +24,19 @@ sunpy>=3.0.0
24
24
  talus==1.3.4
25
25
 
26
26
  [asdf]
27
- dkist-inventory[asdf]<2.0,>=1.11.2
27
+ dkist-inventory[asdf]<2.0,>=1.11.4
28
28
 
29
29
  [docs]
30
+ setuptools
30
31
  sphinx
31
32
  sphinx-astropy
32
33
  sphinx-changelog
33
34
  sphinx-autoapi!=3.1.0
34
35
  pytest
35
- towncrier<22.12.0
36
36
  dkist-sphinx-theme
37
37
 
38
38
  [inventory]
39
- dkist-inventory<2.0,>=1.11.2
39
+ dkist-inventory<2.0,>=1.11.4
40
40
 
41
41
  [quality]
42
42
  dkist-quality<3.0,>=2.0.0
@@ -47,7 +47,6 @@ pytest-xdist
47
47
  pytest-cov
48
48
  pytest-mock
49
49
  hypothesis
50
- towncrier
51
50
  dkist-data-simulator>=5.2.6
52
51
  dkist-processing-common[inventory]
53
52
  dkist-processing-common[asdf]
@@ -60,26 +60,25 @@ test = [
60
60
  "pytest-cov",
61
61
  "pytest-mock",
62
62
  "hypothesis",
63
- "towncrier",
64
63
  "dkist-data-simulator >= 5.2.6",
65
64
  "dkist-processing-common[inventory]",
66
65
  "dkist-processing-common[asdf]",
67
66
  "dkist-processing-common[quality]",
68
67
  ]
69
68
  docs = [
69
+ "setuptools",
70
70
  "sphinx",
71
71
  "sphinx-astropy",
72
72
  "sphinx-changelog",
73
73
  "sphinx-autoapi != 3.1.0",
74
74
  "pytest",
75
- "towncrier < 22.12.0",
76
75
  "dkist-sphinx-theme",
77
76
  ]
78
77
  inventory = [
79
- "dkist-inventory >= 1.11.2, <2.0",
78
+ "dkist-inventory >= 1.11.4, <2.0",
80
79
  ]
81
80
  asdf = [
82
- "dkist-inventory[asdf] >= 1.11.2, <2.0",
81
+ "dkist-inventory[asdf] >= 1.11.4, <2.0",
83
82
  ]
84
83
  quality = [
85
84
  "dkist-quality >= 2.0.0, <3.0",