dkist-processing-common 11.3.1rc1__tar.gz → 11.4.0rc1__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.3.1rc1 → dkist_processing_common-11.4.0rc1}/PKG-INFO +6 -6
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/bitbucket-pipelines.yml +1 -1
- dkist_processing_common-11.4.0rc1/changelog/266.misc.rst +1 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/models/constants.py +28 -42
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/models/fits_access.py +0 -56
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/models/tags.py +1 -2
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/models/task_name.py +2 -2
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/parsers/cs_step.py +2 -2
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/parsers/dsps_repeat.py +4 -5
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/parsers/experiment_id_bud.py +2 -5
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/parsers/id_bud.py +3 -6
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/parsers/l0_fits_access.py +3 -4
- dkist_processing_common-11.4.0rc1/dkist_processing_common/parsers/l1_fits_access.py +64 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/parsers/near_bud.py +2 -5
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/parsers/proposal_id_bud.py +2 -3
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/parsers/retarder.py +3 -4
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/parsers/single_value_single_key_flower.py +1 -6
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/parsers/task.py +6 -7
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/parsers/time.py +15 -19
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/parsers/unique_bud.py +2 -5
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/parsers/wavelength.py +3 -4
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tasks/parse_l0_input_data.py +3 -5
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_assemble_movie.py +1 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_constants.py +0 -15
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_fits_access.py +7 -62
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_parse_l0_input_data.py +24 -22
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_stems.py +21 -30
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_task_parsing.py +7 -17
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common.egg-info/PKG-INFO +6 -6
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common.egg-info/SOURCES.txt +1 -3
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common.egg-info/requires.txt +3 -3
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/pyproject.toml +5 -5
- dkist_processing_common-11.3.1rc1/changelog/265.feature.1.rst +0 -3
- dkist_processing_common-11.3.1rc1/changelog/265.feature.rst +0 -4
- dkist_processing_common-11.3.1rc1/changelog/265.misc.rst +0 -2
- dkist_processing_common-11.3.1rc1/dkist_processing_common/parsers/l1_fits_access.py +0 -65
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/.gitignore +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/.pre-commit-config.yaml +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/.readthedocs.yml +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/.snyk +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/CHANGELOG.rst +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/README.rst +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/changelog/.gitempty +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/__init__.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/_util/__init__.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/_util/constants.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/_util/graphql.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/_util/scratch.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/_util/tags.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/codecs/__init__.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/codecs/array.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/codecs/asdf.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/codecs/basemodel.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/codecs/bytes.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/codecs/fits.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/codecs/iobase.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/codecs/json.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/codecs/path.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/codecs/quality.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/codecs/str.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/config.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/fonts/Lato-Regular.ttf +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/fonts/__init__.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/manual.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/models/__init__.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/models/dkist_location.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/models/flower_pot.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/models/fried_parameter.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/models/graphql.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/models/input_dataset.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/models/message.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/models/message_queue_binding.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/models/metric_code.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/models/parameters.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/models/quality.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/models/wavelength.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/parsers/__init__.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/parsers/quality.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tasks/__init__.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tasks/assemble_movie.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tasks/base.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tasks/l1_output_data.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tasks/mixin/__init__.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tasks/mixin/globus.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tasks/mixin/interservice_bus.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tasks/mixin/metadata_store.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tasks/mixin/object_store.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tasks/mixin/quality/__init__.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tasks/mixin/quality/_base.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tasks/mixin/quality/_metrics.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tasks/output_data_base.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tasks/quality_metrics.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tasks/teardown.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tasks/transfer_input_data.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tasks/trial_catalog.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tasks/trial_output_data.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tasks/write_l1.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/__init__.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/conftest.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/mock_metadata_store.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_assemble_quality.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_base.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_codecs.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_cs_step.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_dkist_location.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_flower_pot.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_fried_parameter.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_input_dataset.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_interservice_bus.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_interservice_bus_mixin.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_manual_processing.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_output_data_base.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_parameters.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_publish_catalog_messages.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_quality.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_quality_mixin.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_scratch.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_submit_dataset_metadata.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_tags.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_task_name.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_teardown.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_transfer_input_data.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_transfer_l1_output_data.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_trial_catalog.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_trial_output_data.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_workflow_task_base.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common/tests/test_write_l1.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common.egg-info/dependency_links.txt +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/dkist_processing_common.egg-info/top_level.txt +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/docs/Makefile +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/docs/changelog.rst +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/docs/conf.py +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/docs/index.rst +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/docs/landing_page.rst +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/docs/make.bat +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/docs/requirements.txt +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/licenses/LICENSE.rst +0 -0
- {dkist_processing_common-11.3.1rc1 → dkist_processing_common-11.4.0rc1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dkist-processing-common
|
|
3
|
-
Version: 11.
|
|
3
|
+
Version: 11.4.0rc1
|
|
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
|
|
@@ -10,14 +10,14 @@ Project-URL: Documentation, https://docs.dkist.nso.edu/projects/common
|
|
|
10
10
|
Project-URL: Help, https://nso.atlassian.net/servicedesk/customer/portal/5
|
|
11
11
|
Classifier: Programming Language :: Python
|
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.
|
|
14
|
-
Requires-Python: >=3.
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Requires-Python: >=3.12
|
|
15
15
|
Description-Content-Type: text/x-rst
|
|
16
16
|
Requires-Dist: asdf<4.0.0,>=3.5.0
|
|
17
17
|
Requires-Dist: astropy>=7.0.0
|
|
18
18
|
Requires-Dist: dkist-fits-specifications<5.0,>=4.0.0
|
|
19
19
|
Requires-Dist: dkist-header-validator<6.0,>=5.0.0
|
|
20
|
-
Requires-Dist: dkist-processing-core==5.
|
|
20
|
+
Requires-Dist: dkist-processing-core==5.2.0rc1
|
|
21
21
|
Requires-Dist: dkist-processing-pac<4.0,>=3.1
|
|
22
22
|
Requires-Dist: dkist-service-configuration<3.0,>=2.0.2
|
|
23
23
|
Requires-Dist: dkist-spectral-lines<4.0,>=3.0.0
|
|
@@ -28,7 +28,7 @@ Requires-Dist: sqids==0.5.1
|
|
|
28
28
|
Requires-Dist: matplotlib>=3.4
|
|
29
29
|
Requires-Dist: moviepy>=2.0.0
|
|
30
30
|
Requires-Dist: numpy>=1.26.4
|
|
31
|
-
Requires-Dist: object-clerk==0.
|
|
31
|
+
Requires-Dist: object-clerk==1.0.0
|
|
32
32
|
Requires-Dist: pandas>=1.4.2
|
|
33
33
|
Requires-Dist: pillow>=10.2.0
|
|
34
34
|
Requires-Dist: pydantic>=2.0
|
|
@@ -36,7 +36,7 @@ Requires-Dist: redis==4.6.0
|
|
|
36
36
|
Requires-Dist: requests>=2.23
|
|
37
37
|
Requires-Dist: scipy>=1.15.1
|
|
38
38
|
Requires-Dist: sunpy>=3.0.0
|
|
39
|
-
Requires-Dist: talus==1.
|
|
39
|
+
Requires-Dist: talus==1.3.4
|
|
40
40
|
Provides-Extra: test
|
|
41
41
|
Requires-Dist: pytest; extra == "test"
|
|
42
42
|
Requires-Dist: pytest-xdist; extra == "test"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Update dkist-processing-core to 5.2.0 which includes upgrades to airflow 2.11.0 and requires Python 3.12+.
|
|
@@ -5,7 +5,7 @@ Contains names of database entries and Base class for an object that simplifies
|
|
|
5
5
|
accessing the database (tab completion, etc.)
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
-
from enum import
|
|
8
|
+
from enum import Enum
|
|
9
9
|
from string import ascii_uppercase
|
|
10
10
|
|
|
11
11
|
from sqids import Sqids
|
|
@@ -13,13 +13,13 @@ from sqids import Sqids
|
|
|
13
13
|
from dkist_processing_common._util.constants import ConstantsDb
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
class BudName(
|
|
16
|
+
class BudName(str, Enum):
|
|
17
17
|
"""Controlled list of names for constant stems (buds)."""
|
|
18
18
|
|
|
19
|
+
recipe_run_id = "RECIPE_RUN_ID"
|
|
19
20
|
instrument = "INSTRUMENT"
|
|
20
21
|
num_cs_steps = "NUM_CS_STEPS"
|
|
21
22
|
num_modstates = "NUM_MODSTATES"
|
|
22
|
-
retarder_name = "RETARDER_NAME"
|
|
23
23
|
proposal_id = "PROPOSAL_ID"
|
|
24
24
|
contributing_proposal_ids = "CONTRIBUTING_PROPOSAL_IDS"
|
|
25
25
|
experiment_id = "EXPERIMENT_ID"
|
|
@@ -33,6 +33,7 @@ class BudName(StrEnum):
|
|
|
33
33
|
dark_exposure_times = "DARK_EXPOSURE_TIMES"
|
|
34
34
|
dark_readout_exp_times = "DARK_READOUT_EXP_TIMES"
|
|
35
35
|
wavelength = "WAVELENGTH"
|
|
36
|
+
retarder_name = "RETARDER_NAME"
|
|
36
37
|
|
|
37
38
|
|
|
38
39
|
class ConstantsBase:
|
|
@@ -62,7 +63,7 @@ class ConstantsBase:
|
|
|
62
63
|
Parameters
|
|
63
64
|
----------
|
|
64
65
|
recipe_run_id
|
|
65
|
-
|
|
66
|
+
Thew recipe_run_id
|
|
66
67
|
task_name
|
|
67
68
|
The task_name
|
|
68
69
|
"""
|
|
@@ -90,31 +91,6 @@ class ConstantsBase:
|
|
|
90
91
|
"""Define the dataset_id constant."""
|
|
91
92
|
return Sqids(min_length=6, alphabet=ascii_uppercase).encode([self._recipe_run_id])
|
|
92
93
|
|
|
93
|
-
@property
|
|
94
|
-
def stokes_params(self) -> [str]:
|
|
95
|
-
"""Return the list of stokes parameter names."""
|
|
96
|
-
return ["I", "Q", "U", "V"]
|
|
97
|
-
|
|
98
|
-
@property
|
|
99
|
-
def instrument(self) -> str:
|
|
100
|
-
"""Get the instrument name."""
|
|
101
|
-
return self._db_dict[BudName.instrument]
|
|
102
|
-
|
|
103
|
-
@property
|
|
104
|
-
def num_cs_steps(self):
|
|
105
|
-
"""Get the number of calibration sequence steps."""
|
|
106
|
-
return self._db_dict[BudName.num_cs_steps]
|
|
107
|
-
|
|
108
|
-
@property
|
|
109
|
-
def num_modstates(self):
|
|
110
|
-
"""Get the number of modulation states."""
|
|
111
|
-
return self._db_dict[BudName.num_modstates]
|
|
112
|
-
|
|
113
|
-
@property
|
|
114
|
-
def retarder_name(self):
|
|
115
|
-
"""Get the retarder name."""
|
|
116
|
-
return self._db_dict[BudName.retarder_name]
|
|
117
|
-
|
|
118
94
|
@property
|
|
119
95
|
def proposal_id(self) -> str:
|
|
120
96
|
"""Get the proposal_id constant."""
|
|
@@ -129,22 +105,14 @@ class ConstantsBase:
|
|
|
129
105
|
return proposal_ids
|
|
130
106
|
|
|
131
107
|
@property
|
|
132
|
-
def
|
|
133
|
-
"""Get the
|
|
134
|
-
return self._db_dict[BudName.
|
|
135
|
-
|
|
136
|
-
@property
|
|
137
|
-
def contributing_experiment_ids(self) -> [str]:
|
|
138
|
-
"""Return the list of contributing experiment IDs."""
|
|
139
|
-
experiment_ids = self._db_dict[BudName.contributing_experiment_ids]
|
|
140
|
-
if isinstance(experiment_ids, str):
|
|
141
|
-
return [experiment_ids]
|
|
142
|
-
return experiment_ids
|
|
108
|
+
def instrument(self) -> str:
|
|
109
|
+
"""Get the instrument name."""
|
|
110
|
+
return self._db_dict[BudName.instrument]
|
|
143
111
|
|
|
144
112
|
@property
|
|
145
113
|
def obs_ip_start_time(self) -> str:
|
|
146
114
|
"""Return the start time of the observe IP."""
|
|
147
|
-
return self._db_dict[BudName.obs_ip_start_time]
|
|
115
|
+
return self._db_dict[BudName.obs_ip_start_time.value]
|
|
148
116
|
|
|
149
117
|
@property
|
|
150
118
|
def average_cadence(self) -> float:
|
|
@@ -181,7 +149,25 @@ class ConstantsBase:
|
|
|
181
149
|
"""Get a list of readout exp times for all DARK frames."""
|
|
182
150
|
return self._db_dict[BudName.dark_readout_exp_times]
|
|
183
151
|
|
|
152
|
+
@property
|
|
153
|
+
def stokes_params(self) -> [str]:
|
|
154
|
+
"""Return the list of stokes parameter names."""
|
|
155
|
+
return ["I", "Q", "U", "V"]
|
|
156
|
+
|
|
157
|
+
@property
|
|
158
|
+
def experiment_id(self) -> str:
|
|
159
|
+
"""Get the experiment_id constant."""
|
|
160
|
+
return self._db_dict[BudName.experiment_id]
|
|
161
|
+
|
|
162
|
+
@property
|
|
163
|
+
def contributing_experiment_ids(self) -> [str]:
|
|
164
|
+
"""Return the list of contributing experiment IDs."""
|
|
165
|
+
experiment_ids = self._db_dict[BudName.contributing_experiment_ids]
|
|
166
|
+
if isinstance(experiment_ids, str):
|
|
167
|
+
return [experiment_ids]
|
|
168
|
+
return experiment_ids
|
|
169
|
+
|
|
184
170
|
@property
|
|
185
171
|
def wavelength(self) -> float:
|
|
186
172
|
"""Wavelength."""
|
|
187
|
-
return self._db_dict[BudName.wavelength]
|
|
173
|
+
return self._db_dict[BudName.wavelength.value]
|
|
@@ -2,44 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from enum import StrEnum
|
|
6
5
|
from pathlib import Path
|
|
7
|
-
from typing import Any
|
|
8
6
|
|
|
9
7
|
import numpy as np
|
|
10
8
|
from astropy.io import fits
|
|
11
9
|
|
|
12
|
-
NOT_FOUND_MESSAGE = "_HEADER_KEYWORD_NOT_FOUND"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class MetadataKey(StrEnum):
|
|
16
|
-
"""Controlled list of names for FITS metadata header keys."""
|
|
17
|
-
|
|
18
|
-
ip_task_type = "IPTASK" # in L0FitsAccess
|
|
19
|
-
ip_start_time = "DKIST011" # in L0FitsAccess
|
|
20
|
-
ip_end_time = "DKIST012" # in L0FitsAccess
|
|
21
|
-
elevation = "ELEV_ANG"
|
|
22
|
-
azimuth = "TAZIMUTH"
|
|
23
|
-
table_angle = "TTBLANGL"
|
|
24
|
-
gos_level3_status = "LVL3STAT"
|
|
25
|
-
gos_level3_lamp_status = "LAMPSTAT"
|
|
26
|
-
gos_polarizer_status = "LVL2STAT"
|
|
27
|
-
gos_polarizer_angle = "POLANGLE"
|
|
28
|
-
gos_retarder_status = "LVL1STAT"
|
|
29
|
-
gos_retarder_angle = "RETANGLE"
|
|
30
|
-
gos_level0_status = "LVL0STAT"
|
|
31
|
-
time_obs = "DATE-BEG"
|
|
32
|
-
ip_id = "IP_ID"
|
|
33
|
-
instrument = "INSTRUME"
|
|
34
|
-
wavelength = "LINEWAV"
|
|
35
|
-
proposal_id = "PROP_ID"
|
|
36
|
-
experiment_id = "EXPER_ID"
|
|
37
|
-
num_dsps_repeats = "DSPSREPS"
|
|
38
|
-
current_dsps_repeat = "DSPSNUM"
|
|
39
|
-
fpa_exposure_time_ms = "XPOSURE"
|
|
40
|
-
sensor_readout_exposure_time_ms = "TEXPOSUR"
|
|
41
|
-
num_raw_frames_per_fpa = "NSUMEXP"
|
|
42
|
-
|
|
43
10
|
|
|
44
11
|
class FitsAccessBase:
|
|
45
12
|
"""
|
|
@@ -68,29 +35,6 @@ class FitsAccessBase:
|
|
|
68
35
|
def __repr__(self):
|
|
69
36
|
return f"{self.__class__.__name__}(hdu={self._hdu!r}, name={self.name!r}, auto_squeeze={self.auto_squeeze})"
|
|
70
37
|
|
|
71
|
-
def _set_metadata_key_value(
|
|
72
|
-
self, key: StrEnum, optional: bool = False, default: Any = NOT_FOUND_MESSAGE
|
|
73
|
-
) -> None:
|
|
74
|
-
"""
|
|
75
|
-
Get the header value and assign it as a metadata key name attribute.
|
|
76
|
-
|
|
77
|
-
Parameters
|
|
78
|
-
----------
|
|
79
|
-
key
|
|
80
|
-
The StrEnum member in attribute_name = fits_keyword structure
|
|
81
|
-
optional
|
|
82
|
-
If the keyword is optional
|
|
83
|
-
default
|
|
84
|
-
Value for the attribute if the key is not found
|
|
85
|
-
"""
|
|
86
|
-
if optional:
|
|
87
|
-
if default != NOT_FOUND_MESSAGE:
|
|
88
|
-
setattr(self, key.name, self.header.get(key, default))
|
|
89
|
-
else:
|
|
90
|
-
setattr(self, key.name, self.header.get(key, key + NOT_FOUND_MESSAGE))
|
|
91
|
-
else:
|
|
92
|
-
setattr(self, key.name, self.header[key])
|
|
93
|
-
|
|
94
38
|
@property
|
|
95
39
|
def data(self) -> np.ndarray:
|
|
96
40
|
"""
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"""Components of the Tag model. Stem + Optional Suffix = Tag."""
|
|
2
2
|
|
|
3
3
|
from enum import Enum
|
|
4
|
-
from enum import StrEnum
|
|
5
4
|
|
|
6
5
|
from dkist_processing_common.models.task_name import TaskName
|
|
7
6
|
|
|
@@ -9,7 +8,7 @@ from dkist_processing_common.models.task_name import TaskName
|
|
|
9
8
|
EXP_TIME_ROUND_DIGITS: int = 6
|
|
10
9
|
|
|
11
10
|
|
|
12
|
-
class StemName(
|
|
11
|
+
class StemName(str, Enum):
|
|
13
12
|
"""Controlled list of Tag Stems."""
|
|
14
13
|
|
|
15
14
|
output = "OUTPUT"
|
|
@@ -101,7 +101,7 @@ class CSStepFlower(Stem):
|
|
|
101
101
|
"""
|
|
102
102
|
|
|
103
103
|
def __init__(self, max_cs_step_time_sec: float):
|
|
104
|
-
super().__init__(stem_name=StemName.cs_step)
|
|
104
|
+
super().__init__(stem_name=StemName.cs_step.value)
|
|
105
105
|
self.max_cs_step_time_sec = max_cs_step_time_sec
|
|
106
106
|
|
|
107
107
|
def setter(self, fits_obj: L0FitsAccess) -> CSStep | Type[SpilledDirt]:
|
|
@@ -148,7 +148,7 @@ class NumCSStepBud(Stem):
|
|
|
148
148
|
"""
|
|
149
149
|
|
|
150
150
|
def __init__(self, max_cs_step_time_sec: float):
|
|
151
|
-
super().__init__(stem_name=BudName.num_cs_steps)
|
|
151
|
+
super().__init__(stem_name=BudName.num_cs_steps.value)
|
|
152
152
|
self.max_cs_step_time_sec = max_cs_step_time_sec
|
|
153
153
|
|
|
154
154
|
def setter(self, fits_obj: L0FitsAccess) -> CSStep | Type[SpilledDirt]:
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"""Classes supporting the Data Set Parameters Set (DSPS) Repeat parameter."""
|
|
2
2
|
|
|
3
3
|
from dkist_processing_common.models.constants import BudName
|
|
4
|
-
from dkist_processing_common.models.fits_access import MetadataKey
|
|
5
4
|
from dkist_processing_common.models.flower_pot import SpilledDirt
|
|
6
5
|
from dkist_processing_common.models.tags import StemName
|
|
7
6
|
from dkist_processing_common.models.task_name import TaskName
|
|
@@ -17,9 +16,9 @@ class TotalDspsRepeatsBud(TaskUniqueBud):
|
|
|
17
16
|
|
|
18
17
|
def __init__(self):
|
|
19
18
|
super().__init__(
|
|
20
|
-
constant_name=BudName.num_dsps_repeats,
|
|
21
|
-
metadata_key=
|
|
22
|
-
ip_task_types=TaskName.observe,
|
|
19
|
+
constant_name=BudName.num_dsps_repeats.value,
|
|
20
|
+
metadata_key="num_dsps_repeats",
|
|
21
|
+
ip_task_types=TaskName.observe.value,
|
|
23
22
|
)
|
|
24
23
|
|
|
25
24
|
|
|
@@ -28,7 +27,7 @@ class DspsRepeatNumberFlower(SingleValueSingleKeyFlower):
|
|
|
28
27
|
|
|
29
28
|
def __init__(self):
|
|
30
29
|
super().__init__(
|
|
31
|
-
tag_stem_name=StemName.dsps_repeat, metadata_key=
|
|
30
|
+
tag_stem_name=StemName.dsps_repeat.value, metadata_key="current_dsps_repeat"
|
|
32
31
|
)
|
|
33
32
|
|
|
34
33
|
def setter(self, fits_obj: L0FitsAccess):
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"""Experiment Id parser."""
|
|
2
2
|
|
|
3
3
|
from dkist_processing_common.models.constants import BudName
|
|
4
|
-
from dkist_processing_common.models.fits_access import MetadataKey
|
|
5
4
|
from dkist_processing_common.parsers.id_bud import ContributingIdsBud
|
|
6
5
|
from dkist_processing_common.parsers.id_bud import IdBud
|
|
7
6
|
|
|
@@ -10,9 +9,7 @@ class ExperimentIdBud(IdBud):
|
|
|
10
9
|
"""Class to create a Bud for the experiment_id."""
|
|
11
10
|
|
|
12
11
|
def __init__(self):
|
|
13
|
-
super().__init__(
|
|
14
|
-
constant_name=BudName.experiment_id, metadata_key=MetadataKey.experiment_id
|
|
15
|
-
)
|
|
12
|
+
super().__init__(constant_name=BudName.experiment_id.value, metadata_key="experiment_id")
|
|
16
13
|
|
|
17
14
|
|
|
18
15
|
class ContributingExperimentIdsBud(ContributingIdsBud):
|
|
@@ -20,5 +17,5 @@ class ContributingExperimentIdsBud(ContributingIdsBud):
|
|
|
20
17
|
|
|
21
18
|
def __init__(self):
|
|
22
19
|
super().__init__(
|
|
23
|
-
stem_name=BudName.contributing_experiment_ids, metadata_key=
|
|
20
|
+
stem_name=BudName.contributing_experiment_ids.value, metadata_key="experiment_id"
|
|
24
21
|
)
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"""Base classes for ID bud parsing."""
|
|
2
2
|
|
|
3
|
-
from enum import StrEnum
|
|
4
3
|
from typing import Type
|
|
5
4
|
|
|
6
5
|
from dkist_processing_common.models.flower_pot import SpilledDirt
|
|
@@ -13,21 +12,19 @@ from dkist_processing_common.parsers.unique_bud import TaskUniqueBud
|
|
|
13
12
|
class IdBud(TaskUniqueBud):
|
|
14
13
|
"""Base class for ID buds."""
|
|
15
14
|
|
|
16
|
-
def __init__(self, constant_name
|
|
15
|
+
def __init__(self, constant_name, metadata_key):
|
|
17
16
|
super().__init__(
|
|
18
17
|
constant_name=constant_name,
|
|
19
18
|
metadata_key=metadata_key,
|
|
20
|
-
ip_task_types=TaskName.observe,
|
|
19
|
+
ip_task_types=TaskName.observe.value,
|
|
21
20
|
)
|
|
22
21
|
|
|
23
22
|
|
|
24
23
|
class ContributingIdsBud(Stem):
|
|
25
24
|
"""Base class for contributing ID buds."""
|
|
26
25
|
|
|
27
|
-
def __init__(self, stem_name
|
|
26
|
+
def __init__(self, stem_name, metadata_key):
|
|
28
27
|
super().__init__(stem_name=stem_name)
|
|
29
|
-
if isinstance(metadata_key, StrEnum):
|
|
30
|
-
metadata_key = metadata_key.name
|
|
31
28
|
self.metadata_key = metadata_key
|
|
32
29
|
|
|
33
30
|
def setter(self, fits_obj: L0FitsAccess) -> str | Type[SpilledDirt]:
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
from astropy.io import fits
|
|
4
4
|
|
|
5
|
-
from dkist_processing_common.models.fits_access import MetadataKey
|
|
6
5
|
from dkist_processing_common.parsers.l1_fits_access import L1FitsAccess
|
|
7
6
|
|
|
8
7
|
|
|
@@ -27,6 +26,6 @@ class L0FitsAccess(L1FitsAccess):
|
|
|
27
26
|
auto_squeeze: bool = True,
|
|
28
27
|
):
|
|
29
28
|
super().__init__(hdu=hdu, name=name, auto_squeeze=auto_squeeze)
|
|
30
|
-
self.
|
|
31
|
-
self.
|
|
32
|
-
self.
|
|
29
|
+
self.ip_task_type: str = self.header["IPTASK"]
|
|
30
|
+
self.ip_start_time: str = self.header["DKIST011"]
|
|
31
|
+
self.ip_end_time: str = self.header["DKIST012"]
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"""By-frame 214 L1 only header keywords that are not instrument specific."""
|
|
2
|
+
|
|
3
|
+
from astropy.io import fits
|
|
4
|
+
|
|
5
|
+
from dkist_processing_common.models.fits_access import FitsAccessBase
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class L1FitsAccess(FitsAccessBase):
|
|
9
|
+
"""
|
|
10
|
+
Class defining a fits access object for processed L1 data.
|
|
11
|
+
|
|
12
|
+
Parameters
|
|
13
|
+
----------
|
|
14
|
+
hdu
|
|
15
|
+
The input fits hdu
|
|
16
|
+
name
|
|
17
|
+
An optional name to be associated with the hdu
|
|
18
|
+
auto_squeeze
|
|
19
|
+
A boolean indicating whether to 'squeeze' out dimensions of size 1
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
def __init__(
|
|
23
|
+
self,
|
|
24
|
+
hdu: fits.ImageHDU | fits.PrimaryHDU | fits.CompImageHDU,
|
|
25
|
+
name: str | None = None,
|
|
26
|
+
auto_squeeze: bool = False, # Because L1 data should always have the right form, right?
|
|
27
|
+
):
|
|
28
|
+
super().__init__(hdu=hdu, name=name, auto_squeeze=auto_squeeze)
|
|
29
|
+
|
|
30
|
+
self.elevation: float = self.header["ELEV_ANG"]
|
|
31
|
+
self.azimuth: float = self.header["TAZIMUTH"]
|
|
32
|
+
self.table_angle: float = self.header["TTBLANGL"]
|
|
33
|
+
self.gos_level3_status: str = self.header["LVL3STAT"]
|
|
34
|
+
self.gos_level3_lamp_status: str = self.header["LAMPSTAT"]
|
|
35
|
+
self.gos_polarizer_status: str = self.header["LVL2STAT"]
|
|
36
|
+
self.gos_retarder_status: str = self.header["LVL1STAT"]
|
|
37
|
+
self.gos_level0_status: str = self.header["LVL0STAT"]
|
|
38
|
+
self.time_obs: str = self.header["DATE-BEG"]
|
|
39
|
+
self.ip_id: str = self.header["IP_ID"]
|
|
40
|
+
self.instrument: str = self.header["INSTRUME"]
|
|
41
|
+
self.wavelength: float = self.header["LINEWAV"]
|
|
42
|
+
self.proposal_id: str = self.header["PROP_ID"]
|
|
43
|
+
self.experiment_id: str = self.header["EXPER_ID"]
|
|
44
|
+
self.num_dsps_repeats: int = self.header["DSPSREPS"]
|
|
45
|
+
self.current_dsps_repeat: int = self.header["DSPSNUM"]
|
|
46
|
+
self.fpa_exposure_time_ms: float = self.header["XPOSURE"]
|
|
47
|
+
self.sensor_readout_exposure_time_ms: float = self.header["TEXPOSUR"]
|
|
48
|
+
self.num_raw_frames_per_fpa: int = self.header["NSUMEXP"]
|
|
49
|
+
|
|
50
|
+
@property
|
|
51
|
+
def gos_polarizer_angle(self) -> float:
|
|
52
|
+
"""Convert the polarizer angle to a float if possible before returning."""
|
|
53
|
+
try:
|
|
54
|
+
return float(self.header["POLANGLE"])
|
|
55
|
+
except ValueError:
|
|
56
|
+
return -999 # The angle is only used if the polarizer is in the beam
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def gos_retarder_angle(self) -> float:
|
|
60
|
+
"""Convert the retarder angle to a float if possible before returning."""
|
|
61
|
+
try:
|
|
62
|
+
return float(self.header["RETANGLE"])
|
|
63
|
+
except ValueError:
|
|
64
|
+
return -999 # The angle is only used if the retarder is in the beam
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"""Pre-made flower that reads a single header key from all files and raises a ValueError if the values are not in a supplied range."""
|
|
2
2
|
|
|
3
|
-
from enum import StrEnum
|
|
4
3
|
from statistics import mean
|
|
5
4
|
from typing import Callable
|
|
6
5
|
|
|
@@ -31,12 +30,10 @@ class NearFloatBud(Stem):
|
|
|
31
30
|
def __init__(
|
|
32
31
|
self,
|
|
33
32
|
constant_name: str,
|
|
34
|
-
metadata_key: str
|
|
33
|
+
metadata_key: str,
|
|
35
34
|
tolerance: float,
|
|
36
35
|
):
|
|
37
36
|
super().__init__(stem_name=constant_name)
|
|
38
|
-
if isinstance(metadata_key, StrEnum):
|
|
39
|
-
metadata_key = metadata_key.name
|
|
40
37
|
self.metadata_key = metadata_key
|
|
41
38
|
self.tolerance = tolerance
|
|
42
39
|
|
|
@@ -101,7 +98,7 @@ class TaskNearFloatBud(NearFloatBud):
|
|
|
101
98
|
def __init__(
|
|
102
99
|
self,
|
|
103
100
|
constant_name: str,
|
|
104
|
-
metadata_key: str
|
|
101
|
+
metadata_key: str,
|
|
105
102
|
ip_task_types: str | list[str],
|
|
106
103
|
tolerance: float,
|
|
107
104
|
task_type_parsing_function: Callable = passthrough_header_ip_task,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"""Proposal Id parser."""
|
|
2
2
|
|
|
3
3
|
from dkist_processing_common.models.constants import BudName
|
|
4
|
-
from dkist_processing_common.models.fits_access import MetadataKey
|
|
5
4
|
from dkist_processing_common.parsers.id_bud import ContributingIdsBud
|
|
6
5
|
from dkist_processing_common.parsers.id_bud import IdBud
|
|
7
6
|
|
|
@@ -10,7 +9,7 @@ class ProposalIdBud(IdBud):
|
|
|
10
9
|
"""Class to create a Bud for the proposal_id."""
|
|
11
10
|
|
|
12
11
|
def __init__(self):
|
|
13
|
-
super().__init__(constant_name=BudName.proposal_id, metadata_key=
|
|
12
|
+
super().__init__(constant_name=BudName.proposal_id.value, metadata_key="proposal_id")
|
|
14
13
|
|
|
15
14
|
|
|
16
15
|
class ContributingProposalIdsBud(ContributingIdsBud):
|
|
@@ -18,5 +17,5 @@ class ContributingProposalIdsBud(ContributingIdsBud):
|
|
|
18
17
|
|
|
19
18
|
def __init__(self):
|
|
20
19
|
super().__init__(
|
|
21
|
-
stem_name=BudName.contributing_proposal_ids, metadata_key=
|
|
20
|
+
stem_name=BudName.contributing_proposal_ids.value, metadata_key="proposal_id"
|
|
22
21
|
)
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"""Bud that parses the name of the retarder used during POLCAL task observations."""
|
|
2
2
|
|
|
3
3
|
from dkist_processing_common.models.constants import BudName
|
|
4
|
-
from dkist_processing_common.models.fits_access import MetadataKey
|
|
5
4
|
from dkist_processing_common.models.task_name import TaskName
|
|
6
5
|
from dkist_processing_common.parsers.unique_bud import TaskUniqueBud
|
|
7
6
|
|
|
@@ -20,9 +19,9 @@ class RetarderNameBud(TaskUniqueBud):
|
|
|
20
19
|
|
|
21
20
|
def __init__(self):
|
|
22
21
|
super().__init__(
|
|
23
|
-
constant_name=BudName.retarder_name,
|
|
24
|
-
metadata_key=
|
|
25
|
-
ip_task_types=TaskName.polcal,
|
|
22
|
+
constant_name=BudName.retarder_name.value,
|
|
23
|
+
metadata_key="gos_retarder_status",
|
|
24
|
+
ip_task_types=TaskName.polcal.value,
|
|
26
25
|
)
|
|
27
26
|
|
|
28
27
|
def getter(self, key) -> str:
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
"""Pre-made flower that produces tag based on a single header key."""
|
|
2
2
|
|
|
3
|
-
from enum import StrEnum
|
|
4
|
-
|
|
5
|
-
from dkist_processing_common.models.fits_access import MetadataKey
|
|
6
3
|
from dkist_processing_common.models.flower_pot import Stem
|
|
7
4
|
from dkist_processing_common.parsers.l0_fits_access import L0FitsAccess
|
|
8
5
|
|
|
@@ -19,10 +16,8 @@ class SingleValueSingleKeyFlower(Stem):
|
|
|
19
16
|
The metadata key
|
|
20
17
|
"""
|
|
21
18
|
|
|
22
|
-
def __init__(self, tag_stem_name: str, metadata_key: str
|
|
19
|
+
def __init__(self, tag_stem_name: str, metadata_key: str):
|
|
23
20
|
super().__init__(stem_name=tag_stem_name)
|
|
24
|
-
if isinstance(metadata_key, StrEnum):
|
|
25
|
-
metadata_key = metadata_key.name
|
|
26
21
|
self.metadata_key = metadata_key
|
|
27
22
|
|
|
28
23
|
def setter(self, fits_obj: L0FitsAccess):
|
|
@@ -4,7 +4,6 @@ from typing import Callable
|
|
|
4
4
|
from typing import Type
|
|
5
5
|
|
|
6
6
|
from dkist_processing_common.models.fits_access import FitsAccessBase
|
|
7
|
-
from dkist_processing_common.models.fits_access import MetadataKey
|
|
8
7
|
from dkist_processing_common.models.flower_pot import SpilledDirt
|
|
9
8
|
from dkist_processing_common.models.tags import StemName
|
|
10
9
|
from dkist_processing_common.models.task_name import TaskName
|
|
@@ -37,9 +36,9 @@ def parse_header_ip_task_with_gains(fits_obj: FitsAccessBase) -> str:
|
|
|
37
36
|
and fits_obj.gos_level3_status == "lamp"
|
|
38
37
|
and fits_obj.gos_level3_lamp_status == "on"
|
|
39
38
|
):
|
|
40
|
-
return TaskName.lamp_gain
|
|
39
|
+
return TaskName.lamp_gain.value
|
|
41
40
|
if fits_obj.ip_task_type == "gain" and fits_obj.gos_level3_status == "clear":
|
|
42
|
-
return TaskName.solar_gain
|
|
41
|
+
return TaskName.solar_gain.value
|
|
43
42
|
|
|
44
43
|
# Everything else is unchanged
|
|
45
44
|
return passthrough_header_ip_task(fits_obj)
|
|
@@ -60,14 +59,14 @@ def parse_polcal_task_type(fits_obj: Type[FitsAccessBase]) -> str | Type[Spilled
|
|
|
60
59
|
and fits_obj.gos_retarder_status == "clear"
|
|
61
60
|
and fits_obj.gos_polarizer_status == "clear"
|
|
62
61
|
):
|
|
63
|
-
return TaskName.polcal_dark
|
|
62
|
+
return TaskName.polcal_dark.value
|
|
64
63
|
|
|
65
64
|
elif (
|
|
66
65
|
fits_obj.gos_level0_status.startswith("FieldStop")
|
|
67
66
|
and fits_obj.gos_retarder_status == "clear"
|
|
68
67
|
and fits_obj.gos_polarizer_status == "clear"
|
|
69
68
|
):
|
|
70
|
-
return TaskName.polcal_gain
|
|
69
|
+
return TaskName.polcal_gain.value
|
|
71
70
|
|
|
72
71
|
# We don't care about a POLCAL frame that is neither dark nor clear
|
|
73
72
|
return SpilledDirt
|
|
@@ -79,7 +78,7 @@ class TaskTypeFlower(SingleValueSingleKeyFlower):
|
|
|
79
78
|
def __init__(
|
|
80
79
|
self, header_task_parsing_func: Callable[[FitsAccessBase], str] = passthrough_header_ip_task
|
|
81
80
|
):
|
|
82
|
-
super().__init__(tag_stem_name=StemName.task, metadata_key=
|
|
81
|
+
super().__init__(tag_stem_name=StemName.task.value, metadata_key="ip_task_type")
|
|
83
82
|
self.header_parsing_function = header_task_parsing_func
|
|
84
83
|
|
|
85
84
|
def setter(self, fits_obj: FitsAccessBase):
|
|
@@ -104,7 +103,7 @@ class PolcalTaskFlower(SingleValueSingleKeyFlower):
|
|
|
104
103
|
"""
|
|
105
104
|
|
|
106
105
|
def __init__(self):
|
|
107
|
-
super().__init__(tag_stem_name=StemName.task, metadata_key=
|
|
106
|
+
super().__init__(tag_stem_name=StemName.task.value, metadata_key="ip_task_type")
|
|
108
107
|
|
|
109
108
|
def setter(self, fits_obj: FitsAccessBase):
|
|
110
109
|
"""
|