dkist-processing-ops 1.6.10__tar.gz → 1.6.12__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-ops might be problematic. Click here for more details.
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/PKG-INFO +1 -1
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/dkist_processing_ops/_version.py +2 -2
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/dkist_processing_ops/tasks/read_memory_leak.py +9 -5
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/dkist_processing_ops.egg-info/PKG-INFO +1 -1
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/.gitignore +0 -0
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/.pre-commit-config.yaml +0 -0
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/LICENSE.rst +0 -0
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/MANIFEST.in +0 -0
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/README.rst +0 -0
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/bitbucket-pipelines.yml +0 -0
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/dkist_processing_ops/__init__.py +0 -0
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/dkist_processing_ops/dags/scale.py +0 -0
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/dkist_processing_ops/tasks/__init__.py +0 -0
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/dkist_processing_ops/tasks/wait.py +0 -0
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/dkist_processing_ops/tests/__init__.py +0 -0
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/dkist_processing_ops/tests/test_workflows.py +0 -0
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/dkist_processing_ops/workflows/__init__.py +0 -0
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/dkist_processing_ops/workflows/memory_leak.py +0 -0
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/dkist_processing_ops/workflows/smoke.py +0 -0
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/dkist_processing_ops.egg-info/SOURCES.txt +0 -0
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/dkist_processing_ops.egg-info/dependency_links.txt +0 -0
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/dkist_processing_ops.egg-info/not-zip-safe +0 -0
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/dkist_processing_ops.egg-info/requires.txt +0 -0
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/dkist_processing_ops.egg-info/top_level.txt +0 -0
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/pyproject.toml +0 -0
- {dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/setup.cfg +0 -0
|
@@ -7,7 +7,7 @@ from typing import Any
|
|
|
7
7
|
from typing import Generator
|
|
8
8
|
|
|
9
9
|
import numpy as np
|
|
10
|
-
from
|
|
10
|
+
from astropy.io import fits
|
|
11
11
|
from dkist_processing_common.codecs.path import path_decoder
|
|
12
12
|
from dkist_processing_common.models.tags import Tag
|
|
13
13
|
from dkist_processing_common.tasks import tag_type_hint
|
|
@@ -28,6 +28,12 @@ def binary_decoder(path: Path) -> bytes:
|
|
|
28
28
|
return data
|
|
29
29
|
|
|
30
30
|
|
|
31
|
+
def fits_smart_hdu_decoder(path: Path) -> fits.PrimaryHDU | fits.CompImageHDU:
|
|
32
|
+
"""Read a Path with `fits` to produce an `HDUList`."""
|
|
33
|
+
hdu_list = fits.open(path, lazy_load_hdus=False)
|
|
34
|
+
return hdu_list[1]
|
|
35
|
+
|
|
36
|
+
|
|
31
37
|
class FitsDataRead(WorkflowTaskBase, ABC):
|
|
32
38
|
@property
|
|
33
39
|
def data_type(self) -> str:
|
|
@@ -45,7 +51,7 @@ class FitsDataRead(WorkflowTaskBase, ABC):
|
|
|
45
51
|
def run(self) -> None:
|
|
46
52
|
if self.data_type == "fits":
|
|
47
53
|
if self.read_method == "return":
|
|
48
|
-
hdus = self.read(tags=[Tag.input(), Tag.frame()], decoder=
|
|
54
|
+
hdus = self.read(tags=[Tag.input(), Tag.frame()], decoder=fits_smart_hdu_decoder)
|
|
49
55
|
for hdu in hdus:
|
|
50
56
|
h = hdu.header
|
|
51
57
|
d = hdu.data
|
|
@@ -53,7 +59,7 @@ class FitsDataRead(WorkflowTaskBase, ABC):
|
|
|
53
59
|
total = np.sum(d)
|
|
54
60
|
if self.read_method == "yield":
|
|
55
61
|
hdus = yield_from_read(
|
|
56
|
-
self, tags=[Tag.input(), Tag.frame()], decoder=
|
|
62
|
+
self, tags=[Tag.input(), Tag.frame()], decoder=fits_smart_hdu_decoder
|
|
57
63
|
)
|
|
58
64
|
for hdu in hdus:
|
|
59
65
|
h = hdu.header
|
|
@@ -65,11 +71,9 @@ class FitsDataRead(WorkflowTaskBase, ABC):
|
|
|
65
71
|
hdus = self.read(tags=[Tag.input(), Tag.frame()], decoder=binary_decoder)
|
|
66
72
|
for hdu in hdus:
|
|
67
73
|
data = hdu
|
|
68
|
-
data.append(b"a1b2c3")
|
|
69
74
|
if self.read_method == "yield":
|
|
70
75
|
hdus = yield_from_read(
|
|
71
76
|
self, tags=[Tag.input(), Tag.frame()], decoder=binary_decoder
|
|
72
77
|
)
|
|
73
78
|
for hdu in hdus:
|
|
74
79
|
data = hdu
|
|
75
|
-
data.append(b"a1b2c3")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/dkist_processing_ops/__init__.py
RENAMED
|
File without changes
|
{dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/dkist_processing_ops/dags/scale.py
RENAMED
|
File without changes
|
{dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/dkist_processing_ops/tasks/__init__.py
RENAMED
|
File without changes
|
{dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/dkist_processing_ops/tasks/wait.py
RENAMED
|
File without changes
|
{dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/dkist_processing_ops/tests/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dkist_processing_ops-1.6.10 → dkist_processing_ops-1.6.12}/dkist_processing_ops/workflows/smoke.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
|