dkist-processing-common 10.6.4__tar.gz → 10.7.1__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-10.6.4 → dkist_processing_common-10.7.1}/CHANGELOG.rst +32 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/PKG-INFO +1 -1
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/bitbucket-pipelines.yml +1 -1
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tasks/write_l1.py +16 -12
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/conftest.py +1 -1
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_fits_access.py +16 -9
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_write_l1.py +4 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common.egg-info/PKG-INFO +1 -1
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/pyproject.toml +1 -1
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/.gitignore +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/.pre-commit-config.yaml +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/.readthedocs.yml +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/.snyk +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/README.rst +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/changelog/.gitempty +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/__init__.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/_util/__init__.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/_util/constants.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/_util/graphql.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/_util/scratch.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/_util/tags.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/codecs/__init__.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/codecs/asdf.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/codecs/bytes.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/codecs/fits.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/codecs/iobase.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/codecs/json.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/codecs/path.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/codecs/quality.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/codecs/str.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/config.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/fonts/Lato-Regular.ttf +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/fonts/__init__.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/manual.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/models/__init__.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/models/constants.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/models/fits_access.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/models/flower_pot.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/models/graphql.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/models/message.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/models/message_queue_binding.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/models/metric_code.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/models/parameters.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/models/quality.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/models/tags.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/models/task_name.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/models/wavelength.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/parsers/__init__.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/parsers/cs_step.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/parsers/dsps_repeat.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/parsers/experiment_id_bud.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/parsers/id_bud.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/parsers/l0_fits_access.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/parsers/l1_fits_access.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/parsers/near_bud.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/parsers/proposal_id_bud.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/parsers/quality.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/parsers/retarder.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/parsers/single_value_single_key_flower.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/parsers/task.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/parsers/time.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/parsers/unique_bud.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/parsers/wavelength.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tasks/__init__.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tasks/assemble_movie.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tasks/base.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tasks/l1_output_data.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tasks/mixin/__init__.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tasks/mixin/globus.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tasks/mixin/input_dataset.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tasks/mixin/interservice_bus.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tasks/mixin/metadata_store.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tasks/mixin/object_store.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tasks/mixin/quality/__init__.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tasks/mixin/quality/_base.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tasks/mixin/quality/_metrics.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tasks/output_data_base.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tasks/parse_l0_input_data.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tasks/quality_metrics.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tasks/teardown.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tasks/transfer_input_data.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tasks/trial_catalog.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tasks/trial_output_data.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/__init__.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_assemble_movie.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_assemble_quality.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_base.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_codecs.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_constants.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_cs_step.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_flower_pot.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_input_dataset.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_interservice_bus.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_interservice_bus_mixin.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_manual_processing.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_output_data_base.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_parameters.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_parse_l0_input_data.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_publish_catalog_messages.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_quality.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_quality_mixin.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_scratch.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_stems.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_submit_dataset_metadata.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_tags.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_task_name.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_task_parsing.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_teardown.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_transfer_input_data.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_transfer_l1_output_data.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_trial_catalog.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_trial_output_data.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/tests/test_workflow_task_base.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common.egg-info/SOURCES.txt +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common.egg-info/dependency_links.txt +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common.egg-info/requires.txt +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common.egg-info/top_level.txt +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/docs/Makefile +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/docs/changelog.rst +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/docs/conf.py +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/docs/index.rst +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/docs/landing_page.rst +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/docs/make.bat +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/docs/requirements.txt +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/licenses/LICENSE.rst +0 -0
- {dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/setup.cfg +0 -0
|
@@ -1,3 +1,35 @@
|
|
|
1
|
+
v10.7.1 (2025-04-17)
|
|
2
|
+
====================
|
|
3
|
+
|
|
4
|
+
Bugfixes
|
|
5
|
+
--------
|
|
6
|
+
|
|
7
|
+
- Fix a bug exposed by updates in the `dkist-inventory` package that did not manage HISTORY or COMMENT cards correctly. (`#248 <https://bitbucket.org/dkistdc/dkist-processing-common/pull-requests/248>`__)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
v10.7.0 (2025-04-14)
|
|
11
|
+
====================
|
|
12
|
+
|
|
13
|
+
Features
|
|
14
|
+
--------
|
|
15
|
+
|
|
16
|
+
- New data percentiles are added to the headers to make the range symmetric. (`#242 <https://bitbucket.org/dkistdc/dkist-processing-common/pull-requests/242>`__)
|
|
17
|
+
- L1 headers are now created by removing only the keys listed in SPEC-122 as opposed to removing all keys not present in SPEC-214. In addition, any SPEC-214 keys marked as `level0_only` are removed. This will allow spurious header keys to be discovered more easily. (`#246 <https://bitbucket.org/dkistdc/dkist-processing-common/pull-requests/246>`__)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
Bugfixes
|
|
21
|
+
--------
|
|
22
|
+
|
|
23
|
+
- Header keys that write the percentiles of the data are now correctly named (from DATA<pp> to DATAP<pp>). (`#242 <https://bitbucket.org/dkistdc/dkist-processing-common/pull-requests/242>`__)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
Misc
|
|
27
|
+
----
|
|
28
|
+
|
|
29
|
+
- Prevent header keys from being included if they are not a part of the Level 1 SPEC-0214 specification. (`#242 <https://bitbucket.org/dkistdc/dkist-processing-common/pull-requests/242>`__)
|
|
30
|
+
- Add missing build dependency specifications. (`#247 <https://bitbucket.org/dkistdc/dkist-processing-common/pull-requests/247>`__)
|
|
31
|
+
|
|
32
|
+
|
|
1
33
|
v10.6.4 (2025-03-31)
|
|
2
34
|
====================
|
|
3
35
|
|
|
@@ -45,7 +45,7 @@ definitions:
|
|
|
45
45
|
- pip
|
|
46
46
|
name: Test
|
|
47
47
|
script:
|
|
48
|
-
- pip install -U pip
|
|
48
|
+
- pip install -U pip wheel build setuptools_scm setuptools
|
|
49
49
|
- pip install .[test]
|
|
50
50
|
- pytest -v -n auto -m "not development" --cov dkist_processing_common --cov-report=xml --cov-report=term-missing
|
|
51
51
|
- ./ci_scripts/latest/execute_script.sh upload_coverage.sh
|
|
@@ -18,7 +18,7 @@ from dkist_fits_specifications import __version__ as spec_version
|
|
|
18
18
|
from dkist_fits_specifications.utils.formatter import reformat_spec214_header
|
|
19
19
|
from dkist_header_validator import spec214_validator
|
|
20
20
|
from dkist_header_validator.translator import remove_extra_axis_keys
|
|
21
|
-
from dkist_header_validator.translator import
|
|
21
|
+
from dkist_header_validator.translator import remove_spec_122_keys_and_spec_214_l0_keys
|
|
22
22
|
from dkist_spectral_lines.search import get_closest_spectral_line
|
|
23
23
|
from dkist_spectral_lines.search import get_spectral_lines
|
|
24
24
|
from scipy.stats import kurtosis
|
|
@@ -102,7 +102,9 @@ class WriteL1Frame(WorkflowTaskBase, MetadataStoreMixin, ABC):
|
|
|
102
102
|
|
|
103
103
|
# Check that the written file passes spec 214 validation if requested
|
|
104
104
|
if self.validate_l1_on_write:
|
|
105
|
-
spec214_validator.validate(
|
|
105
|
+
spec214_validator.validate(
|
|
106
|
+
self.scratch.absolute_path(relative_path), extra=False
|
|
107
|
+
)
|
|
106
108
|
|
|
107
109
|
@cached_property
|
|
108
110
|
def tile_size_param(self) -> int | None:
|
|
@@ -170,19 +172,21 @@ class WriteL1Frame(WorkflowTaskBase, MetadataStoreMixin, ABC):
|
|
|
170
172
|
def add_stats_headers(header: fits.Header, data: np.ndarray) -> fits.Header:
|
|
171
173
|
"""Fill out the spec 214 statistics header table."""
|
|
172
174
|
data = data.flatten()
|
|
173
|
-
percentiles = np.nanpercentile(data, [1, 10, 25, 75, 90, 95, 98, 99])
|
|
175
|
+
percentiles = np.nanpercentile(data, [1, 2, 5, 10, 25, 75, 90, 95, 98, 99])
|
|
174
176
|
header["DATAMIN"] = np.nanmin(data)
|
|
175
177
|
header["DATAMAX"] = np.nanmax(data)
|
|
176
178
|
header["DATAMEAN"] = np.nanmean(data)
|
|
177
179
|
header["DATAMEDN"] = np.nanmedian(data)
|
|
178
|
-
header["
|
|
179
|
-
header["
|
|
180
|
-
header["
|
|
181
|
-
header["
|
|
182
|
-
header["
|
|
183
|
-
header["
|
|
184
|
-
header["
|
|
185
|
-
header["
|
|
180
|
+
header["DATAP01"] = percentiles[0]
|
|
181
|
+
header["DATAP02"] = percentiles[1]
|
|
182
|
+
header["DATAP05"] = percentiles[2]
|
|
183
|
+
header["DATAP10"] = percentiles[3]
|
|
184
|
+
header["DATAP25"] = percentiles[4]
|
|
185
|
+
header["DATAP75"] = percentiles[5]
|
|
186
|
+
header["DATAP90"] = percentiles[6]
|
|
187
|
+
header["DATAP95"] = percentiles[7]
|
|
188
|
+
header["DATAP98"] = percentiles[8]
|
|
189
|
+
header["DATAP99"] = percentiles[9]
|
|
186
190
|
header["DATARMS"] = np.sqrt(np.nanmean(data**2))
|
|
187
191
|
header["DATAKURT"] = kurtosis(data, nan_policy="omit")
|
|
188
192
|
header["DATASKEW"] = skew(data, nan_policy="omit")
|
|
@@ -378,7 +382,7 @@ class WriteL1Frame(WorkflowTaskBase, MetadataStoreMixin, ABC):
|
|
|
378
382
|
# Add the dataset headers (abstract - implement in instrument task)
|
|
379
383
|
header = self.add_dataset_headers(header=header, stokes=stokes_param)
|
|
380
384
|
# Remove any headers not contained in spec 214
|
|
381
|
-
header =
|
|
385
|
+
header = remove_spec_122_keys_and_spec_214_l0_keys(input_headers=header)
|
|
382
386
|
# Remove any keys referring to axes that don't exist
|
|
383
387
|
header = remove_extra_axis_keys(input_headers=header)
|
|
384
388
|
return header
|
|
@@ -113,7 +113,7 @@ class CommonDataset(Spec122Dataset):
|
|
|
113
113
|
self.add_constant_key("TELEVATN", 6.28)
|
|
114
114
|
self.add_constant_key("TAZIMUTH", 3.14)
|
|
115
115
|
self.add_constant_key("TTBLANGL", 1.23)
|
|
116
|
-
self.add_constant_key("
|
|
116
|
+
self.add_constant_key("VISP_012", "bar")
|
|
117
117
|
self.add_constant_key("DKIST004", "observe")
|
|
118
118
|
self.add_constant_key("ID___005", "ip id")
|
|
119
119
|
self.add_constant_key("PAC__004", "Sapphire Polarizer")
|
|
@@ -22,19 +22,21 @@ def hdu_with_complete_common_header(complete_common_header):
|
|
|
22
22
|
def hdu_with_special_keys(hdu_with_complete_common_header, request):
|
|
23
23
|
"""
|
|
24
24
|
An HDU with data and a header that includes variations on the special keys that make headers
|
|
25
|
-
different from
|
|
25
|
+
different from dicts.
|
|
26
|
+
|
|
27
|
+
The base complete_common_header already has history and comment cards so this fixture adds extras.
|
|
26
28
|
"""
|
|
27
29
|
add_special = request.param
|
|
28
30
|
hdu = hdu_with_complete_common_header
|
|
29
31
|
if add_special == "history":
|
|
30
32
|
hdu.header.add_history("test history")
|
|
31
|
-
return hdu
|
|
33
|
+
return hdu, request.param
|
|
32
34
|
if add_special == "comment":
|
|
33
|
-
hdu.header.
|
|
34
|
-
return hdu
|
|
35
|
+
hdu.header.add_comment("test comment")
|
|
36
|
+
return hdu, request.param
|
|
35
37
|
if add_special == "continue":
|
|
36
38
|
hdu.header["LONG_VAL"] = " " * 100
|
|
37
|
-
return hdu
|
|
39
|
+
return hdu, request.param
|
|
38
40
|
|
|
39
41
|
|
|
40
42
|
@pytest.fixture()
|
|
@@ -220,7 +222,7 @@ def test_as_subclass(hdu_with_complete_common_header):
|
|
|
220
222
|
class InstFitsAccess(L0FitsAccess):
|
|
221
223
|
def __init__(self, hdu, name):
|
|
222
224
|
super().__init__(hdu, name)
|
|
223
|
-
self.foo: str = self.header["
|
|
225
|
+
self.foo: str = self.header["VISP_012"]
|
|
224
226
|
|
|
225
227
|
fits_obj = InstFitsAccess(hdu_with_complete_common_header, name="foo")
|
|
226
228
|
assert fits_obj.foo == "bar"
|
|
@@ -282,11 +284,16 @@ def test_header_dict(hdu_with_special_keys):
|
|
|
282
284
|
"""
|
|
283
285
|
Given: A FitsAccess object with data and a header including special header keys
|
|
284
286
|
When: Accessing the header_dict method
|
|
285
|
-
Then: The object's header is successfully exported as a dict of the same length as the header
|
|
287
|
+
Then: The object's header is successfully exported as a dict of the same length as the header when accounting for multiple HISTORY or COMMENT cards
|
|
286
288
|
"""
|
|
287
|
-
|
|
289
|
+
hdu, added_header_key = hdu_with_special_keys
|
|
290
|
+
fits_obj = FitsAccessBase(hdu)
|
|
288
291
|
assert isinstance(fits_obj.header_dict, dict)
|
|
289
|
-
|
|
292
|
+
if added_header_key == "continue":
|
|
293
|
+
assert len(fits_obj.header_dict) == len(fits_obj.header)
|
|
294
|
+
if added_header_key in ["history", "comment"]:
|
|
295
|
+
# HISTORY and COMMENT keys get "squeezed"
|
|
296
|
+
assert len(fits_obj.header_dict) == len(fits_obj.header) - 1
|
|
290
297
|
|
|
291
298
|
|
|
292
299
|
@pytest.mark.parametrize(
|
|
@@ -135,6 +135,7 @@ def write_l1_task(request, recipe_run_id, tmp_path):
|
|
|
135
135
|
stokes_params = ["I", "Q", "U", "V"]
|
|
136
136
|
used_stokes_params = []
|
|
137
137
|
hdu = fits.PrimaryHDU(data=np.random.random(size=(1, 128, 128)) * 10, header=header)
|
|
138
|
+
hdu.header["IPTASK"] = "level0_only key to be removed"
|
|
138
139
|
hdul = fits.HDUList([hdu])
|
|
139
140
|
for i in range(num_of_stokes_params):
|
|
140
141
|
task.write(
|
|
@@ -279,6 +280,9 @@ def test_write_l1_frame(
|
|
|
279
280
|
# Test that FRAMEVOL still has its comment
|
|
280
281
|
assert hdu.header.comments["FRAMEVOL"]
|
|
281
282
|
|
|
283
|
+
# Test that 'level0_only' keys are being removed
|
|
284
|
+
assert "IPTASK" not in hdu.header.keys()
|
|
285
|
+
|
|
282
286
|
|
|
283
287
|
def test_replace_header_values(write_l1_task):
|
|
284
288
|
"""
|
|
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
|
{dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/config.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dkist_processing_common-10.6.4 → dkist_processing_common-10.7.1}/dkist_processing_common/manual.py
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
|