dkist-processing-common 11.1.0rc1__tar.gz → 11.2.0__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.
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/CHANGELOG.rst +38 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/PKG-INFO +1 -1
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/models/graphql.py +5 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tasks/assemble_movie.py +2 -2
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tasks/mixin/quality/_metrics.py +15 -6
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tasks/write_l1.py +9 -1
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_quality_mixin.py +6 -2
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_workflow_task_base.py +2 -3
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_write_l1.py +1 -1
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common.egg-info/PKG-INFO +1 -1
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common.egg-info/SOURCES.txt +0 -1
- dkist_processing_common-11.1.0rc1/changelog/255.misc.rst +0 -3
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/.gitignore +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/.pre-commit-config.yaml +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/.readthedocs.yml +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/.snyk +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/README.rst +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/bitbucket-pipelines.yml +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/changelog/.gitempty +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/__init__.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/_util/__init__.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/_util/constants.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/_util/graphql.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/_util/scratch.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/_util/tags.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/codecs/__init__.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/codecs/array.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/codecs/asdf.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/codecs/basemodel.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/codecs/bytes.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/codecs/fits.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/codecs/iobase.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/codecs/json.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/codecs/path.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/codecs/quality.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/codecs/str.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/config.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/fonts/Lato-Regular.ttf +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/fonts/__init__.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/manual.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/models/__init__.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/models/constants.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/models/dkist_location.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/models/fits_access.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/models/flower_pot.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/models/fried_parameter.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/models/input_dataset.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/models/message.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/models/message_queue_binding.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/models/metric_code.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/models/parameters.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/models/quality.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/models/tags.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/models/task_name.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/models/wavelength.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/parsers/__init__.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/parsers/cs_step.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/parsers/dsps_repeat.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/parsers/experiment_id_bud.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/parsers/id_bud.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/parsers/l0_fits_access.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/parsers/l1_fits_access.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/parsers/near_bud.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/parsers/proposal_id_bud.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/parsers/quality.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/parsers/retarder.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/parsers/single_value_single_key_flower.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/parsers/task.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/parsers/time.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/parsers/unique_bud.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/parsers/wavelength.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tasks/__init__.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tasks/base.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tasks/l1_output_data.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tasks/mixin/__init__.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tasks/mixin/globus.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tasks/mixin/interservice_bus.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tasks/mixin/metadata_store.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tasks/mixin/object_store.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tasks/mixin/quality/__init__.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tasks/mixin/quality/_base.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tasks/output_data_base.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tasks/parse_l0_input_data.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tasks/quality_metrics.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tasks/teardown.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tasks/transfer_input_data.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tasks/trial_catalog.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tasks/trial_output_data.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/__init__.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/conftest.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/mock_metadata_store.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_assemble_movie.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_assemble_quality.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_base.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_codecs.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_constants.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_cs_step.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_dkist_location.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_fits_access.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_flower_pot.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_fried_parameter.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_input_dataset.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_interservice_bus.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_interservice_bus_mixin.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_manual_processing.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_output_data_base.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_parameters.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_parse_l0_input_data.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_publish_catalog_messages.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_quality.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_scratch.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_stems.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_submit_dataset_metadata.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_tags.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_task_name.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_task_parsing.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_teardown.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_transfer_input_data.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_transfer_l1_output_data.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_trial_catalog.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common/tests/test_trial_output_data.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common.egg-info/dependency_links.txt +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common.egg-info/requires.txt +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/dkist_processing_common.egg-info/top_level.txt +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/docs/Makefile +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/docs/changelog.rst +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/docs/conf.py +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/docs/index.rst +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/docs/landing_page.rst +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/docs/make.bat +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/docs/requirements.txt +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/licenses/LICENSE.rst +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/pyproject.toml +0 -0
- {dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/setup.cfg +0 -0
|
@@ -1,3 +1,41 @@
|
|
|
1
|
+
v11.2.0 (2025-07-18)
|
|
2
|
+
====================
|
|
3
|
+
|
|
4
|
+
Bugfixes
|
|
5
|
+
--------
|
|
6
|
+
|
|
7
|
+
- Move the writing of spectral line keys in L1 data to later in the process, after the instruments have had a chance to rewrite the WCS info. (`#252 <https://bitbucket.org/dkistdc/dkist-processing-common/pull-requests/252>`__)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
v11.1.0 (2025-07-15)
|
|
11
|
+
====================
|
|
12
|
+
|
|
13
|
+
Misc
|
|
14
|
+
----
|
|
15
|
+
|
|
16
|
+
- The graphql and input dataset models are now set to validate whenever attributes are assigned, including after instantiation. (`#255 <https://bitbucket.org/dkistdc/dkist-processing-common/pull-requests/255>`__)
|
|
17
|
+
- Create a factory for custom `FakeGQLClient` used in tests. The factory and associated default returns live in a
|
|
18
|
+
new `mock_metadata_store.py` module in the tests directory. `FakeGQLClient` is now a test fixture and does not need to
|
|
19
|
+
be imported in tests. (`#255 <https://bitbucket.org/dkistdc/dkist-processing-common/pull-requests/255>`__)
|
|
20
|
+
- Fix a Pydantic warning in the graphql model. Because we validate the `RecipeRunConfiguration` as a JSON dictionary and
|
|
21
|
+
convert it to a model after validation, we need a serializer so Pydantic knows what to expect back out. (`#258 <https://bitbucket.org/dkistdc/dkist-processing-common/pull-requests/258>`__)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
v11.0.1 (2025-07-10)
|
|
25
|
+
====================
|
|
26
|
+
|
|
27
|
+
Bugfixes
|
|
28
|
+
--------
|
|
29
|
+
|
|
30
|
+
- Ignore NaN and Inf values when storing the quality results of a wavelength calibration fit. (`#260 <https://bitbucket.org/dkistdc/dkist-processing-common/pull-requests/260>`__)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
Misc
|
|
34
|
+
----
|
|
35
|
+
|
|
36
|
+
- Removing usages of `pkg_resources`, which is on track to be deprecated. (`#254 <https://bitbucket.org/dkistdc/dkist-processing-common/pull-requests/254>`__)
|
|
37
|
+
|
|
38
|
+
|
|
1
39
|
v11.0.0 (2025-07-02)
|
|
2
40
|
====================
|
|
3
41
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""GraphQL Data models for the metadata store api."""
|
|
2
2
|
from pydantic import BaseModel
|
|
3
3
|
from pydantic import ConfigDict
|
|
4
|
+
from pydantic import field_serializer
|
|
4
5
|
from pydantic import field_validator
|
|
5
6
|
from pydantic import Json
|
|
6
7
|
|
|
@@ -129,6 +130,10 @@ class RecipeRunResponse(GraphqlBaseModel):
|
|
|
129
130
|
return RecipeRunConfiguration()
|
|
130
131
|
return RecipeRunConfiguration.model_validate(value)
|
|
131
132
|
|
|
133
|
+
@field_serializer("configuration")
|
|
134
|
+
def _serialize_as_basemodel(self, config: RecipeRunConfiguration):
|
|
135
|
+
return config.model_dump()
|
|
136
|
+
|
|
132
137
|
|
|
133
138
|
class RecipeRunMutationResponse(GraphqlBaseModel):
|
|
134
139
|
"""Recipe run mutation response."""
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import logging
|
|
3
3
|
from abc import ABC
|
|
4
4
|
from abc import abstractmethod
|
|
5
|
+
from importlib.resources import files
|
|
5
6
|
from typing import Literal
|
|
6
7
|
|
|
7
8
|
import numpy as np
|
|
8
|
-
import pkg_resources
|
|
9
9
|
from matplotlib import colormaps
|
|
10
10
|
from moviepy import VideoClip
|
|
11
11
|
from PIL import Image
|
|
@@ -66,7 +66,7 @@ class AssembleMovie(WorkflowTaskBase, ABC):
|
|
|
66
66
|
MINIMUM_DURATION = 10 # seconds
|
|
67
67
|
MAXIMUM_DURATION = 60 # seconds
|
|
68
68
|
FPS = 15
|
|
69
|
-
FONT_FILE =
|
|
69
|
+
FONT_FILE = files("dkist_processing_common").joinpath("fonts/Lato-Regular.ttf")
|
|
70
70
|
TEXT_MARGIN_PX = 5
|
|
71
71
|
MPL_COLOR_MAP = "viridis"
|
|
72
72
|
|
|
@@ -1365,13 +1365,22 @@ class _WavecalQualityMixin:
|
|
|
1365
1365
|
wcs = WCS(best_fit_header)
|
|
1366
1366
|
best_fit_wavelength = wcs.spectral.pixel_to_world(np.arange(input_spectrum.size))
|
|
1367
1367
|
|
|
1368
|
+
finite_idx = (
|
|
1369
|
+
np.isfinite(input_wavelength)
|
|
1370
|
+
* np.isfinite(input_spectrum)
|
|
1371
|
+
* np.isfinite(best_fit_wavelength)
|
|
1372
|
+
* np.isfinite(best_fit_atlas)
|
|
1373
|
+
* np.isfinite(normalized_residuals)
|
|
1374
|
+
* np.isfinite(weight_data)
|
|
1375
|
+
)
|
|
1376
|
+
|
|
1368
1377
|
data = {
|
|
1369
|
-
"input_wavelength_nm": input_wavelength.to_value(u.nm).tolist(),
|
|
1370
|
-
"input_spectrum": input_spectrum.tolist(),
|
|
1371
|
-
"best_fit_wavelength_nm": best_fit_wavelength.to_value(u.nm).tolist(),
|
|
1372
|
-
"best_fit_atlas": best_fit_atlas.tolist(),
|
|
1373
|
-
"normalized_residuals": normalized_residuals.tolist(),
|
|
1374
|
-
"weights": None if weights is None else weight_data.tolist(),
|
|
1378
|
+
"input_wavelength_nm": input_wavelength.to_value(u.nm)[finite_idx].tolist(),
|
|
1379
|
+
"input_spectrum": input_spectrum[finite_idx].tolist(),
|
|
1380
|
+
"best_fit_wavelength_nm": best_fit_wavelength.to_value(u.nm)[finite_idx].tolist(),
|
|
1381
|
+
"best_fit_atlas": best_fit_atlas[finite_idx].tolist(),
|
|
1382
|
+
"normalized_residuals": normalized_residuals[finite_idx].tolist(),
|
|
1383
|
+
"weights": None if weights is None else weight_data[finite_idx].tolist(),
|
|
1375
1384
|
}
|
|
1376
1385
|
|
|
1377
1386
|
self._record_values(values=data, tags=[Tag.quality(MetricCode.wavecal_fit)])
|
|
@@ -230,7 +230,13 @@ class WriteL1Frame(WorkflowTaskBase, MetadataStoreMixin, ABC):
|
|
|
230
230
|
header = self.add_contributing_id_headers(header=header)
|
|
231
231
|
header["MANPROCD"] = self.workflow_had_manual_intervention
|
|
232
232
|
header["PRODUCT"] = self.compute_product_id(header["IDSOBSID"], header["PROCTYPE"])
|
|
233
|
-
|
|
233
|
+
return header
|
|
234
|
+
|
|
235
|
+
def add_spectral_line_headers(
|
|
236
|
+
self,
|
|
237
|
+
header: fits.Header,
|
|
238
|
+
) -> fits.Header:
|
|
239
|
+
"""Add datacenter table keys relating to spectral lines."""
|
|
234
240
|
wavelength_range = self.get_wavelength_range(header=header)
|
|
235
241
|
spectral_lines = get_spectral_lines(
|
|
236
242
|
wavelength_min=wavelength_range.min,
|
|
@@ -364,6 +370,8 @@ class WriteL1Frame(WorkflowTaskBase, MetadataStoreMixin, ABC):
|
|
|
364
370
|
header = self.add_doc_headers(header=header)
|
|
365
371
|
# Add the dataset headers (abstract - implement in instrument task)
|
|
366
372
|
header = self.add_dataset_headers(header=header, stokes=stokes_param)
|
|
373
|
+
# Add the spectral line headers
|
|
374
|
+
header = self.add_spectral_line_headers(header=header)
|
|
367
375
|
# Remove any headers not contained in spec 214
|
|
368
376
|
header = remove_spec_122_keys_and_spec_214_l0_keys(input_headers=header)
|
|
369
377
|
# Remove any keys referring to axes that don't exist
|
|
@@ -1201,12 +1201,16 @@ def wavecal_input_wavelength() -> u.Quantity:
|
|
|
1201
1201
|
|
|
1202
1202
|
@pytest.fixture(scope="session")
|
|
1203
1203
|
def wavecal_input_spectrum(wavecal_input_wavelength) -> np.ndarray:
|
|
1204
|
-
|
|
1204
|
+
spec = (wavecal_input_wavelength.value - wavecal_input_wavelength.size // 2) ** 2 + 10.0
|
|
1205
|
+
spec[spec.size // 2] = np.nan
|
|
1206
|
+
return spec
|
|
1205
1207
|
|
|
1206
1208
|
|
|
1207
1209
|
@pytest.fixture(scope="session")
|
|
1208
1210
|
def wavecal_weights(wavecal_input_wavelength) -> np.ndarray:
|
|
1209
|
-
|
|
1211
|
+
weights = np.arange(wavecal_input_wavelength.size, dtype=float)
|
|
1212
|
+
weights[0] = np.inf
|
|
1213
|
+
return weights
|
|
1210
1214
|
|
|
1211
1215
|
|
|
1212
1216
|
@pytest.fixture(scope="session")
|
|
@@ -2,12 +2,11 @@ import json
|
|
|
2
2
|
import logging
|
|
3
3
|
import re
|
|
4
4
|
import tomllib
|
|
5
|
-
from
|
|
5
|
+
from importlib.metadata import version
|
|
6
6
|
from pathlib import Path
|
|
7
7
|
from string import ascii_uppercase
|
|
8
8
|
|
|
9
9
|
import pytest
|
|
10
|
-
from pkg_resources import get_distribution
|
|
11
10
|
from sqids import Sqids
|
|
12
11
|
|
|
13
12
|
import dkist_processing_common
|
|
@@ -272,7 +271,7 @@ def test_library_versions(provenance_task, package_dependencies):
|
|
|
272
271
|
# installed packages.
|
|
273
272
|
for package in package_dependencies:
|
|
274
273
|
assert package in libraries
|
|
275
|
-
assert libraries[package] ==
|
|
274
|
+
assert libraries[package] == version(package)
|
|
276
275
|
|
|
277
276
|
|
|
278
277
|
def test_record_provenance(provenance_task):
|
|
@@ -677,7 +677,7 @@ def test_spectral_line_keys(write_l1_task, mocker, fake_gql_client):
|
|
|
677
677
|
new=fake_gql_client,
|
|
678
678
|
)
|
|
679
679
|
task, _, header = write_l1_task
|
|
680
|
-
header = task.
|
|
680
|
+
header = task.add_spectral_line_headers(header=header)
|
|
681
681
|
assert header["SPECLN01"] == "Fe XIII (1079.8 nm)"
|
|
682
682
|
assert header["SPECLN02"] == "He I (1083.0 nm)"
|
|
683
683
|
assert header["NSPECLNS"] == 2
|
|
File without changes
|
{dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/.pre-commit-config.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dkist_processing_common-11.1.0rc1 → dkist_processing_common-11.2.0}/bitbucket-pipelines.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|