dkist-processing-ops 1.6.8__py3-none-any.whl → 1.6.9__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.
Potentially problematic release.
This version of dkist-processing-ops might be problematic. Click here for more details.
- dkist_processing_ops/_version.py +2 -2
- dkist_processing_ops/tasks/read_memory_leak.py +22 -6
- {dkist_processing_ops-1.6.8.dist-info → dkist_processing_ops-1.6.9.dist-info}/METADATA +1 -1
- {dkist_processing_ops-1.6.8.dist-info → dkist_processing_ops-1.6.9.dist-info}/RECORD +7 -7
- {dkist_processing_ops-1.6.8.dist-info → dkist_processing_ops-1.6.9.dist-info}/LICENSE.rst +0 -0
- {dkist_processing_ops-1.6.8.dist-info → dkist_processing_ops-1.6.9.dist-info}/WHEEL +0 -0
- {dkist_processing_ops-1.6.8.dist-info → dkist_processing_ops-1.6.9.dist-info}/top_level.txt +0 -0
dkist_processing_ops/_version.py
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import logging
|
|
1
2
|
import os
|
|
3
|
+
import sys
|
|
2
4
|
from abc import ABC
|
|
3
5
|
from pathlib import Path
|
|
4
6
|
from typing import Any
|
|
5
7
|
from typing import Generator
|
|
6
8
|
|
|
7
9
|
import numpy as np
|
|
8
|
-
from astropy.io import fits
|
|
9
10
|
from dkist_processing_common.codecs.fits import fits_hdu_decoder
|
|
10
11
|
from dkist_processing_common.codecs.path import path_decoder
|
|
11
12
|
from dkist_processing_common.models.tags import Tag
|
|
@@ -21,7 +22,10 @@ def yield_from_read(
|
|
|
21
22
|
|
|
22
23
|
def binary_decoder(path: Path) -> bytes:
|
|
23
24
|
"""Generates a random blob of binary data."""
|
|
24
|
-
|
|
25
|
+
data = os.urandom(67109008) # This is the size of the VBI data arrays, in bytes
|
|
26
|
+
logging.info(f"Size of data: {sys.getsizeof(data)}")
|
|
27
|
+
logging.info(f"Bytes of data: {len(data)}")
|
|
28
|
+
return data
|
|
25
29
|
|
|
26
30
|
|
|
27
31
|
class FitsDataRead(WorkflowTaskBase, ABC):
|
|
@@ -34,26 +38,38 @@ class FitsDataRead(WorkflowTaskBase, ABC):
|
|
|
34
38
|
def read_method(self):
|
|
35
39
|
return self.metadata_store_recipe_run_configuration().get("read_method", "return")
|
|
36
40
|
|
|
41
|
+
@property
|
|
42
|
+
def manipulate_data(self):
|
|
43
|
+
return self.metadata_store_recipe_run_configuration().get("manipulate_data", True)
|
|
44
|
+
|
|
37
45
|
def run(self) -> None:
|
|
38
46
|
if self.data_type == "fits":
|
|
39
47
|
if self.read_method == "return":
|
|
40
48
|
hdus = self.read(tags=[Tag.input(), Tag.frame()], decoder=fits_hdu_decoder)
|
|
41
49
|
for hdu in hdus:
|
|
42
|
-
|
|
50
|
+
h = hdu.header
|
|
51
|
+
d = hdu.data
|
|
52
|
+
if self.manipulate_data:
|
|
53
|
+
total = np.sum(d)
|
|
43
54
|
if self.read_method == "yield":
|
|
44
55
|
hdus = yield_from_read(
|
|
45
56
|
self, tags=[Tag.input(), Tag.frame()], decoder=fits_hdu_decoder
|
|
46
57
|
)
|
|
47
58
|
for hdu in hdus:
|
|
48
|
-
|
|
59
|
+
h = hdu.header
|
|
60
|
+
d = hdu.data
|
|
61
|
+
if self.manipulate_data:
|
|
62
|
+
total = np.sum(d)
|
|
49
63
|
if self.data_type == "binary":
|
|
50
64
|
if self.read_method == "return":
|
|
51
65
|
hdus = self.read(tags=[Tag.input(), Tag.frame()], decoder=binary_decoder)
|
|
52
66
|
for hdu in hdus:
|
|
53
|
-
|
|
67
|
+
data = hdu
|
|
68
|
+
data.seek(-1)
|
|
54
69
|
if self.read_method == "yield":
|
|
55
70
|
hdus = yield_from_read(
|
|
56
71
|
self, tags=[Tag.input(), Tag.frame()], decoder=binary_decoder
|
|
57
72
|
)
|
|
58
73
|
for hdu in hdus:
|
|
59
|
-
|
|
74
|
+
data = hdu
|
|
75
|
+
data.seek(-1)
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
dkist_processing_ops/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
dkist_processing_ops/_version.py,sha256=
|
|
2
|
+
dkist_processing_ops/_version.py,sha256=H4tpGbuK5q1tqtuUh1Nr2Buwsz8VycRrcpqeBxyquBg,411
|
|
3
3
|
dkist_processing_ops/dags/scale.py,sha256=We5TYjNhkJ-5ykfbrOMgjTpXdzOCkIeyKyA-40sU9r0,2312
|
|
4
4
|
dkist_processing_ops/tasks/__init__.py,sha256=P81O9cg4dlBMqBTaWitdsAte68RsMtDlhV30JSZfXUY,107
|
|
5
|
-
dkist_processing_ops/tasks/read_memory_leak.py,sha256=
|
|
5
|
+
dkist_processing_ops/tasks/read_memory_leak.py,sha256=_4qgYeO2aeO1YYS2foJ7Sle9Pyqz-qTsA64QBjDK35E,2818
|
|
6
6
|
dkist_processing_ops/tasks/wait.py,sha256=uObka-nH1dKPcGBDsp3t2RCtTV2F1kksM0V-lRewFuY,273
|
|
7
7
|
dkist_processing_ops/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
dkist_processing_ops/tests/test_workflows.py,sha256=Ch_8BlGeQyPJU_9hB_GOncwW-SoZwpRUVKMOEz0RQZk,285
|
|
9
9
|
dkist_processing_ops/workflows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
dkist_processing_ops/workflows/memory_leak.py,sha256=lYXAYyJVjXif3Os9xPDp-bPTG_je6HOw1uvRJ4WMUi4,758
|
|
11
11
|
dkist_processing_ops/workflows/smoke.py,sha256=ofXu0_iYF6L3zQy-BOVvS5VdzKhmXs1gyugqMNkd-GM,878
|
|
12
|
-
dkist_processing_ops-1.6.
|
|
13
|
-
dkist_processing_ops-1.6.
|
|
14
|
-
dkist_processing_ops-1.6.
|
|
15
|
-
dkist_processing_ops-1.6.
|
|
16
|
-
dkist_processing_ops-1.6.
|
|
12
|
+
dkist_processing_ops-1.6.9.dist-info/LICENSE.rst,sha256=LJjTmkf2-q1phdZSySMpiyPxgLOy6zYHOr3R1Bb1__8,327
|
|
13
|
+
dkist_processing_ops-1.6.9.dist-info/METADATA,sha256=d33lBvDYyjJtlQ2_noK1hN0RgSTjp15itgpGi8FKq6I,1499
|
|
14
|
+
dkist_processing_ops-1.6.9.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
15
|
+
dkist_processing_ops-1.6.9.dist-info/top_level.txt,sha256=o_SNho1HKt6wvCSUhm9qzX9FS2iopnqYuMos1CCD9cI,21
|
|
16
|
+
dkist_processing_ops-1.6.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|