dkist-processing-common 11.7.1rc1__tar.gz → 11.8.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.7.1rc1 → dkist_processing_common-11.8.0rc1}/CHANGELOG.rst +25 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/PKG-INFO +5 -5
- dkist_processing_common-11.8.0rc1/changelog/245.feature.1.rst +1 -0
- dkist_processing_common-11.8.0rc1/dkist_processing_common/models/constants.py +499 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/models/fits_access.py +16 -25
- dkist_processing_common-11.8.0rc1/dkist_processing_common/parsers/average_bud.py +48 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/parsers/experiment_id_bud.py +8 -4
- dkist_processing_common-11.8.0rc1/dkist_processing_common/parsers/id_bud.py +76 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/parsers/l0_fits_access.py +3 -3
- dkist_processing_common-11.8.0rc1/dkist_processing_common/parsers/l1_fits_access.py +91 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/parsers/near_bud.py +4 -4
- dkist_processing_common-11.8.0rc1/dkist_processing_common/parsers/observing_program_id_bud.py +24 -0
- dkist_processing_common-11.8.0rc1/dkist_processing_common/parsers/proposal_id_bud.py +28 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/parsers/single_value_single_key_flower.py +0 -1
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/parsers/time.py +147 -27
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tasks/mixin/quality/_metrics.py +6 -4
- dkist_processing_common-11.8.0rc1/dkist_processing_common/tasks/parse_l0_input_data.py +470 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tasks/trial_catalog.py +38 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/mock_metadata_store.py +39 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_fits_access.py +19 -44
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_input_dataset.py +1 -37
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_parse_l0_input_data.py +45 -5
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_quality_mixin.py +3 -11
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_stems.py +162 -10
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_task_parsing.py +6 -6
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_trial_catalog.py +72 -2
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common.egg-info/PKG-INFO +5 -5
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common.egg-info/SOURCES.txt +3 -1
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common.egg-info/requires.txt +4 -4
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/pyproject.toml +4 -4
- dkist_processing_common-11.7.1rc1/changelog/271.misc.rst +0 -1
- dkist_processing_common-11.7.1rc1/dkist_processing_common/models/constants.py +0 -187
- dkist_processing_common-11.7.1rc1/dkist_processing_common/parsers/id_bud.py +0 -60
- dkist_processing_common-11.7.1rc1/dkist_processing_common/parsers/l1_fits_access.py +0 -65
- dkist_processing_common-11.7.1rc1/dkist_processing_common/parsers/proposal_id_bud.py +0 -22
- dkist_processing_common-11.7.1rc1/dkist_processing_common/tasks/parse_l0_input_data.py +0 -225
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/.gitignore +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/.pre-commit-config.yaml +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/.readthedocs.yml +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/.snyk +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/README.rst +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/bitbucket-pipelines.yml +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/changelog/.gitempty +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/__init__.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/_util/__init__.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/_util/constants.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/_util/graphql.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/_util/scratch.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/_util/tags.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/codecs/__init__.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/codecs/array.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/codecs/asdf.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/codecs/basemodel.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/codecs/bytes.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/codecs/fits.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/codecs/iobase.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/codecs/json.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/codecs/path.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/codecs/quality.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/codecs/str.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/config.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/fonts/Lato-Regular.ttf +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/fonts/__init__.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/manual.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/models/__init__.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/models/dkist_location.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/models/flower_pot.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/models/fried_parameter.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/models/graphql.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/models/input_dataset.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/models/message.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/models/message_queue_binding.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/models/metric_code.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/models/parameters.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/models/quality.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/models/tags.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/models/task_name.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/models/telemetry.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/models/wavelength.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/parsers/__init__.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/parsers/cs_step.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/parsers/dsps_repeat.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/parsers/quality.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/parsers/retarder.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/parsers/task.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/parsers/unique_bud.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/parsers/wavelength.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tasks/__init__.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tasks/assemble_movie.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tasks/base.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tasks/l1_output_data.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tasks/mixin/__init__.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tasks/mixin/globus.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tasks/mixin/interservice_bus.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tasks/mixin/metadata_store.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tasks/mixin/object_store.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tasks/mixin/quality/__init__.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tasks/mixin/quality/_base.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tasks/output_data_base.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tasks/quality_metrics.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tasks/teardown.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tasks/transfer_input_data.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tasks/trial_output_data.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tasks/write_l1.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/__init__.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/conftest.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_assemble_movie.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_assemble_quality.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_base.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_codecs.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_constants.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_cs_step.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_dkist_location.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_flower_pot.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_fried_parameter.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_interservice_bus.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_interservice_bus_mixin.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_manual_processing.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_output_data_base.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_parameters.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_publish_catalog_messages.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_quality.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_scratch.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_submit_dataset_metadata.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_tags.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_task_name.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_teardown.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_transfer_input_data.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_transfer_l1_output_data.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_trial_output_data.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_workflow_task_base.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common/tests/test_write_l1.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common.egg-info/dependency_links.txt +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/dkist_processing_common.egg-info/top_level.txt +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/docs/Makefile +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/docs/changelog.rst +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/docs/conf.py +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/docs/index.rst +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/docs/landing_page.rst +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/docs/make.bat +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/docs/requirements.txt +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/licenses/LICENSE.rst +0 -0
- {dkist_processing_common-11.7.1rc1 → dkist_processing_common-11.8.0rc1}/setup.cfg +0 -0
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
v11.7.0 (2025-10-09)
|
|
2
|
+
====================
|
|
3
|
+
|
|
4
|
+
Features
|
|
5
|
+
--------
|
|
6
|
+
|
|
7
|
+
- Add new buds to parsing for what will become the dataset extras. (`#267 <https://bitbucket.org/dkistdc/dkist-processing-common/pull-requests/267>`__)
|
|
8
|
+
- Add new bud type TaskContributingIdsBud, based on ContributingIdsBud, for for specific task types. (`#267 <https://bitbucket.org/dkistdc/dkist-processing-common/pull-requests/267>`__)
|
|
9
|
+
- Add new bud types TaskAverageBud and TaskBeginDateBud, which is based on new TaskDatetimeBudBase. (`#267 <https://bitbucket.org/dkistdc/dkist-processing-common/pull-requests/267>`__)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
Removals
|
|
13
|
+
--------
|
|
14
|
+
|
|
15
|
+
- Remove IdBud, which is just a TaskUniqueBud with the task set to observe, and therefore is not needed. (`#267 <https://bitbucket.org/dkistdc/dkist-processing-common/pull-requests/267>`__)
|
|
16
|
+
- Remove the `_set_metadata_key_value` method from FitsAccessBase. Instead of using `setattr`, attributes
|
|
17
|
+
are assigned explicitly in access classes using `MetadataKey` members in place of header key strings. (`#267 <https://bitbucket.org/dkistdc/dkist-processing-common/pull-requests/267>`__)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
Misc
|
|
21
|
+
----
|
|
22
|
+
|
|
23
|
+
- Rename TimeFlowerBase and TaskTimeBudBase to RoundTimeFlowerBase and TaskRoundTimeBudBase, respectively. (`#267 <https://bitbucket.org/dkistdc/dkist-processing-common/pull-requests/267>`__)
|
|
24
|
+
|
|
25
|
+
|
|
1
26
|
v11.6.0 (2025-09-26)
|
|
2
27
|
====================
|
|
3
28
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dkist-processing-common
|
|
3
|
-
Version: 11.
|
|
3
|
+
Version: 11.8.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
|
|
@@ -21,8 +21,8 @@ Requires-Dist: dkist-processing-core==6.0.0
|
|
|
21
21
|
Requires-Dist: dkist-processing-pac<4.0,>=3.1
|
|
22
22
|
Requires-Dist: dkist-service-configuration<5.0,>=4.1.7
|
|
23
23
|
Requires-Dist: dkist-spectral-lines<4.0,>=3.0.0
|
|
24
|
-
Requires-Dist: solar-wavelength-calibration<
|
|
25
|
-
Requires-Dist: globus-sdk
|
|
24
|
+
Requires-Dist: solar-wavelength-calibration<2.0,>=1.0
|
|
25
|
+
Requires-Dist: globus-sdk<4.0.0,>=3.12.0
|
|
26
26
|
Requires-Dist: gqlclient[pydantic]==1.2.3
|
|
27
27
|
Requires-Dist: sqids==0.5.1
|
|
28
28
|
Requires-Dist: matplotlib>=3.4
|
|
@@ -57,9 +57,9 @@ Requires-Dist: pytest; extra == "docs"
|
|
|
57
57
|
Requires-Dist: towncrier<22.12.0; extra == "docs"
|
|
58
58
|
Requires-Dist: dkist-sphinx-theme; extra == "docs"
|
|
59
59
|
Provides-Extra: inventory
|
|
60
|
-
Requires-Dist: dkist-inventory<2.0,>=1.
|
|
60
|
+
Requires-Dist: dkist-inventory<2.0,>=1.11.0; extra == "inventory"
|
|
61
61
|
Provides-Extra: asdf
|
|
62
|
-
Requires-Dist: dkist-inventory[asdf]<2.0,>=1.
|
|
62
|
+
Requires-Dist: dkist-inventory[asdf]<2.0,>=1.11.0; extra == "asdf"
|
|
63
63
|
Provides-Extra: quality
|
|
64
64
|
Requires-Dist: dkist-quality<3.0,>=2.0.0; extra == "quality"
|
|
65
65
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Add parameters and their associated values relevant to a particular processing pipeline run to the metadata ASDF file generated in trial workflows.
|
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Components of the Constant model.
|
|
3
|
+
|
|
4
|
+
Contains names of database entries and Base class for an object that simplifies
|
|
5
|
+
accessing the database (tab completion, etc.)
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from enum import StrEnum
|
|
9
|
+
from enum import unique
|
|
10
|
+
from string import ascii_uppercase
|
|
11
|
+
|
|
12
|
+
from sqids import Sqids
|
|
13
|
+
|
|
14
|
+
from dkist_processing_common._util.constants import ConstantsDb
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@unique
|
|
18
|
+
class BudName(StrEnum):
|
|
19
|
+
"""Controlled list of names for constant stems (buds)."""
|
|
20
|
+
|
|
21
|
+
instrument = "INSTRUMENT"
|
|
22
|
+
num_cs_steps = "NUM_CS_STEPS"
|
|
23
|
+
num_modstates = "NUM_MODSTATES"
|
|
24
|
+
retarder_name = "RETARDER_NAME"
|
|
25
|
+
proposal_id = "PROPOSAL_ID"
|
|
26
|
+
contributing_proposal_ids = "CONTRIBUTING_PROPOSAL_IDS"
|
|
27
|
+
experiment_id = "EXPERIMENT_ID"
|
|
28
|
+
contributing_experiment_ids = "CONTRIBUTING_EXPERIMENT_IDS"
|
|
29
|
+
obs_ip_start_time = "OBS_IP_START_TIME"
|
|
30
|
+
average_cadence = "AVERAGE_CADENCE"
|
|
31
|
+
maximum_cadence = "MAXIMUM_CADENCE"
|
|
32
|
+
minimum_cadence = "MINIMUM_CADENCE"
|
|
33
|
+
variance_cadence = "VARIANCE_CADENCE"
|
|
34
|
+
num_dsps_repeats = "NUM_DSPS_REPEATS"
|
|
35
|
+
dark_exposure_times = "DARK_EXPOSURE_TIMES"
|
|
36
|
+
dark_readout_exp_times = "DARK_READOUT_EXP_TIMES"
|
|
37
|
+
wavelength = "WAVELENGTH"
|
|
38
|
+
camera_id = "CAMERA_ID"
|
|
39
|
+
camera_name = "CAMERA_NAME"
|
|
40
|
+
camera_bit_depth = "CAMERA_BIT_DEPTH"
|
|
41
|
+
hardware_binning_x = "HARDWARE_BINNING_X"
|
|
42
|
+
hardware_binning_y = "HARDWARE_BINNING_Y"
|
|
43
|
+
software_binning_x = "SOFTWARE_BINNING_X"
|
|
44
|
+
software_binning_y = "SOFTWARE_BINNING_Y"
|
|
45
|
+
hls_version = "HLS_VERSION"
|
|
46
|
+
# Multi-task buds start here:
|
|
47
|
+
dark_observing_program_execution_ids = "DARK_OBSERVING_PROGRAM_EXECUTION_IDS"
|
|
48
|
+
solar_gain_observing_program_execution_ids = "SOLAR_GAIN_OBSERVING_PROGRAM_EXECUTION_IDS"
|
|
49
|
+
polcal_observing_program_execution_ids = "POLCAL_OBSERVING_PROGRAM_EXECUTION_IDS"
|
|
50
|
+
dark_date_begin = "DARK_DATE_BEGIN"
|
|
51
|
+
solar_gain_date_begin = "SOLAR_GAIN_DATE_BEGIN"
|
|
52
|
+
polcal_date_begin = "POLCAL_DATE_BEGIN"
|
|
53
|
+
dark_date_end = "DARK_DATE_END"
|
|
54
|
+
solar_gain_date_end = "SOLAR_GAIN_DATE_END"
|
|
55
|
+
polcal_date_end = "POLCAL_DATE_END"
|
|
56
|
+
solar_gain_num_raw_frames_per_fpa = "SOLAR_GAIN_NUM_RAW_FRAMES_PER_FPA"
|
|
57
|
+
polcal_num_raw_frames_per_fpa = "POLCAL_NUM_RAW_FRAMES_PER_FPA"
|
|
58
|
+
solar_gain_telescope_tracking_mode = "SOLAR_GAIN_TELESCOPE_TRACKING_MODE"
|
|
59
|
+
polcal_telescope_tracking_mode = "POLCAL_TELESCOPE_TRACKING_MODE"
|
|
60
|
+
solar_gain_coude_table_tracking_mode = "SOLAR_GAIN_COUDE_TABLE_TRACKING_MODE"
|
|
61
|
+
polcal_coude_table_tracking_mode = "POLCAL_COUDE_TABLE_TRACKING_MODE"
|
|
62
|
+
solar_gain_telescope_scanning_mode = "SOLAR_GAIN_TELESCOPE_SCANNING_MODE"
|
|
63
|
+
polcal_telescope_scanning_mode = "POLCAL_TELESCOPE_SCANNING_MODE"
|
|
64
|
+
dark_average_light_level = "DARK_AVERAGE_LIGHT_LEVEL"
|
|
65
|
+
solar_gain_average_light_level = "SOLAR_GAIN_AVERAGE_LIGHT_LEVEL"
|
|
66
|
+
polcal_average_light_level = "POLCAL_AVERAGE_LIGHT_LEVEL"
|
|
67
|
+
dark_average_telescope_elevation = "DARK_AVERAGE_TELESCOPE_ELEVATION"
|
|
68
|
+
solar_gain_average_telescope_elevation = "SOLAR_GAIN_AVERAGE_TELESCOPE_ELEVATION"
|
|
69
|
+
polcal_average_telescope_elevation = "POLCAL_AVERAGE_TELESCOPE_ELEVATION"
|
|
70
|
+
dark_average_coude_table_angle = "DARK_AVERAGE_COUDE_TABLE_ANGLE"
|
|
71
|
+
solar_gain_average_coude_table_angle = "SOLAR_GAIN_AVERAGE_COUDE_TABLE_ANGLE"
|
|
72
|
+
polcal_average_coude_table_angle = "POLCAL_AVERAGE_COUDE_TABLE_ANGLE"
|
|
73
|
+
dark_average_telescope_azimuth = "DARK_AVERAGE_TELESCOPE_AZIMUTH"
|
|
74
|
+
solar_gain_average_telescope_azimuth = "SOLAR_GAIN_AVERAGE_TELESCOPE_AZIMUTH"
|
|
75
|
+
polcal_average_telescope_azimuth = "POLCAL_AVERAGE_TELESCOPE_AZIMUTH"
|
|
76
|
+
dark_gos_level3_status = "DARK_GOS_LEVEL3_STATUS"
|
|
77
|
+
solar_gain_gos_level3_status = "SOLAR_GAIN_GOS_LEVEL3_STATUS"
|
|
78
|
+
dark_gos_level3_lamp_status = "DARK_GOS_LEVEL3_LAMP_STATUS"
|
|
79
|
+
solar_gain_gos_level3_lamp_status = "SOLAR_GAIN_GOS_LEVEL3_LAMP_STATUS"
|
|
80
|
+
dark_gos_polarizer_status = "DARK_GOS_POLARIZER_STATUS"
|
|
81
|
+
solar_gain_gos_polarizer_status = "SOLAR_GAIN_GOS_POLARIZER_STATUS"
|
|
82
|
+
dark_gos_polarizer_angle = "DARK_GOS_POLARIZER_ANGLE"
|
|
83
|
+
solar_gain_gos_polarizer_angle = "SOLAR_GAIN_GOS_POLARIZER_ANGLE"
|
|
84
|
+
dark_gos_retarder_status = "DARK_GOS_RETARDER_STATUS"
|
|
85
|
+
solar_gain_gos_retarder_status = "SOLAR_GAIN_GOS_RETARDER_STATUS"
|
|
86
|
+
dark_gos_retarder_angle = "DARK_GOS_RETARDER_ANGLE"
|
|
87
|
+
solar_gain_gos_retarder_angle = "SOLAR_GAIN_GOS_RETARDER_ANGLE"
|
|
88
|
+
dark_gos_level0_status = "DARK_GOS_LEVEL0_STATUS"
|
|
89
|
+
solar_gain_gos_level0_status = "SOLAR_GAIN_GOS_LEVEL0_STATUS"
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
class ConstantsBase:
|
|
93
|
+
"""
|
|
94
|
+
Aggregate (from the constant buds flower pot) in a single property on task classes.
|
|
95
|
+
|
|
96
|
+
It also provides some default constants, but is intended to be subclassed by instruments.
|
|
97
|
+
|
|
98
|
+
To subclass:
|
|
99
|
+
|
|
100
|
+
1. Create the actual subclass. All you need to do is add more @properties for the constants you want
|
|
101
|
+
|
|
102
|
+
2. Update the instrument class's `constants_model_class` property to return the new subclass. For example::
|
|
103
|
+
|
|
104
|
+
class NewConstants(ConstantsBase):
|
|
105
|
+
@property
|
|
106
|
+
def something(self):
|
|
107
|
+
return 7
|
|
108
|
+
|
|
109
|
+
class InstrumentWorkflowTask(WorkflowTaskBase):
|
|
110
|
+
@property
|
|
111
|
+
def constants_model_class:
|
|
112
|
+
return NewConstants
|
|
113
|
+
|
|
114
|
+
...
|
|
115
|
+
|
|
116
|
+
Parameters
|
|
117
|
+
----------
|
|
118
|
+
recipe_run_id
|
|
119
|
+
The recipe_run_id
|
|
120
|
+
task_name
|
|
121
|
+
The task_name
|
|
122
|
+
"""
|
|
123
|
+
|
|
124
|
+
def __init__(self, recipe_run_id: int, task_name: str):
|
|
125
|
+
self._db_dict = ConstantsDb(recipe_run_id=recipe_run_id, task_name=task_name)
|
|
126
|
+
self._recipe_run_id = recipe_run_id
|
|
127
|
+
|
|
128
|
+
# These management functions are all underscored because we want tab-complete to *only* show the available
|
|
129
|
+
# constants
|
|
130
|
+
def _update(self, d: dict):
|
|
131
|
+
self._db_dict.update(d)
|
|
132
|
+
|
|
133
|
+
def _purge(self):
|
|
134
|
+
self._db_dict.purge()
|
|
135
|
+
|
|
136
|
+
def _close(self):
|
|
137
|
+
self._db_dict.close()
|
|
138
|
+
|
|
139
|
+
def _rollback(self):
|
|
140
|
+
self._db_dict.rollback()
|
|
141
|
+
|
|
142
|
+
@property
|
|
143
|
+
def dataset_id(self) -> str:
|
|
144
|
+
"""Define the dataset id constant."""
|
|
145
|
+
return Sqids(min_length=6, alphabet=ascii_uppercase).encode([self._recipe_run_id])
|
|
146
|
+
|
|
147
|
+
@property
|
|
148
|
+
def stokes_params(self) -> list[str]:
|
|
149
|
+
"""Return the list of stokes parameter names."""
|
|
150
|
+
return ["I", "Q", "U", "V"]
|
|
151
|
+
|
|
152
|
+
@property
|
|
153
|
+
def instrument(self) -> str:
|
|
154
|
+
"""Get the instrument name."""
|
|
155
|
+
return self._db_dict[BudName.instrument]
|
|
156
|
+
|
|
157
|
+
@property
|
|
158
|
+
def num_cs_steps(self) -> int:
|
|
159
|
+
"""Get the number of calibration sequence steps."""
|
|
160
|
+
return self._db_dict[BudName.num_cs_steps]
|
|
161
|
+
|
|
162
|
+
@property
|
|
163
|
+
def num_modstates(self) -> int:
|
|
164
|
+
"""Get the number of modulation states."""
|
|
165
|
+
return self._db_dict[BudName.num_modstates]
|
|
166
|
+
|
|
167
|
+
@property
|
|
168
|
+
def retarder_name(self) -> str:
|
|
169
|
+
"""Get the retarder name."""
|
|
170
|
+
return self._db_dict[BudName.retarder_name]
|
|
171
|
+
|
|
172
|
+
@property
|
|
173
|
+
def proposal_id(self) -> str:
|
|
174
|
+
"""Get the proposal ID constant."""
|
|
175
|
+
return self._db_dict[BudName.proposal_id]
|
|
176
|
+
|
|
177
|
+
@property
|
|
178
|
+
def contributing_proposal_ids(self) -> list[str]:
|
|
179
|
+
"""Return the list of contributing proposal IDs."""
|
|
180
|
+
proposal_ids = self._db_dict[BudName.contributing_proposal_ids]
|
|
181
|
+
return list(proposal_ids)
|
|
182
|
+
|
|
183
|
+
@property
|
|
184
|
+
def experiment_id(self) -> str:
|
|
185
|
+
"""Get the experiment ID constant."""
|
|
186
|
+
return self._db_dict[BudName.experiment_id]
|
|
187
|
+
|
|
188
|
+
@property
|
|
189
|
+
def contributing_experiment_ids(self) -> list[str]:
|
|
190
|
+
"""Return the list of contributing experiment IDs."""
|
|
191
|
+
experiment_ids = self._db_dict[BudName.contributing_experiment_ids]
|
|
192
|
+
return list(experiment_ids)
|
|
193
|
+
|
|
194
|
+
@property
|
|
195
|
+
def obs_ip_start_time(self) -> str:
|
|
196
|
+
"""Return the start time of the observe IP."""
|
|
197
|
+
return self._db_dict[BudName.obs_ip_start_time]
|
|
198
|
+
|
|
199
|
+
@property
|
|
200
|
+
def average_cadence(self) -> float:
|
|
201
|
+
"""Get the average cadence constant."""
|
|
202
|
+
return self._db_dict[BudName.average_cadence]
|
|
203
|
+
|
|
204
|
+
@property
|
|
205
|
+
def maximum_cadence(self) -> float:
|
|
206
|
+
"""Get the maximum cadence constant constant."""
|
|
207
|
+
return self._db_dict[BudName.maximum_cadence]
|
|
208
|
+
|
|
209
|
+
@property
|
|
210
|
+
def minimum_cadence(self) -> float:
|
|
211
|
+
"""Get the minimum cadence constant constant."""
|
|
212
|
+
return self._db_dict[BudName.minimum_cadence]
|
|
213
|
+
|
|
214
|
+
@property
|
|
215
|
+
def variance_cadence(self) -> float:
|
|
216
|
+
"""Get the variance of the cadence constant."""
|
|
217
|
+
return self._db_dict[BudName.variance_cadence]
|
|
218
|
+
|
|
219
|
+
@property
|
|
220
|
+
def num_dsps_repeats(self) -> int:
|
|
221
|
+
"""Get the number of dsps repeats."""
|
|
222
|
+
return self._db_dict[BudName.num_dsps_repeats]
|
|
223
|
+
|
|
224
|
+
@property
|
|
225
|
+
def dark_exposure_times(self) -> list[float]:
|
|
226
|
+
"""Get a list of exposure times used in the dark calibration."""
|
|
227
|
+
exposure_times = self._db_dict[BudName.dark_exposure_times]
|
|
228
|
+
return list(exposure_times)
|
|
229
|
+
|
|
230
|
+
@property
|
|
231
|
+
def dark_readout_exp_times(self) -> list[float]:
|
|
232
|
+
"""Get a list of readout exp times for all dark frames."""
|
|
233
|
+
readout_times = self._db_dict[BudName.dark_readout_exp_times]
|
|
234
|
+
return list(readout_times)
|
|
235
|
+
|
|
236
|
+
@property
|
|
237
|
+
def wavelength(self) -> float:
|
|
238
|
+
"""Wavelength."""
|
|
239
|
+
return self._db_dict[BudName.wavelength]
|
|
240
|
+
|
|
241
|
+
@property
|
|
242
|
+
def camera_id(self) -> str:
|
|
243
|
+
"""Return the camera ID constant."""
|
|
244
|
+
return self._db_dict[BudName.camera_id]
|
|
245
|
+
|
|
246
|
+
@property
|
|
247
|
+
def camera_name(self) -> str:
|
|
248
|
+
"""Return the camera name for humans constant."""
|
|
249
|
+
return self._db_dict[BudName.camera_name]
|
|
250
|
+
|
|
251
|
+
@property
|
|
252
|
+
def camera_bit_depth(self) -> int:
|
|
253
|
+
"""Return the camera bit depth constant."""
|
|
254
|
+
return self._db_dict[BudName.camera_bit_depth]
|
|
255
|
+
|
|
256
|
+
@property
|
|
257
|
+
def hardware_binning_x(self) -> int:
|
|
258
|
+
"""Return the x-direction hardware binning constant."""
|
|
259
|
+
return self._db_dict[BudName.hardware_binning_x]
|
|
260
|
+
|
|
261
|
+
@property
|
|
262
|
+
def hardware_binning_y(self) -> int:
|
|
263
|
+
"""Return the y-direction hardware binning constant."""
|
|
264
|
+
return self._db_dict[BudName.hardware_binning_y]
|
|
265
|
+
|
|
266
|
+
@property
|
|
267
|
+
def software_binning_x(self) -> int:
|
|
268
|
+
"""Return the x-direction software binning constant."""
|
|
269
|
+
return self._db_dict[BudName.software_binning_x]
|
|
270
|
+
|
|
271
|
+
@property
|
|
272
|
+
def software_binning_y(self) -> int:
|
|
273
|
+
"""Return the y-direction software binning constant."""
|
|
274
|
+
return self._db_dict[BudName.software_binning_y]
|
|
275
|
+
|
|
276
|
+
@property
|
|
277
|
+
def hls_version(self) -> str:
|
|
278
|
+
"""Return the High-Level Software version."""
|
|
279
|
+
return self._db_dict[BudName.hls_version]
|
|
280
|
+
|
|
281
|
+
# Multi-task constants start here:
|
|
282
|
+
|
|
283
|
+
@property
|
|
284
|
+
def dark_observing_program_execution_ids(self) -> list[str]:
|
|
285
|
+
"""Return the observing program execution ids constant for the dark task."""
|
|
286
|
+
observing_programs = self._db_dict[BudName.dark_observing_program_execution_ids]
|
|
287
|
+
return list(observing_programs)
|
|
288
|
+
|
|
289
|
+
@property
|
|
290
|
+
def solar_gain_observing_program_execution_ids(self) -> list[str]:
|
|
291
|
+
"""Return the observing program execution ids constant for the solar_gain task."""
|
|
292
|
+
observing_programs = self._db_dict[BudName.solar_gain_observing_program_execution_ids]
|
|
293
|
+
return list(observing_programs)
|
|
294
|
+
|
|
295
|
+
@property
|
|
296
|
+
def polcal_observing_program_execution_ids(self) -> list[str]:
|
|
297
|
+
"""Return the observing program execution ids constant."""
|
|
298
|
+
observing_programs = self._db_dict[BudName.polcal_observing_program_execution_ids]
|
|
299
|
+
return list(observing_programs)
|
|
300
|
+
|
|
301
|
+
@property
|
|
302
|
+
def dark_date_begin(self) -> str:
|
|
303
|
+
"""Return the date begin header constant for the dark task."""
|
|
304
|
+
return self._db_dict[BudName.dark_date_begin]
|
|
305
|
+
|
|
306
|
+
@property
|
|
307
|
+
def solar_gain_date_begin(self) -> str:
|
|
308
|
+
"""Return the date begin header constant for the solar gain task."""
|
|
309
|
+
return self._db_dict[BudName.solar_gain_date_begin]
|
|
310
|
+
|
|
311
|
+
@property
|
|
312
|
+
def polcal_date_begin(self) -> str:
|
|
313
|
+
"""Return the time obs header constant for the polcal task."""
|
|
314
|
+
return self._db_dict[BudName.polcal_date_begin]
|
|
315
|
+
|
|
316
|
+
@property
|
|
317
|
+
def dark_date_end(self) -> str:
|
|
318
|
+
"""Return the date end constant for the dark task."""
|
|
319
|
+
return self._db_dict[BudName.dark_date_end]
|
|
320
|
+
|
|
321
|
+
@property
|
|
322
|
+
def solar_gain_date_end(self) -> str:
|
|
323
|
+
"""Return the date end constant for the solar gain task."""
|
|
324
|
+
return self._db_dict[BudName.solar_gain_date_end]
|
|
325
|
+
|
|
326
|
+
@property
|
|
327
|
+
def polcal_date_end(self) -> str:
|
|
328
|
+
"""Return the date end constant for the polcal task."""
|
|
329
|
+
return self._db_dict[BudName.polcal_date_end]
|
|
330
|
+
|
|
331
|
+
@property
|
|
332
|
+
def solar_gain_num_raw_frames_per_fpa(self) -> int:
|
|
333
|
+
"""Return the number of raw frames per fpa constant for the solar gain task."""
|
|
334
|
+
return self._db_dict[BudName.solar_gain_num_raw_frames_per_fpa]
|
|
335
|
+
|
|
336
|
+
@property
|
|
337
|
+
def polcal_num_raw_frames_per_fpa(self) -> int:
|
|
338
|
+
"""Return the num raw frames per fpa constant for the polcal task."""
|
|
339
|
+
return self._db_dict[BudName.polcal_num_raw_frames_per_fpa]
|
|
340
|
+
|
|
341
|
+
@property
|
|
342
|
+
def solar_gain_telescope_tracking_mode(self) -> str:
|
|
343
|
+
"""Return the telescope tracking mode constant for the solar gain task."""
|
|
344
|
+
return self._db_dict[BudName.solar_gain_telescope_tracking_mode]
|
|
345
|
+
|
|
346
|
+
@property
|
|
347
|
+
def polcal_telescope_tracking_mode(self) -> str:
|
|
348
|
+
"""Return the telescope tracking mode constant for the polcal task."""
|
|
349
|
+
return self._db_dict[BudName.polcal_telescope_tracking_mode]
|
|
350
|
+
|
|
351
|
+
@property
|
|
352
|
+
def solar_gain_coude_table_tracking_mode(self) -> str:
|
|
353
|
+
"""Return the coude table tracking mode constant for the solar gain task."""
|
|
354
|
+
return self._db_dict[BudName.solar_gain_coude_table_tracking_mode]
|
|
355
|
+
|
|
356
|
+
@property
|
|
357
|
+
def polcal_coude_table_tracking_mode(self) -> str:
|
|
358
|
+
"""Return the coude table tracking mode constant for the polcal task."""
|
|
359
|
+
return self._db_dict[BudName.polcal_coude_table_tracking_mode]
|
|
360
|
+
|
|
361
|
+
@property
|
|
362
|
+
def solar_gain_telescope_scanning_mode(self) -> str:
|
|
363
|
+
"""Return the telescope scanning mode constant for the solar gain task."""
|
|
364
|
+
return self._db_dict[BudName.solar_gain_telescope_scanning_mode]
|
|
365
|
+
|
|
366
|
+
@property
|
|
367
|
+
def polcal_telescope_scanning_mode(self) -> str:
|
|
368
|
+
"""Return the telescope scanning mode constant for the polcal task."""
|
|
369
|
+
return self._db_dict[BudName.polcal_telescope_scanning_mode]
|
|
370
|
+
|
|
371
|
+
@property
|
|
372
|
+
def dark_average_light_level(self) -> float:
|
|
373
|
+
"""Return the average light level constant for the dark task."""
|
|
374
|
+
return self._db_dict[BudName.dark_average_light_level]
|
|
375
|
+
|
|
376
|
+
@property
|
|
377
|
+
def solar_gain_average_light_level(self) -> float:
|
|
378
|
+
"""Return the average light level constant for the solar gain task."""
|
|
379
|
+
return self._db_dict[BudName.solar_gain_average_light_level]
|
|
380
|
+
|
|
381
|
+
@property
|
|
382
|
+
def polcal_average_light_level(self) -> float:
|
|
383
|
+
"""Return the average light level constant for the polcal task."""
|
|
384
|
+
return self._db_dict[BudName.polcal_average_light_level]
|
|
385
|
+
|
|
386
|
+
@property
|
|
387
|
+
def dark_average_telescope_elevation(self) -> float:
|
|
388
|
+
"""Return the average telescope elevation constant for the dark task."""
|
|
389
|
+
return self._db_dict[BudName.dark_average_telescope_elevation]
|
|
390
|
+
|
|
391
|
+
@property
|
|
392
|
+
def solar_gain_average_telescope_elevation(self) -> float:
|
|
393
|
+
"""Return the average telescope elevation constant for the solar gain task."""
|
|
394
|
+
return self._db_dict[BudName.solar_gain_average_telescope_elevation]
|
|
395
|
+
|
|
396
|
+
@property
|
|
397
|
+
def polcal_average_telescope_elevation(self) -> float:
|
|
398
|
+
"""Return the average telescope elevation constant for the polcal task."""
|
|
399
|
+
return self._db_dict[BudName.polcal_average_telescope_elevation]
|
|
400
|
+
|
|
401
|
+
@property
|
|
402
|
+
def dark_average_coude_table_angle(self) -> float:
|
|
403
|
+
"""Return the average coude table angle constant for the dark task."""
|
|
404
|
+
return self._db_dict[BudName.dark_average_coude_table_angle]
|
|
405
|
+
|
|
406
|
+
@property
|
|
407
|
+
def solar_gain_average_coude_table_angle(self) -> float:
|
|
408
|
+
"""Return the average coude table angle constant for the solar gain task."""
|
|
409
|
+
return self._db_dict[BudName.solar_gain_average_coude_table_angle]
|
|
410
|
+
|
|
411
|
+
@property
|
|
412
|
+
def polcal_average_coude_table_angle(self) -> float:
|
|
413
|
+
"""Return the average coude table angle constant for the polcal task."""
|
|
414
|
+
return self._db_dict[BudName.polcal_average_coude_table_angle]
|
|
415
|
+
|
|
416
|
+
@property
|
|
417
|
+
def dark_average_telescope_azimuth(self) -> float:
|
|
418
|
+
"""Return the average telescope azimuth constant for the dark task."""
|
|
419
|
+
return self._db_dict[BudName.dark_average_telescope_azimuth]
|
|
420
|
+
|
|
421
|
+
@property
|
|
422
|
+
def solar_gain_average_telescope_azimuth(self) -> float:
|
|
423
|
+
"""Return the average telescope azimuth constant for the solar gain task."""
|
|
424
|
+
return self._db_dict[BudName.solar_gain_average_telescope_azimuth]
|
|
425
|
+
|
|
426
|
+
@property
|
|
427
|
+
def polcal_average_telescope_azimuth(self) -> float:
|
|
428
|
+
"""Return the average telescope azimuth constant for the polcal task."""
|
|
429
|
+
return self._db_dict[BudName.polcal_average_telescope_azimuth]
|
|
430
|
+
|
|
431
|
+
@property
|
|
432
|
+
def dark_gos_level3_status(self) -> str:
|
|
433
|
+
"""Return the gos level3 status constant for the dark task."""
|
|
434
|
+
return self._db_dict[BudName.dark_gos_level3_status]
|
|
435
|
+
|
|
436
|
+
@property
|
|
437
|
+
def solar_gain_gos_level3_status(self) -> str:
|
|
438
|
+
"""Return the gos level3 status constant for the solar gain task."""
|
|
439
|
+
return self._db_dict[BudName.solar_gain_gos_level3_status]
|
|
440
|
+
|
|
441
|
+
@property
|
|
442
|
+
def dark_gos_level3_lamp_status(self) -> str:
|
|
443
|
+
"""Return the gos level3 lamp status constant for the dark task."""
|
|
444
|
+
return self._db_dict[BudName.dark_gos_level3_lamp_status]
|
|
445
|
+
|
|
446
|
+
@property
|
|
447
|
+
def solar_gain_gos_level3_lamp_status(self) -> str:
|
|
448
|
+
"""Return the gos level3 lamp status constant for the solar gain task."""
|
|
449
|
+
return self._db_dict[BudName.solar_gain_gos_level3_lamp_status]
|
|
450
|
+
|
|
451
|
+
@property
|
|
452
|
+
def dark_gos_polarizer_status(self) -> str:
|
|
453
|
+
"""Return the gos polarizer status constant for the dark task."""
|
|
454
|
+
return self._db_dict[BudName.dark_gos_polarizer_status]
|
|
455
|
+
|
|
456
|
+
@property
|
|
457
|
+
def solar_gain_gos_polarizer_status(self) -> str:
|
|
458
|
+
"""Return the gos polarizer status constant for the solar gain task."""
|
|
459
|
+
return self._db_dict[BudName.solar_gain_gos_polarizer_status]
|
|
460
|
+
|
|
461
|
+
@property
|
|
462
|
+
def dark_gos_polarizer_angle(self) -> float:
|
|
463
|
+
"""Return the gos polarizer angle constant for the dark task."""
|
|
464
|
+
return self._db_dict[BudName.dark_gos_polarizer_angle]
|
|
465
|
+
|
|
466
|
+
@property
|
|
467
|
+
def solar_gain_gos_polarizer_angle(self) -> float:
|
|
468
|
+
"""Return the gos polarizer angle constant for the solar gain task."""
|
|
469
|
+
return self._db_dict[BudName.solar_gain_gos_polarizer_angle]
|
|
470
|
+
|
|
471
|
+
@property
|
|
472
|
+
def dark_gos_retarder_status(self) -> str:
|
|
473
|
+
"""Return the gos retarder status constant for the dark task."""
|
|
474
|
+
return self._db_dict[BudName.dark_gos_retarder_status]
|
|
475
|
+
|
|
476
|
+
@property
|
|
477
|
+
def solar_gain_gos_retarder_status(self) -> str:
|
|
478
|
+
"""Return the gos retarder status constant for the solar gain task."""
|
|
479
|
+
return self._db_dict[BudName.solar_gain_gos_retarder_status]
|
|
480
|
+
|
|
481
|
+
@property
|
|
482
|
+
def dark_gos_retarder_angle(self) -> float:
|
|
483
|
+
"""Return the gos retarder angle constant for the dark task."""
|
|
484
|
+
return self._db_dict[BudName.dark_gos_retarder_angle]
|
|
485
|
+
|
|
486
|
+
@property
|
|
487
|
+
def solar_gain_gos_retarder_angle(self) -> float:
|
|
488
|
+
"""Return the gos retarder angle constant for the solar gain task."""
|
|
489
|
+
return self._db_dict[BudName.solar_gain_gos_retarder_angle]
|
|
490
|
+
|
|
491
|
+
@property
|
|
492
|
+
def dark_gos_level0_status(self) -> str:
|
|
493
|
+
"""Return the gos level0 status constant for the dark task."""
|
|
494
|
+
return self._db_dict[BudName.dark_gos_level0_status]
|
|
495
|
+
|
|
496
|
+
@property
|
|
497
|
+
def solar_gain_gos_level0_status(self) -> str:
|
|
498
|
+
"""Return the gos level0 status constant for the solar gain task."""
|
|
499
|
+
return self._db_dict[BudName.solar_gain_gos_level0_status]
|
|
@@ -3,15 +3,16 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from enum import StrEnum
|
|
6
|
+
from enum import unique
|
|
6
7
|
from pathlib import Path
|
|
7
|
-
from typing import Any
|
|
8
8
|
|
|
9
9
|
import numpy as np
|
|
10
10
|
from astropy.io import fits
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
HEADER_KEY_NOT_FOUND = "HEADER_KEY_NOT_FOUND"
|
|
13
13
|
|
|
14
14
|
|
|
15
|
+
@unique
|
|
15
16
|
class MetadataKey(StrEnum):
|
|
16
17
|
"""Controlled list of names for FITS metadata header keys."""
|
|
17
18
|
|
|
@@ -39,6 +40,19 @@ class MetadataKey(StrEnum):
|
|
|
39
40
|
fpa_exposure_time_ms = "XPOSURE"
|
|
40
41
|
sensor_readout_exposure_time_ms = "TEXPOSUR"
|
|
41
42
|
num_raw_frames_per_fpa = "NSUMEXP"
|
|
43
|
+
camera_id = "CAM_ID"
|
|
44
|
+
camera_name = "CAMERA"
|
|
45
|
+
camera_bit_depth = "BITDEPTH"
|
|
46
|
+
hardware_binning_x = "HWBIN1"
|
|
47
|
+
hardware_binning_y = "HWBIN2"
|
|
48
|
+
software_binning_x = "SWBIN1"
|
|
49
|
+
software_binning_y = "SWBIN2"
|
|
50
|
+
observing_program_execution_id = "OBSPR_ID"
|
|
51
|
+
telescope_tracking_mode = "TELTRACK"
|
|
52
|
+
coude_table_tracking_mode = "TTBLTRCK"
|
|
53
|
+
telescope_scanning_mode = "TELSCAN"
|
|
54
|
+
light_level = "LIGHTLVL"
|
|
55
|
+
hls_version = "HLSVERS"
|
|
42
56
|
|
|
43
57
|
|
|
44
58
|
class FitsAccessBase:
|
|
@@ -68,29 +82,6 @@ class FitsAccessBase:
|
|
|
68
82
|
def __repr__(self):
|
|
69
83
|
return f"{self.__class__.__name__}(hdu={self._hdu!r}, name={self.name!r}, auto_squeeze={self.auto_squeeze})"
|
|
70
84
|
|
|
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
85
|
@property
|
|
95
86
|
def data(self) -> np.ndarray:
|
|
96
87
|
"""
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"""Pre-made flower that reads a single header key from all files with specific task types and returns the average."""
|
|
2
|
+
|
|
3
|
+
from enum import StrEnum
|
|
4
|
+
from statistics import mean
|
|
5
|
+
from typing import Callable
|
|
6
|
+
from typing import Hashable
|
|
7
|
+
|
|
8
|
+
import numpy as np
|
|
9
|
+
|
|
10
|
+
from dkist_processing_common.parsers.near_bud import TaskNearFloatBud
|
|
11
|
+
from dkist_processing_common.parsers.task import passthrough_header_ip_task
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class TaskAverageBud(TaskNearFloatBud):
|
|
15
|
+
"""
|
|
16
|
+
Pre-made bud that returns the average of a single header key from all files with specific task types.
|
|
17
|
+
|
|
18
|
+
Parameters
|
|
19
|
+
----------
|
|
20
|
+
constant_name
|
|
21
|
+
The name for the constant to be defined
|
|
22
|
+
|
|
23
|
+
metadata_key
|
|
24
|
+
The metadata key associated with the constant
|
|
25
|
+
|
|
26
|
+
ip_task_types
|
|
27
|
+
Only consider objects whose parsed header IP task type matches a string in this list
|
|
28
|
+
|
|
29
|
+
task_type_parsing_function
|
|
30
|
+
The function used to convert a header into an IP task type
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
key_to_petal_dict: dict[str, float]
|
|
34
|
+
|
|
35
|
+
def __init__(
|
|
36
|
+
self,
|
|
37
|
+
constant_name: str,
|
|
38
|
+
metadata_key: str | StrEnum,
|
|
39
|
+
ip_task_types: str | list[str],
|
|
40
|
+
task_type_parsing_function: Callable = passthrough_header_ip_task,
|
|
41
|
+
):
|
|
42
|
+
super().__init__(
|
|
43
|
+
constant_name=constant_name,
|
|
44
|
+
metadata_key=metadata_key,
|
|
45
|
+
ip_task_types=ip_task_types,
|
|
46
|
+
tolerance=np.inf,
|
|
47
|
+
task_type_parsing_function=task_type_parsing_function,
|
|
48
|
+
)
|