dkist-processing-common 10.7.1rc1__py3-none-any.whl → 10.8.0__py3-none-any.whl
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/codecs/fits.py +1 -1
- dkist_processing_common/tasks/write_l1.py +1 -1
- dkist_processing_common/tests/test_write_l1.py +13 -10
- {dkist_processing_common-10.7.1rc1.dist-info → dkist_processing_common-10.8.0.dist-info}/METADATA +5 -5
- {dkist_processing_common-10.7.1rc1.dist-info → dkist_processing_common-10.8.0.dist-info}/RECORD +7 -8
- {dkist_processing_common-10.7.1rc1.dist-info → dkist_processing_common-10.8.0.dist-info}/WHEEL +1 -1
- changelog/248.bugfix.rst +0 -1
- {dkist_processing_common-10.7.1rc1.dist-info → dkist_processing_common-10.8.0.dist-info}/top_level.txt +0 -0
|
@@ -32,7 +32,7 @@ def fits_hdulist_encoder(hdu_list: fits.HDUList) -> bytes:
|
|
|
32
32
|
|
|
33
33
|
def fits_hdu_decoder(path: Path) -> fits.PrimaryHDU | fits.CompImageHDU:
|
|
34
34
|
"""Read a Path with `fits` to produce an `HDUList`."""
|
|
35
|
-
hdu_list = fits.open(path)
|
|
35
|
+
hdu_list = fits.open(path, checksum=True)
|
|
36
36
|
return _extract_hdu(hdu_list)
|
|
37
37
|
|
|
38
38
|
|
|
@@ -512,6 +512,6 @@ class WriteL1Frame(WorkflowTaskBase, MetadataStoreMixin, ABC):
|
|
|
512
512
|
@staticmethod
|
|
513
513
|
def remove_invalid_r0_values(header: fits.Header) -> fits.Header:
|
|
514
514
|
"""Remove the Fried parameter r0 from the header if the AO is not locked."""
|
|
515
|
-
if
|
|
515
|
+
if header.get("AO_LOCK") is not True:
|
|
516
516
|
header.pop("ATMOS_R0", None)
|
|
517
517
|
return header
|
|
@@ -157,8 +157,9 @@ def write_l1_task(request, recipe_run_id, tmp_path):
|
|
|
157
157
|
@pytest.fixture(
|
|
158
158
|
scope="function",
|
|
159
159
|
params=[
|
|
160
|
-
pytest.param(True, id="
|
|
161
|
-
pytest.param(False, id="
|
|
160
|
+
pytest.param({"AO_LOCK": True}, id="AO_LOCK_True"),
|
|
161
|
+
pytest.param({"AO_LOCK": False}, id="AO_LOCK_False"),
|
|
162
|
+
pytest.param({}, id="AO_LOCK_missing"),
|
|
162
163
|
],
|
|
163
164
|
)
|
|
164
165
|
def write_l1_task_no_data(request, recipe_run_id, tmp_path, complete_common_header):
|
|
@@ -171,7 +172,8 @@ def write_l1_task_no_data(request, recipe_run_id, tmp_path, complete_common_head
|
|
|
171
172
|
):
|
|
172
173
|
task.scratch = WorkflowFileSystem(recipe_run_id=recipe_run_id, scratch_base_path=tmp_path)
|
|
173
174
|
header = complete_common_header
|
|
174
|
-
header
|
|
175
|
+
header.pop("AO_LOCK", None) # If it's not required, shouldn't be here in the first place??
|
|
176
|
+
header.update(request.param)
|
|
175
177
|
fried_parameter = 0.2
|
|
176
178
|
header["ATMOS_R0"] = fried_parameter
|
|
177
179
|
hdu = fits.PrimaryHDU(data=np.random.random(size=(1, 1, 1)) * 1, header=header)
|
|
@@ -428,7 +430,8 @@ def test_rice_compression_with_specified_tile_size(write_l1_task, mocker):
|
|
|
428
430
|
files = list(task.read(tags=[Tag.frame(), Tag.output()]))
|
|
429
431
|
for file in files:
|
|
430
432
|
hdul = fits.open(file)
|
|
431
|
-
|
|
433
|
+
bintable = hdul[1]._get_bintable_without_data()
|
|
434
|
+
comp_header = bintable.header
|
|
432
435
|
data_shape = list(hdul[1].data.shape)
|
|
433
436
|
data_shape.reverse()
|
|
434
437
|
for i, dim in enumerate(data_shape):
|
|
@@ -453,7 +456,8 @@ def test_rice_compression_with_default_tile_size(write_l1_task, mocker):
|
|
|
453
456
|
files = list(task.read(tags=[Tag.frame(), Tag.output()]))
|
|
454
457
|
for file in files:
|
|
455
458
|
hdul = fits.open(file)
|
|
456
|
-
|
|
459
|
+
bintable = hdul[1]._get_bintable_without_data()
|
|
460
|
+
comp_header = bintable.header
|
|
457
461
|
data_shape = list(hdul[1].data.shape)
|
|
458
462
|
data_shape.reverse()
|
|
459
463
|
assert comp_header["ZTILE1"] == data_shape[0]
|
|
@@ -604,12 +608,11 @@ def test_check_r0_ao_lock(write_l1_task_no_data):
|
|
|
604
608
|
"""
|
|
605
609
|
task, header, r0 = write_l1_task_no_data
|
|
606
610
|
header_after_check = task.remove_invalid_r0_values(header=header)
|
|
607
|
-
if header
|
|
611
|
+
if header.get("AO_LOCK"):
|
|
608
612
|
assert header_after_check["ATMOS_R0"] == header["ATMOS_R0"]
|
|
609
613
|
assert header["ATMOS_R0"] == r0
|
|
610
614
|
assert header["AO_LOCK"]
|
|
611
|
-
|
|
612
|
-
with pytest.raises(KeyError
|
|
615
|
+
else:
|
|
616
|
+
with pytest.raises(KeyError, match="Keyword 'ATMOS_R0' not found"):
|
|
613
617
|
invalid_r0 = header_after_check["ATMOS_R0"]
|
|
614
|
-
assert "
|
|
615
|
-
assert not header["AO_LOCK"]
|
|
618
|
+
assert header.get("AO_LOCK") != True
|
{dkist_processing_common-10.7.1rc1.dist-info → dkist_processing_common-10.8.0.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dkist-processing-common
|
|
3
|
-
Version: 10.
|
|
3
|
+
Version: 10.8.0
|
|
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
|
|
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
14
14
|
Requires-Python: >=3.11
|
|
15
15
|
Description-Content-Type: text/x-rst
|
|
16
16
|
Requires-Dist: asdf<4.0.0,>=3.5.0
|
|
17
|
-
Requires-Dist: astropy
|
|
17
|
+
Requires-Dist: astropy>=7.0.0
|
|
18
18
|
Requires-Dist: dkist-fits-specifications<5.0,>=4.0.0
|
|
19
19
|
Requires-Dist: dkist-header-validator<6.0,>=5.0.0
|
|
20
20
|
Requires-Dist: dkist-processing-core==5.1.0
|
|
@@ -26,8 +26,8 @@ Requires-Dist: gqlclient[pydantic]==1.2.3
|
|
|
26
26
|
Requires-Dist: sqids==0.5.1
|
|
27
27
|
Requires-Dist: matplotlib>=3.4
|
|
28
28
|
Requires-Dist: moviepy>=2.0.0
|
|
29
|
-
Requires-Dist: numpy>=1.
|
|
30
|
-
Requires-Dist: object-clerk==0.1.
|
|
29
|
+
Requires-Dist: numpy>=1.26.4
|
|
30
|
+
Requires-Dist: object-clerk==0.1.2
|
|
31
31
|
Requires-Dist: pandas>=1.4.2
|
|
32
32
|
Requires-Dist: pillow>=10.2.0
|
|
33
33
|
Requires-Dist: pydantic>=2.0
|
|
@@ -43,7 +43,7 @@ Requires-Dist: pytest-cov; extra == "test"
|
|
|
43
43
|
Requires-Dist: pytest-mock; extra == "test"
|
|
44
44
|
Requires-Dist: hypothesis; extra == "test"
|
|
45
45
|
Requires-Dist: towncrier; extra == "test"
|
|
46
|
-
Requires-Dist: dkist-data-simulator>=5.
|
|
46
|
+
Requires-Dist: dkist-data-simulator>=5.2.6; extra == "test"
|
|
47
47
|
Requires-Dist: dkist-processing-common[inventory]; extra == "test"
|
|
48
48
|
Requires-Dist: dkist-processing-common[asdf]; extra == "test"
|
|
49
49
|
Requires-Dist: dkist-processing-common[quality]; extra == "test"
|
{dkist_processing_common-10.7.1rc1.dist-info → dkist_processing_common-10.8.0.dist-info}/RECORD
RENAMED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
changelog/.gitempty,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
changelog/248.bugfix.rst,sha256=zpa1QJfaqZ5dbakRBvlGQsp_B2i66oBFez2jAFFHZwM,118
|
|
3
2
|
dkist_processing_common/__init__.py,sha256=490Fwm_GgqpwriQlsYfKcLUZNhZ6GkINtJqcYSIEKoU,319
|
|
4
3
|
dkist_processing_common/config.py,sha256=IcpaD_NvHZU-aLlUNOTdRC4V7ADIvVQwrZ2dHhIr4NY,4247
|
|
5
4
|
dkist_processing_common/manual.py,sha256=IH72QxdGlr-BuWq2EDrfC9yStegO-elUWrobQqT4710,7042
|
|
@@ -11,7 +10,7 @@ dkist_processing_common/_util/tags.py,sha256=8r62_-x3xpbCoCu5dd09Q2u-OYzYiML6SlP
|
|
|
11
10
|
dkist_processing_common/codecs/__init__.py,sha256=du1iitvsudSSOMENSywXmXSLOlvIocJsPbvfEcyqFNc,159
|
|
12
11
|
dkist_processing_common/codecs/asdf.py,sha256=2GHCFOZk1j-ml4EolXac_sUzk7aPYJUGqKYxZk4mG_c,1046
|
|
13
12
|
dkist_processing_common/codecs/bytes.py,sha256=tiVEUu_Gzc5NfW1_qsJtHDlYAZzgIqA7f4cfAwN734k,495
|
|
14
|
-
dkist_processing_common/codecs/fits.py,sha256=
|
|
13
|
+
dkist_processing_common/codecs/fits.py,sha256=0D6tDvt13OhVXok4tS8VGHdd8OSV8DrRet8VCD6Zt3g,2346
|
|
15
14
|
dkist_processing_common/codecs/iobase.py,sha256=r0ImN0CxfjAnfMflNv7w2pGDp2i6EQg0p2OaEkE82pk,977
|
|
16
15
|
dkist_processing_common/codecs/json.py,sha256=OWXzoFWccJiojkiKSeDrMdL9f7EpdNIOMvO9YBBg-Yg,939
|
|
17
16
|
dkist_processing_common/codecs/path.py,sha256=LU5Kh1ew2PQI9hcpzbnZkE47k-zAMZDDV4cgqHRcDkY,197
|
|
@@ -59,7 +58,7 @@ dkist_processing_common/tasks/teardown.py,sha256=e4LKnphJDYDVDAez2tH7MxpZgCmxYsK
|
|
|
59
58
|
dkist_processing_common/tasks/transfer_input_data.py,sha256=afEW0glpCFMZRj90nFtQo_4XOQ4CuoOh86jahP6a-a0,5548
|
|
60
59
|
dkist_processing_common/tasks/trial_catalog.py,sha256=Y3DKstRfMS8nWWtJFMB0MUVPlZ1jWS_2jhJGMWwxy50,8748
|
|
61
60
|
dkist_processing_common/tasks/trial_output_data.py,sha256=aI_aRuu0qVO8zFGrr_9baxx9i3jUEHZSmsmbO6ytlkE,6960
|
|
62
|
-
dkist_processing_common/tasks/write_l1.py,sha256=
|
|
61
|
+
dkist_processing_common/tasks/write_l1.py,sha256=8KQ5LWa15mmjcoN0EgyaeLJS2qxeAowU5MC8IEIt4l4,22695
|
|
63
62
|
dkist_processing_common/tasks/mixin/__init__.py,sha256=-g-DQbU7m1bclJYuFe3Yh757V-35GIDTbstardKQ7nU,68
|
|
64
63
|
dkist_processing_common/tasks/mixin/globus.py,sha256=QAV8VElxMAqxJ2KSB_bJaraceovYfjHXjOdocrTCkIA,6592
|
|
65
64
|
dkist_processing_common/tasks/mixin/input_dataset.py,sha256=dkW5vf_QPgWedHO_Lf9GjBxr1QrUCKs6gIXufUTi7GE,6813
|
|
@@ -101,7 +100,7 @@ dkist_processing_common/tests/test_transfer_l1_output_data.py,sha256=27PifkyH3RZ
|
|
|
101
100
|
dkist_processing_common/tests/test_trial_catalog.py,sha256=SZ-nyn0MXU9Lkg_94FbKER_cwiGoi06GYlzF_3AmvKg,6802
|
|
102
101
|
dkist_processing_common/tests/test_trial_output_data.py,sha256=cBCj0kXyF5NEMzKh6zPVksdoXyE8ju1opJgWgjdcJWA,12790
|
|
103
102
|
dkist_processing_common/tests/test_workflow_task_base.py,sha256=Z5aPW5LQtS0UWJiYho4X0r-2gPLfzpkmMwfmaoFLjMg,10517
|
|
104
|
-
dkist_processing_common/tests/test_write_l1.py,sha256=
|
|
103
|
+
dkist_processing_common/tests/test_write_l1.py,sha256=xdPqIeS7brVUzDD0XmCVKc4N4QUbaUc0ENMFBwCYU2c,22203
|
|
105
104
|
docs/Makefile,sha256=qnlVz6PuBqE39NfHWuUnHhNEA-EFgT2-WJNNNy9ttfk,4598
|
|
106
105
|
docs/changelog.rst,sha256=S2jPASsWlQxSlAPqdvNrYvhk9k3FcFWNXFNDYXBSjl4,120
|
|
107
106
|
docs/conf.py,sha256=FkX575cqTqZGCcLAjg2MlvE8Buj1Vt3CpHNgZxG256E,1890
|
|
@@ -110,7 +109,7 @@ docs/landing_page.rst,sha256=aPAuXFhBx73lEZ59B6E6JXxkK0LlxzD0n-HXqHrfumQ,746
|
|
|
110
109
|
docs/make.bat,sha256=mBAhtURwhQ7yc95pqwJzlhqBSvRknr1aqZ5s8NKvdKs,4513
|
|
111
110
|
docs/requirements.txt,sha256=Kbl_X4c7RQZw035YTeNB63We6I7pvXFU4T0Uflp2yDY,29
|
|
112
111
|
licenses/LICENSE.rst,sha256=piZaQplkzOMmH1NXg6QIdo9wwo9pPCoHkvm2-DmH76E,1462
|
|
113
|
-
dkist_processing_common-10.
|
|
114
|
-
dkist_processing_common-10.
|
|
115
|
-
dkist_processing_common-10.
|
|
116
|
-
dkist_processing_common-10.
|
|
112
|
+
dkist_processing_common-10.8.0.dist-info/METADATA,sha256=soanbhriUctBbazTXM8EjCEoz-QK_x6glEBPsaTzqKg,7147
|
|
113
|
+
dkist_processing_common-10.8.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
|
114
|
+
dkist_processing_common-10.8.0.dist-info/top_level.txt,sha256=LJhd1W-Vn90K8HnQDIE4r52YDpUjjMWDnllAWHBByW0,48
|
|
115
|
+
dkist_processing_common-10.8.0.dist-info/RECORD,,
|
changelog/248.bugfix.rst
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Fix a bug exposed by updates in the `dkist-inventory` package that did not manage HISTORY or COMMENT cards correctly.
|
|
File without changes
|