dkist-processing-cryonirsp 0.0.69__tar.gz → 0.0.71__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.
Potentially problematic release.
This version of dkist-processing-cryonirsp might be problematic. Click here for more details.
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/CHANGELOG.rst +28 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/PKG-INFO +1 -1
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/models/parameters.py +20 -52
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/parse.py +17 -33
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/conftest.py +10 -4
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/test_parameters.py +99 -39
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/test_parse.py +9 -24
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp.egg-info/PKG-INFO +1 -1
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp.egg-info/requires.txt +2 -2
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/setup.cfg +2 -2
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/.gitignore +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/.pre-commit-config.yaml +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/.readthedocs.yml +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/README.rst +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/SCIENCE_CHANGELOG.rst +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/bitbucket-pipelines.yml +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/changelog/.gitempty +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/check_changelog_updated.sh +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/__init__.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/config.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/models/__init__.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/models/constants.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/models/exposure_conditions.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/models/tags.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/models/task_name.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/parsers/__init__.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/parsers/cryonirsp_l0_fits_access.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/parsers/cryonirsp_l1_fits_access.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/parsers/exposure_conditions.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/parsers/map_repeats.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/parsers/measurements.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/parsers/modstates.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/parsers/optical_density_filters.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/parsers/polarimetric_check.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/parsers/scan_step.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/parsers/time.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/parsers/wavelength.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/__init__.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/assemble_movie.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/bad_pixel_map.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/beam_boundaries_base.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/ci_beam_boundaries.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/ci_science.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/cryonirsp_base.py +1 -1
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/dark.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/gain.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/instrument_polarization.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/l1_output_data.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/linearity_correction.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/make_movie_frames.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/mixin/__init__.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/mixin/beam_access.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/mixin/corrections.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/mixin/intermediate_frame.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/mixin/linearized_frame.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/mixin/shift_measurements.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/quality_metrics.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/science_base.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/sp_beam_boundaries.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/sp_geometric.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/sp_science.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/sp_solar_gain.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/trial_output_data.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tasks/write_l1.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/__init__.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/header_models.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/local_trial_workflows/__init__.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/local_trial_workflows/l0_cals_only.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/local_trial_workflows/l0_to_l1.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/local_trial_workflows/linearize_only.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/local_trial_workflows/local_trial_helpers.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/test_assemble_movie.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/test_assemble_qualilty.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/test_bad_pixel_maps.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/test_ci_beam_boundaries.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/test_ci_science.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/test_corrections.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/test_cryo_base.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/test_cryo_constants.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/test_dark.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/test_gain.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/test_instrument_polarization.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/test_linearity_correction.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/test_make_movie_frames.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/test_quality.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/test_sp_beam_boundaries.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/test_sp_geometric.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/test_sp_make_movie_frames.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/test_sp_science.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/test_sp_solar.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/test_trial_create_quality_report.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/test_trial_output_data.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/test_workflows.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/tests/test_write_l1.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/workflows/__init__.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/workflows/ci_l0_processing.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/workflows/sp_l0_processing.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp/workflows/trial_workflows.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp.egg-info/SOURCES.txt +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp.egg-info/dependency_links.txt +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/dkist_processing_cryonirsp.egg-info/top_level.txt +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/docs/Makefile +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/docs/bad_pixel_calibration.rst +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/docs/beam_angle_calculation.rst +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/docs/beam_boundary_computation.rst +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/docs/changelog.rst +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/docs/ci_science_calibration.rst +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/docs/conf.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/docs/index.rst +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/docs/l0_to_l1_cryonirsp_ci.rst +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/docs/l0_to_l1_cryonirsp_sp.rst +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/docs/linearization.rst +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/docs/make.bat +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/docs/requirements.txt +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/docs/requirements_table.rst +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/docs/scientific_changelog.rst +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/docs/sp_science_calibration.rst +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/licenses/LICENSE.rst +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/pyproject.toml +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/science_towncrier.sh +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/setup.py +0 -0
- {dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/towncrier_science.toml +0 -0
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
v0.0.71 (2024-07-01)
|
|
2
|
+
====================
|
|
3
|
+
|
|
4
|
+
Misc
|
|
5
|
+
----
|
|
6
|
+
|
|
7
|
+
- Move to version 8.1.0 of `dkist-processing-common` which includes an upgrade to airflow 2.9.2. (`#137 <https://bitbucket.org/dkistdc/dkist-processing-cryonirsp/pull-requests/137>`__)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
v0.0.70 (2024-06-25)
|
|
11
|
+
====================
|
|
12
|
+
|
|
13
|
+
Features
|
|
14
|
+
--------
|
|
15
|
+
|
|
16
|
+
- Use ParameterMixin paradigm from `dkist-processing-common` to simplify the definitions of Parameter classes. Specifically, this
|
|
17
|
+
means using the `ParameterWavelengthMixin` and `ParameterArmIdMixin` to provide support for parameters that depend on either wavelength
|
|
18
|
+
or arm ID. This functionality had existed previously, but now it is achieved by using standard tools in `dkist-processing-common`. (`#134 <https://bitbucket.org/dkistdc/dkist-processing-cryonirsp/pull-requests/134>`__)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
Misc
|
|
22
|
+
----
|
|
23
|
+
|
|
24
|
+
- Move to version 8.0.0 of `dkist-processing-common`. This version changes the default behavior of `_find_most_recent_past_value` in
|
|
25
|
+
parameter classes. (`#134 <https://bitbucket.org/dkistdc/dkist-processing-cryonirsp/pull-requests/134>`__)
|
|
26
|
+
- Bump `dkist-processing-pac` to v3.0.2. No effect on `dkist-processing-cryonirsp`. (`#136 <https://bitbucket.org/dkistdc/dkist-processing-cryonirsp/pull-requests/136>`__)
|
|
27
|
+
|
|
28
|
+
|
|
1
29
|
v0.0.69 (2024-06-12)
|
|
2
30
|
====================
|
|
3
31
|
|
|
@@ -1,29 +1,33 @@
|
|
|
1
1
|
"""CryoNIRSP calibration pipeline parameters."""
|
|
2
|
+
from datetime import datetime
|
|
2
3
|
from functools import cached_property
|
|
3
|
-
from typing import Any
|
|
4
4
|
|
|
5
5
|
import numpy as np
|
|
6
|
+
from dkist_processing_common.models.parameters import ParameterArmIdMixin
|
|
6
7
|
from dkist_processing_common.models.parameters import ParameterBase
|
|
7
|
-
from dkist_processing_common.
|
|
8
|
+
from dkist_processing_common.models.parameters import ParameterWavelengthMixin
|
|
8
9
|
|
|
9
10
|
from dkist_processing_cryonirsp.models.exposure_conditions import AllowableOpticalDensityFilterNames
|
|
10
11
|
|
|
11
12
|
|
|
12
|
-
class
|
|
13
|
-
"""
|
|
13
|
+
class CryonirspParsingParameters(ParameterBase):
|
|
14
|
+
"""
|
|
15
|
+
Parameters specifically (and only) for the Parse task.
|
|
16
|
+
|
|
17
|
+
Needed because the Parse task doesn't yet know about arm id, wavelength, or obs_ip_start_time, which are all
|
|
18
|
+
required to initialize the main parameter class.
|
|
19
|
+
"""
|
|
14
20
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
obs_ip_start_time: str | None = None,
|
|
21
|
-
):
|
|
22
|
-
super().__init__(
|
|
23
|
-
input_dataset_parameters=input_dataset_parameters, obs_ip_start_time=obs_ip_start_time
|
|
21
|
+
@property
|
|
22
|
+
def max_cs_step_time_sec(self):
|
|
23
|
+
"""Time window within which CS steps with identical GOS configurations are considered to be the same."""
|
|
24
|
+
return self._find_most_recent_past_value(
|
|
25
|
+
"cryonirsp_max_cs_step_time_sec", start_date=datetime.now()
|
|
24
26
|
)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class CryonirspParameters(ParameterBase, ParameterWavelengthMixin, ParameterArmIdMixin):
|
|
30
|
+
"""Put all CryoNIRSP parameters parsed from the input dataset document in a single property."""
|
|
27
31
|
|
|
28
32
|
@property
|
|
29
33
|
def geo_upsample_factor(self) -> int:
|
|
@@ -72,11 +76,6 @@ class CryonirspParameters(ParameterBase):
|
|
|
72
76
|
"""Return Number of demodulation matrices to compute across the entire FOV in the spatial dimension."""
|
|
73
77
|
return self._find_most_recent_past_value("cryonirsp_polcal_num_spatial_bins")
|
|
74
78
|
|
|
75
|
-
@property
|
|
76
|
-
def max_cs_step_time_sec(self):
|
|
77
|
-
"""Time window within which CS steps with identical GOS configurations are considered to be the same."""
|
|
78
|
-
return self._find_most_recent_past_value("cryonirsp_max_cs_step_time_sec")
|
|
79
|
-
|
|
80
79
|
@property
|
|
81
80
|
def polcal_pac_fit_mode(self):
|
|
82
81
|
"""Name of set of fitting flags to use during PAC Calibration Unit parameter fits."""
|
|
@@ -142,7 +141,7 @@ class CryonirspParameters(ParameterBase):
|
|
|
142
141
|
def linearization_thresholds(self) -> np.ndarray:
|
|
143
142
|
"""Name of parameter associated with the linearization thresholds."""
|
|
144
143
|
param_dict = self._find_parameter_for_arm("cryonirsp_linearization_thresholds")
|
|
145
|
-
value = self.
|
|
144
|
+
value = self._load_param_value_from_numpy_save(param_dict)
|
|
146
145
|
# float64 data can blow up the memory required for linearization - convert to float32
|
|
147
146
|
if np.issubdtype(value.dtype, np.float64):
|
|
148
147
|
value = value.astype(np.float32, casting="same_kind")
|
|
@@ -234,34 +233,3 @@ class CryonirspParameters(ParameterBase):
|
|
|
234
233
|
def _linearization_optical_density_filter_attenuation_open(self) -> float:
|
|
235
234
|
"""Return the attenuation value for a filter of 'Open'."""
|
|
236
235
|
return 0.0
|
|
237
|
-
|
|
238
|
-
@staticmethod
|
|
239
|
-
def _load_param_value_from_npy_file(param_dict: dict) -> np.ndarray:
|
|
240
|
-
"""Return the data associated with a parameter file saved in numpy format."""
|
|
241
|
-
file_path = param_dict["param_path"]
|
|
242
|
-
result = np.load(file_path)
|
|
243
|
-
return result
|
|
244
|
-
|
|
245
|
-
def _find_parameter_for_arm(self, parameter_name: str) -> Any:
|
|
246
|
-
full_param_name = f"{parameter_name}_{self._arm_id.lower()}"
|
|
247
|
-
param = self._find_most_recent_past_value(full_param_name)
|
|
248
|
-
return param
|
|
249
|
-
|
|
250
|
-
def _find_parameter_closest_wavelength(self, parameter_name: str) -> Any:
|
|
251
|
-
"""
|
|
252
|
-
Find the database value for a parameter that is closest to the requested wavelength.
|
|
253
|
-
|
|
254
|
-
NOTE: If the requested wavelength is exactly between two database values, the value from the smaller wavelength
|
|
255
|
-
will be returned
|
|
256
|
-
"""
|
|
257
|
-
if self._wavelength is None:
|
|
258
|
-
raise ValueError(
|
|
259
|
-
f"Cannot get wavelength dependent parameter {parameter_name} without wavelength"
|
|
260
|
-
)
|
|
261
|
-
|
|
262
|
-
parameter_dict = self._find_most_recent_past_value(parameter_name)
|
|
263
|
-
wavelengths = np.array(parameter_dict["wavelength"])
|
|
264
|
-
values = parameter_dict["values"]
|
|
265
|
-
idx = np.argmin(np.abs(wavelengths - self._wavelength))
|
|
266
|
-
chosen_value = values[idx]
|
|
267
|
-
return chosen_value
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"""Parse CryoNIRSP data."""
|
|
2
|
-
from abc import ABC
|
|
3
2
|
from typing import TypeVar
|
|
4
3
|
|
|
5
4
|
from dkist_processing_common.models.flower_pot import Stem
|
|
@@ -21,7 +20,7 @@ from dkist_processing_common.tasks import ParseDataBase
|
|
|
21
20
|
from dkist_processing_common.tasks.mixin.input_dataset import InputDatasetMixin
|
|
22
21
|
|
|
23
22
|
from dkist_processing_cryonirsp.models.constants import CryonirspBudName
|
|
24
|
-
from dkist_processing_cryonirsp.models.parameters import
|
|
23
|
+
from dkist_processing_cryonirsp.models.parameters import CryonirspParsingParameters
|
|
25
24
|
from dkist_processing_cryonirsp.models.tags import CryonirspStemName
|
|
26
25
|
from dkist_processing_cryonirsp.models.tags import CryonirspTag
|
|
27
26
|
from dkist_processing_cryonirsp.parsers.cryonirsp_l0_fits_access import CryonirspL0FitsAccess
|
|
@@ -51,35 +50,7 @@ __all__ = ["ParseL0CryonirspRampData", "ParseL0CryonirspLinearizedData"]
|
|
|
51
50
|
S = TypeVar("S", bound=Stem)
|
|
52
51
|
|
|
53
52
|
|
|
54
|
-
class
|
|
55
|
-
"""Base class for Cryonirsp Parsing classes.
|
|
56
|
-
|
|
57
|
-
Parameters
|
|
58
|
-
----------
|
|
59
|
-
recipe_run_id : int
|
|
60
|
-
id of the recipe run used to identify the workflow run this task is part of
|
|
61
|
-
workflow_name : str
|
|
62
|
-
name of the workflow to which this instance of the task belongs
|
|
63
|
-
workflow_version : str
|
|
64
|
-
version of the workflow to which this instance of the task belongs
|
|
65
|
-
|
|
66
|
-
"""
|
|
67
|
-
|
|
68
|
-
def __init__(
|
|
69
|
-
self,
|
|
70
|
-
recipe_run_id: int,
|
|
71
|
-
workflow_name: str,
|
|
72
|
-
workflow_version: str,
|
|
73
|
-
):
|
|
74
|
-
super().__init__(
|
|
75
|
-
recipe_run_id=recipe_run_id,
|
|
76
|
-
workflow_name=workflow_name,
|
|
77
|
-
workflow_version=workflow_version,
|
|
78
|
-
)
|
|
79
|
-
self.parameters = CryonirspParameters(self.input_dataset_parameters)
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
class ParseL0CryonirspRampData(ParseL0CryonirspDataBase):
|
|
53
|
+
class ParseL0CryonirspRampData(ParseDataBase):
|
|
83
54
|
"""
|
|
84
55
|
Parse CryoNIRSP ramp data (raw Cryo data) to prepare for Linearity Correction, after which the rest of the common parsing will occur.
|
|
85
56
|
|
|
@@ -153,9 +124,9 @@ class ParseL0CryonirspRampData(ParseL0CryonirspDataBase):
|
|
|
153
124
|
return [Tag.input(), Tag.frame()]
|
|
154
125
|
|
|
155
126
|
|
|
156
|
-
class ParseL0CryonirspLinearizedData(
|
|
127
|
+
class ParseL0CryonirspLinearizedData(ParseDataBase, InputDatasetMixin):
|
|
157
128
|
"""
|
|
158
|
-
Parse linearity corrected CryoNIRSP input data to add common and Cryonirsp specific
|
|
129
|
+
Parse linearity corrected CryoNIRSP input data to add common and Cryonirsp specific constants.
|
|
159
130
|
|
|
160
131
|
Parameters
|
|
161
132
|
----------
|
|
@@ -168,6 +139,19 @@ class ParseL0CryonirspLinearizedData(ParseL0CryonirspDataBase):
|
|
|
168
139
|
|
|
169
140
|
"""
|
|
170
141
|
|
|
142
|
+
def __init__(
|
|
143
|
+
self,
|
|
144
|
+
recipe_run_id: int,
|
|
145
|
+
workflow_name: str,
|
|
146
|
+
workflow_version: str,
|
|
147
|
+
):
|
|
148
|
+
super().__init__(
|
|
149
|
+
recipe_run_id=recipe_run_id,
|
|
150
|
+
workflow_name=workflow_name,
|
|
151
|
+
workflow_version=workflow_version,
|
|
152
|
+
)
|
|
153
|
+
self.parameters = CryonirspParsingParameters(self.input_dataset_parameters)
|
|
154
|
+
|
|
171
155
|
@property
|
|
172
156
|
def fits_parsing_class(self):
|
|
173
157
|
"""FITS access class to be used in this task."""
|
|
@@ -383,16 +383,22 @@ def assign_input_dataset_doc_to_task(
|
|
|
383
383
|
testing_wavelength,
|
|
384
384
|
testing_obs_ip_start_time,
|
|
385
385
|
):
|
|
386
|
-
def update_task(
|
|
386
|
+
def update_task(
|
|
387
|
+
task,
|
|
388
|
+
parameters,
|
|
389
|
+
parameter_class=CryonirspParameters,
|
|
390
|
+
arm_id: str = "SP",
|
|
391
|
+
obs_ip_start_time=testing_obs_ip_start_time,
|
|
392
|
+
):
|
|
387
393
|
doc_path = task.scratch.workflow_base_path / "dataset_doc.json"
|
|
388
394
|
with open(doc_path, "w") as f:
|
|
389
395
|
f.write(json.dumps(input_dataset_document_simple_parameters_part(parameters)))
|
|
390
396
|
task.tag(doc_path, CryonirspTag.input_dataset_parameters())
|
|
391
|
-
task.parameters =
|
|
397
|
+
task.parameters = parameter_class(
|
|
392
398
|
task.input_dataset_parameters,
|
|
393
399
|
wavelength=testing_wavelength,
|
|
394
|
-
arm_id=
|
|
395
|
-
obs_ip_start_time=
|
|
400
|
+
arm_id=arm_id,
|
|
401
|
+
obs_ip_start_time=obs_ip_start_time,
|
|
396
402
|
)
|
|
397
403
|
|
|
398
404
|
return update_task
|
|
@@ -11,15 +11,20 @@ from hypothesis import settings
|
|
|
11
11
|
from hypothesis import strategies as st
|
|
12
12
|
|
|
13
13
|
from dkist_processing_cryonirsp.models.parameters import CryonirspParameters
|
|
14
|
+
from dkist_processing_cryonirsp.models.parameters import CryonirspParsingParameters
|
|
15
|
+
from dkist_processing_cryonirsp.parsers.optical_density_filters import (
|
|
16
|
+
ALLOWABLE_OPTICAL_DENSITY_FILTERS,
|
|
17
|
+
)
|
|
14
18
|
from dkist_processing_cryonirsp.tasks.cryonirsp_base import CryonirspTaskBase
|
|
15
19
|
from dkist_processing_cryonirsp.tests.conftest import cryonirsp_testing_parameters_factory
|
|
16
20
|
from dkist_processing_cryonirsp.tests.conftest import CryonirspConstantsDb
|
|
17
21
|
from dkist_processing_cryonirsp.tests.conftest import FileParameter
|
|
18
22
|
from dkist_processing_cryonirsp.tests.conftest import TestingParameters
|
|
19
23
|
|
|
20
|
-
#
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
# The property names of all parameters on `CryonirspParsingParameters`
|
|
25
|
+
PARSE_PARAMETER_NAMES = [
|
|
26
|
+
k for k, v in vars(CryonirspParsingParameters).items() if isinstance(v, property)
|
|
27
|
+
]
|
|
23
28
|
|
|
24
29
|
|
|
25
30
|
@pytest.fixture(scope="function")
|
|
@@ -28,24 +33,41 @@ def basic_science_task_with_parameter_mixin(
|
|
|
28
33
|
recipe_run_id,
|
|
29
34
|
assign_input_dataset_doc_to_task,
|
|
30
35
|
init_cryonirsp_constants_db,
|
|
36
|
+
testing_obs_ip_start_time,
|
|
31
37
|
):
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
38
|
+
def make_task(
|
|
39
|
+
parameter_class=CryonirspParameters,
|
|
40
|
+
arm_id: str = "SP",
|
|
41
|
+
obs_ip_start_time: str = testing_obs_ip_start_time,
|
|
42
|
+
):
|
|
43
|
+
class Task(CryonirspTaskBase):
|
|
44
|
+
def run(self):
|
|
45
|
+
...
|
|
46
|
+
|
|
47
|
+
init_cryonirsp_constants_db(recipe_run_id, CryonirspConstantsDb())
|
|
48
|
+
task = Task(
|
|
49
|
+
recipe_run_id=recipe_run_id,
|
|
50
|
+
workflow_name="parse_cryonirsp_input_data",
|
|
51
|
+
workflow_version="VX.Y",
|
|
52
|
+
)
|
|
53
|
+
try: # This try... block is here to make sure the dbs get cleaned up if there's a failure in the fixture
|
|
54
|
+
task.scratch = WorkflowFileSystem(
|
|
55
|
+
scratch_base_path=tmp_path, recipe_run_id=recipe_run_id
|
|
56
|
+
)
|
|
57
|
+
test_params = cryonirsp_testing_parameters_factory(param_path=tmp_path)
|
|
58
|
+
param_dict = test_params()
|
|
59
|
+
assign_input_dataset_doc_to_task(
|
|
60
|
+
task,
|
|
61
|
+
param_dict,
|
|
62
|
+
parameter_class=parameter_class,
|
|
63
|
+
arm_id=arm_id,
|
|
64
|
+
obs_ip_start_time=obs_ip_start_time,
|
|
65
|
+
)
|
|
66
|
+
yield task, param_dict
|
|
67
|
+
finally:
|
|
68
|
+
task._purge()
|
|
69
|
+
|
|
70
|
+
return make_task
|
|
49
71
|
|
|
50
72
|
|
|
51
73
|
def _is_wavelength_param(param_value: Any) -> bool:
|
|
@@ -61,7 +83,7 @@ def test_filter_parameters(basic_science_task_with_parameter_mixin, wave):
|
|
|
61
83
|
When: Accessing properties for the optical density filters
|
|
62
84
|
Then: The correct value is returned
|
|
63
85
|
"""
|
|
64
|
-
task, expected = basic_science_task_with_parameter_mixin
|
|
86
|
+
task, expected = next(basic_science_task_with_parameter_mixin())
|
|
65
87
|
task_params = task.parameters
|
|
66
88
|
task_params._wavelength = wave
|
|
67
89
|
expected = {
|
|
@@ -85,7 +107,7 @@ def test_file_parameters(basic_science_task_with_parameter_mixin):
|
|
|
85
107
|
|
|
86
108
|
This test exercises all aspects of file parameters from their names to the loading of values
|
|
87
109
|
"""
|
|
88
|
-
task, test_params = basic_science_task_with_parameter_mixin
|
|
110
|
+
task, test_params = next(basic_science_task_with_parameter_mixin())
|
|
89
111
|
task_params = task.parameters
|
|
90
112
|
# Iterate over the test parameters and check that each file param exists in the task parameters
|
|
91
113
|
# we load the actual parameter from the task param object using only the param name
|
|
@@ -96,14 +118,14 @@ def test_file_parameters(basic_science_task_with_parameter_mixin):
|
|
|
96
118
|
# If the param name is an attribute in task_params, then load it directly
|
|
97
119
|
if hasattr(task_params, pn_no_prefix):
|
|
98
120
|
param_name = pn_no_prefix
|
|
99
|
-
actual = task_params.
|
|
121
|
+
actual = task_params._load_param_value_from_numpy_save(
|
|
100
122
|
getattr(task_params, param_name)
|
|
101
123
|
)
|
|
102
124
|
# if the param name is not a task param attribute, then check that we can load the param
|
|
103
125
|
# using the value defined in the input_dataset_parameters list of the task param object
|
|
104
126
|
else:
|
|
105
127
|
param_dict = task_params._find_most_recent_past_value(pn)
|
|
106
|
-
actual = task_params.
|
|
128
|
+
actual = task_params._load_param_value_from_numpy_save(param_dict)
|
|
107
129
|
# Now get the expected value using the param value dict from the testing params
|
|
108
130
|
expected = np.load(pv["param_path"])
|
|
109
131
|
# Compare the actual and expected values
|
|
@@ -111,7 +133,10 @@ def test_file_parameters(basic_science_task_with_parameter_mixin):
|
|
|
111
133
|
|
|
112
134
|
|
|
113
135
|
def _is_arm_param(
|
|
114
|
-
param_name: str,
|
|
136
|
+
param_name: str,
|
|
137
|
+
task_params: CryonirspParameters,
|
|
138
|
+
testing_params: TestingParameters,
|
|
139
|
+
single_arm_only: str | None = None,
|
|
115
140
|
):
|
|
116
141
|
"""
|
|
117
142
|
Test if a parameter is an arm parameter.
|
|
@@ -122,7 +147,7 @@ def _is_arm_param(
|
|
|
122
147
|
encapsulates the mechanism used to return the arm specific parameter value based on the arm in use.
|
|
123
148
|
"""
|
|
124
149
|
# NB: param_name is assumed to have a prefix of "cryonirsp_"
|
|
125
|
-
arm_suffixes = ["_sp", "_ci"]
|
|
150
|
+
arm_suffixes = ["_sp", "_ci"] if single_arm_only is None else [f"_{single_arm_only}".casefold()]
|
|
126
151
|
suffix = param_name[-3:]
|
|
127
152
|
if suffix not in arm_suffixes:
|
|
128
153
|
return False
|
|
@@ -135,7 +160,8 @@ def _is_arm_param(
|
|
|
135
160
|
return hasattr(task_params, generic_param_name) and suffixed_names_exist
|
|
136
161
|
|
|
137
162
|
|
|
138
|
-
|
|
163
|
+
@pytest.mark.parametrize("arm_id", ["SP", "CI"])
|
|
164
|
+
def test_arm_parameters(basic_science_task_with_parameter_mixin, arm_id):
|
|
139
165
|
"""
|
|
140
166
|
Given: A Science task with the parameter mixin
|
|
141
167
|
When: Accessing parameters that are "arm" parameters
|
|
@@ -146,21 +172,18 @@ def test_arm_parameters(basic_science_task_with_parameter_mixin):
|
|
|
146
172
|
"""
|
|
147
173
|
# An arm parameter is one which is present in the param class with no arm suffix
|
|
148
174
|
# and is also present in the testing param class with both suffix forms
|
|
149
|
-
task, test_params = basic_science_task_with_parameter_mixin
|
|
175
|
+
task, test_params = next(basic_science_task_with_parameter_mixin(arm_id=arm_id))
|
|
150
176
|
task_params = task.parameters
|
|
151
177
|
# Iterate over the test parameters
|
|
152
178
|
for pn, pv in asdict(test_params).items():
|
|
153
|
-
|
|
154
|
-
if _is_arm_param(pn, task_params, test_params):
|
|
155
|
-
# get the generic param name
|
|
156
|
-
suffix = pn[-3:]
|
|
179
|
+
suffix = f"_{arm_id}".casefold()
|
|
180
|
+
if _is_arm_param(pn, task_params, test_params, single_arm_only=arm_id):
|
|
157
181
|
generic_param_name = pn.removeprefix("cryonirsp_").removesuffix(suffix)
|
|
158
|
-
|
|
159
|
-
task_params._arm_id = suffix[-2:].upper()
|
|
182
|
+
|
|
160
183
|
actual = getattr(task_params, generic_param_name)
|
|
161
184
|
expected = getattr(test_params, pn)
|
|
162
185
|
if isinstance(expected, FileParameter) and expected.is_file:
|
|
163
|
-
expected = task_params.
|
|
186
|
+
expected = task_params._load_param_value_from_numpy_save(asdict(expected))
|
|
164
187
|
assert np.array_equal(expected, actual)
|
|
165
188
|
elif isinstance(actual, np.ndarray):
|
|
166
189
|
assert expected == actual.tolist()
|
|
@@ -168,22 +191,43 @@ def test_arm_parameters(basic_science_task_with_parameter_mixin):
|
|
|
168
191
|
assert expected == actual
|
|
169
192
|
|
|
170
193
|
|
|
171
|
-
def
|
|
194
|
+
def test_parameters(basic_science_task_with_parameter_mixin):
|
|
172
195
|
"""
|
|
173
196
|
Given: A Science task with the parameter mixin
|
|
174
197
|
When: Accessing properties for parameters that are not wavelength, file or generic parameters
|
|
175
198
|
Then: The correct value is returned
|
|
176
199
|
"""
|
|
177
|
-
task, test_params = basic_science_task_with_parameter_mixin
|
|
200
|
+
task, test_params = next(basic_science_task_with_parameter_mixin())
|
|
178
201
|
task_params = task.parameters
|
|
179
202
|
for pn, pv in asdict(test_params).items():
|
|
203
|
+
parameter_name = pn.removeprefix("cryonirsp_")
|
|
180
204
|
if (
|
|
181
205
|
_is_file_param(pv)
|
|
182
206
|
or _is_wavelength_param(pv)
|
|
183
207
|
or _is_arm_param(pn, task_params, test_params)
|
|
208
|
+
or parameter_name in PARSE_PARAMETER_NAMES
|
|
184
209
|
):
|
|
185
210
|
continue
|
|
186
|
-
assert pv == getattr(task_params,
|
|
211
|
+
assert pv == getattr(task_params, parameter_name)
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
def test_parse_parameters(basic_science_task_with_parameter_mixin):
|
|
215
|
+
"""
|
|
216
|
+
Given: A Science task with ParsingParameters
|
|
217
|
+
When: Accessing properties for the parsing parameters
|
|
218
|
+
Then: The correct value is returned
|
|
219
|
+
"""
|
|
220
|
+
task, test_params = next(
|
|
221
|
+
basic_science_task_with_parameter_mixin(
|
|
222
|
+
parameter_class=CryonirspParsingParameters,
|
|
223
|
+
obs_ip_start_time=None,
|
|
224
|
+
)
|
|
225
|
+
)
|
|
226
|
+
task_param_attr = task.parameters
|
|
227
|
+
for pn, pv in asdict(test_params).items():
|
|
228
|
+
property_name = pn.removeprefix("cryonirsp_")
|
|
229
|
+
if property_name in PARSE_PARAMETER_NAMES and type(pv) is not dict:
|
|
230
|
+
assert getattr(task_param_attr, property_name) == pv
|
|
187
231
|
|
|
188
232
|
|
|
189
233
|
@pytest.mark.parametrize("arm", [pytest.param("CI"), pytest.param("SP")])
|
|
@@ -195,9 +239,25 @@ def test_linearization_threshold_parameters(
|
|
|
195
239
|
When: Accessing properties for the linearization thresholds
|
|
196
240
|
Then: The correct type is returned
|
|
197
241
|
"""
|
|
198
|
-
task, _ = basic_science_task_with_parameter_mixin
|
|
242
|
+
task, _ = next(basic_science_task_with_parameter_mixin())
|
|
199
243
|
recipe_run_id = task.recipe_run_id
|
|
200
244
|
init_cryonirsp_constants_db(recipe_run_id, CryonirspConstantsDb(ARM_ID=arm))
|
|
201
245
|
linearization_threshold_array = task.parameters.linearization_thresholds
|
|
202
246
|
|
|
203
247
|
assert linearization_threshold_array.dtype == np.float32
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
def test_optical_density_filter_names(basic_science_task_with_parameter_mixin):
|
|
251
|
+
task, _ = next(basic_science_task_with_parameter_mixin())
|
|
252
|
+
# List of filter attenuation parameters defined in CryonirspParameters:
|
|
253
|
+
defined_filter_params = {
|
|
254
|
+
item[-4:].upper()
|
|
255
|
+
for item in dir(task.parameters)
|
|
256
|
+
if item.startswith("_linearization_optical_density_filter_attenuation_")
|
|
257
|
+
}
|
|
258
|
+
# List of filters in the filter map:
|
|
259
|
+
filter_map_params = {k for k in task.parameters.linearization_filter_attenuation_dict.keys()}
|
|
260
|
+
# Make sure all filter parameters match the allowable list
|
|
261
|
+
assert not defined_filter_params.symmetric_difference(ALLOWABLE_OPTICAL_DENSITY_FILTERS)
|
|
262
|
+
# Make sure all filter map keys match the allowable list
|
|
263
|
+
assert not filter_map_params.symmetric_difference(ALLOWABLE_OPTICAL_DENSITY_FILTERS)
|
|
@@ -16,10 +16,8 @@ from dkist_processing_common.tests.conftest import FakeGQLClient
|
|
|
16
16
|
from dkist_processing_cryonirsp.models.constants import CryonirspBudName
|
|
17
17
|
from dkist_processing_cryonirsp.models.exposure_conditions import AllowableOpticalDensityFilterNames
|
|
18
18
|
from dkist_processing_cryonirsp.models.exposure_conditions import ExposureConditions
|
|
19
|
+
from dkist_processing_cryonirsp.models.parameters import CryonirspParsingParameters
|
|
19
20
|
from dkist_processing_cryonirsp.models.tags import CryonirspTag
|
|
20
|
-
from dkist_processing_cryonirsp.parsers.optical_density_filters import (
|
|
21
|
-
ALLOWABLE_OPTICAL_DENSITY_FILTERS,
|
|
22
|
-
)
|
|
23
21
|
from dkist_processing_cryonirsp.parsers.polarimetric_check import PolarimetricCheckingUniqueBud
|
|
24
22
|
from dkist_processing_cryonirsp.tasks.parse import ParseL0CryonirspLinearizedData
|
|
25
23
|
from dkist_processing_cryonirsp.tasks.parse import ParseL0CryonirspRampData
|
|
@@ -341,15 +339,20 @@ def parse_linearized_task(tmp_path, recipe_run_id, assign_input_dataset_doc_to_t
|
|
|
341
339
|
task.scratch = WorkflowFileSystem(
|
|
342
340
|
scratch_base_path=tmp_path, recipe_run_id=recipe_run_id
|
|
343
341
|
)
|
|
344
|
-
|
|
345
|
-
assign_input_dataset_doc_to_task(
|
|
342
|
+
param_dataclass = cryonirsp_testing_parameters_factory(param_path=tmp_path)
|
|
343
|
+
assign_input_dataset_doc_to_task(
|
|
344
|
+
task,
|
|
345
|
+
param_dataclass(),
|
|
346
|
+
parameter_class=CryonirspParsingParameters,
|
|
347
|
+
obs_ip_start_time=None,
|
|
348
|
+
)
|
|
346
349
|
yield task
|
|
347
350
|
finally:
|
|
348
351
|
task._purge()
|
|
349
352
|
|
|
350
353
|
|
|
351
354
|
@pytest.fixture
|
|
352
|
-
def parse_non_linearized_task(tmp_path, recipe_run_id,
|
|
355
|
+
def parse_non_linearized_task(tmp_path, recipe_run_id, mocker):
|
|
353
356
|
mocker.patch(
|
|
354
357
|
"dkist_processing_common.tasks.mixin.metadata_store.GraphQLClient", new=FakeGQLClient
|
|
355
358
|
)
|
|
@@ -362,8 +365,6 @@ def parse_non_linearized_task(tmp_path, recipe_run_id, assign_input_dataset_doc_
|
|
|
362
365
|
task.scratch = WorkflowFileSystem(
|
|
363
366
|
scratch_base_path=tmp_path, recipe_run_id=recipe_run_id
|
|
364
367
|
)
|
|
365
|
-
param_class = cryonirsp_testing_parameters_factory(param_path=tmp_path)
|
|
366
|
-
assign_input_dataset_doc_to_task(task, param_class())
|
|
367
368
|
yield task
|
|
368
369
|
finally:
|
|
369
370
|
task._purge()
|
|
@@ -1293,22 +1294,6 @@ def test_parse_cryonirsp_linearized_data_internal_scan_loops_as_map_scan_and_sca
|
|
|
1293
1294
|
assert task.constants._db_dict[CryonirspBudName.num_map_scans.value] == num_alt_maps
|
|
1294
1295
|
|
|
1295
1296
|
|
|
1296
|
-
def test_optical_density_filter_names(parse_non_linearized_task):
|
|
1297
|
-
task = parse_non_linearized_task
|
|
1298
|
-
# List of filter attenuation parameters defined in CryonirspParameters:
|
|
1299
|
-
defined_filter_params = {
|
|
1300
|
-
item[-4:].upper()
|
|
1301
|
-
for item in dir(task.parameters)
|
|
1302
|
-
if item.startswith("_linearization_optical_density_filter_attenuation_")
|
|
1303
|
-
}
|
|
1304
|
-
# List of filters in the filter map:
|
|
1305
|
-
filter_map_params = {k for k in task.parameters.linearization_filter_attenuation_dict.keys()}
|
|
1306
|
-
# Make sure all filter parameters match the allowable list
|
|
1307
|
-
assert not defined_filter_params.symmetric_difference(ALLOWABLE_OPTICAL_DENSITY_FILTERS)
|
|
1308
|
-
# Make sure all filter map keys match the allowable list
|
|
1309
|
-
assert not filter_map_params.symmetric_difference(ALLOWABLE_OPTICAL_DENSITY_FILTERS)
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
1297
|
@pytest.mark.parametrize("arm_id", ["CI", "SP"])
|
|
1313
1298
|
def test_parse_cryonirsp_not_polarimetric_obs(parse_linearized_task, arm_id):
|
|
1314
1299
|
"""
|
|
@@ -2,9 +2,9 @@ Pillow==10.3.0
|
|
|
2
2
|
astropy==6.1.0
|
|
3
3
|
dkist-fits-specifications==4.3.0
|
|
4
4
|
dkist-header-validator==5.1.0
|
|
5
|
-
dkist-processing-common==
|
|
5
|
+
dkist-processing-common==8.1.0
|
|
6
6
|
dkist-processing-math==2.1.0
|
|
7
|
-
dkist-processing-pac==3.0.
|
|
7
|
+
dkist-processing-pac==3.0.2
|
|
8
8
|
dkist-spectral-lines==3.0.0
|
|
9
9
|
largestinteriorrectangle==0.2.0
|
|
10
10
|
dkist-service-configuration==2.2
|
|
@@ -21,9 +21,9 @@ install_requires =
|
|
|
21
21
|
astropy == 6.1.0
|
|
22
22
|
dkist-fits-specifications == 4.3.0
|
|
23
23
|
dkist-header-validator == 5.1.0
|
|
24
|
-
dkist-processing-common ==
|
|
24
|
+
dkist-processing-common == 8.1.0
|
|
25
25
|
dkist-processing-math == 2.1.0
|
|
26
|
-
dkist-processing-pac == 3.0.
|
|
26
|
+
dkist-processing-pac == 3.0.2
|
|
27
27
|
dkist-spectral-lines == 3.0.0
|
|
28
28
|
largestinteriorrectangle == 0.2.0
|
|
29
29
|
dkist-service-configuration == 2.2
|
|
File without changes
|
{dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/.pre-commit-config.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/SCIENCE_CHANGELOG.rst
RENAMED
|
File without changes
|
{dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/bitbucket-pipelines.yml
RENAMED
|
File without changes
|
|
File without changes
|
{dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/check_changelog_updated.sh
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
|
|
@@ -61,7 +61,7 @@ class CryonirspTaskBase(
|
|
|
61
61
|
)
|
|
62
62
|
self.parameters = CryonirspParameters(
|
|
63
63
|
self.input_dataset_parameters,
|
|
64
|
+
obs_ip_start_time=self.constants.obs_ip_start_time,
|
|
64
65
|
wavelength=self.constants.wavelength,
|
|
65
66
|
arm_id=self.constants.arm_id,
|
|
66
|
-
obs_ip_start_time=self.constants.obs_ip_start_time,
|
|
67
67
|
)
|
|
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
|
{dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/docs/linearization.rst
RENAMED
|
File without changes
|
|
File without changes
|
{dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/docs/requirements.txt
RENAMED
|
File without changes
|
{dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/docs/requirements_table.rst
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/licenses/LICENSE.rst
RENAMED
|
File without changes
|
|
File without changes
|
{dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/science_towncrier.sh
RENAMED
|
File without changes
|
|
File without changes
|
{dkist_processing_cryonirsp-0.0.69 → dkist_processing_cryonirsp-0.0.71}/towncrier_science.toml
RENAMED
|
File without changes
|