dkist-processing-cryonirsp 1.11.1__py3-none-any.whl → 1.12.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.
Potentially problematic release.
This version of dkist-processing-cryonirsp might be problematic. Click here for more details.
- dkist_processing_cryonirsp/parsers/measurements.py +23 -14
- dkist_processing_cryonirsp/parsers/scan_step.py +11 -4
- dkist_processing_cryonirsp/tests/test_parse.py +1 -0
- {dkist_processing_cryonirsp-1.11.1.dist-info → dkist_processing_cryonirsp-1.12.0.dist-info}/METADATA +13 -13
- {dkist_processing_cryonirsp-1.11.1.dist-info → dkist_processing_cryonirsp-1.12.0.dist-info}/RECORD +7 -7
- {dkist_processing_cryonirsp-1.11.1.dist-info → dkist_processing_cryonirsp-1.12.0.dist-info}/WHEEL +0 -0
- {dkist_processing_cryonirsp-1.11.1.dist-info → dkist_processing_cryonirsp-1.12.0.dist-info}/top_level.txt +0 -0
|
@@ -1,38 +1,47 @@
|
|
|
1
1
|
"""Copies of UniqueBud and SingleValueSingleKeyFlower from common that only activate if the frames are "observe" task."""
|
|
2
|
+
from typing import Hashable
|
|
2
3
|
from typing import Type
|
|
3
4
|
|
|
4
5
|
from dkist_processing_common.models.flower_pot import SpilledDirt
|
|
5
6
|
from dkist_processing_common.parsers.single_value_single_key_flower import (
|
|
6
7
|
SingleValueSingleKeyFlower,
|
|
7
8
|
)
|
|
8
|
-
from dkist_processing_common.parsers.unique_bud import UniqueBud
|
|
9
9
|
|
|
10
10
|
from dkist_processing_cryonirsp.models.constants import CryonirspBudName
|
|
11
11
|
from dkist_processing_cryonirsp.models.tags import CryonirspStemName
|
|
12
12
|
from dkist_processing_cryonirsp.parsers.cryonirsp_l0_fits_access import CryonirspL0FitsAccess
|
|
13
|
+
from dkist_processing_cryonirsp.parsers.scan_step import NumberOfScanStepsBase
|
|
13
14
|
|
|
14
15
|
|
|
15
|
-
class NumberOfMeasurementsBud(
|
|
16
|
+
class NumberOfMeasurementsBud(NumberOfScanStepsBase):
|
|
16
17
|
"""Bud for finding the total number of measurements per scan step."""
|
|
17
18
|
|
|
18
19
|
def __init__(self):
|
|
19
20
|
self.metadata_key = "num_meas"
|
|
20
|
-
super().__init__(
|
|
21
|
-
constant_name=CryonirspBudName.num_meas.value, metadata_key=self.metadata_key
|
|
22
|
-
)
|
|
21
|
+
super().__init__(stem_name=CryonirspBudName.num_meas.value)
|
|
23
22
|
|
|
24
|
-
def
|
|
23
|
+
def getter(self, key: Hashable) -> Hashable:
|
|
25
24
|
"""
|
|
26
|
-
|
|
25
|
+
Search all scan steps to find the maximum number of measurements in a step.
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
This maximum number should be the same for all measurements, with the possible exception of the last one in
|
|
28
|
+
an abort.
|
|
29
|
+
|
|
30
|
+
Abort possibilities:
|
|
31
|
+
* if a measurement is missing in the last scan step of a multi-scan, multi-map observation, it will be handled
|
|
32
|
+
as an incomplete scan step and truncated by the scan step abort handler.
|
|
33
|
+
* if a measurement is missing in a single-map, single-scan observation then the number of measurements will be
|
|
34
|
+
given by the last measurement value that had as many frames as the maximum number of frames of any
|
|
35
|
+
measurement.
|
|
36
|
+
This is a formality for intensity mode observations but is an important check for polarimetric data as the
|
|
37
|
+
abort may have happened in the middle of the modulator state sequence.
|
|
32
38
|
"""
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
measurements_in_scan_steps = []
|
|
40
|
+
for meas_dict in self.scan_step_dict.values():
|
|
41
|
+
measurements_in_scan_steps.append(len(meas_dict))
|
|
42
|
+
return max(
|
|
43
|
+
measurements_in_scan_steps
|
|
44
|
+
) # if there are incomplete measurements, they should be at the end and will be truncated by an incomplete scan step
|
|
36
45
|
|
|
37
46
|
|
|
38
47
|
class MeasurementNumberFlower(SingleValueSingleKeyFlower):
|
|
@@ -312,11 +312,11 @@ class MapScanStepStemBase(Stem, ABC):
|
|
|
312
312
|
return step_list.index(scan_step_obj) + 1 # Here we decide that map scan indices start at 1
|
|
313
313
|
|
|
314
314
|
|
|
315
|
-
class
|
|
316
|
-
"""
|
|
315
|
+
class NumberOfScanStepsBase(MapScanStepStemBase, ABC):
|
|
316
|
+
"""Base class for managing scan steps."""
|
|
317
317
|
|
|
318
|
-
def __init__(self):
|
|
319
|
-
super().__init__(stem_name=
|
|
318
|
+
def __init__(self, stem_name: CryonirspBudName):
|
|
319
|
+
super().__init__(stem_name=stem_name)
|
|
320
320
|
|
|
321
321
|
@cached_property
|
|
322
322
|
def map_scan_to_obj_dict(self) -> dict[int, list[SingleScanStep]]:
|
|
@@ -361,6 +361,13 @@ class NumberOfScanStepsBud(MapScanStepStemBase):
|
|
|
361
361
|
|
|
362
362
|
return len(completed_steps)
|
|
363
363
|
|
|
364
|
+
|
|
365
|
+
class NumberOfScanStepsBud(NumberOfScanStepsBase):
|
|
366
|
+
"""Bud for finding the total number of scan steps."""
|
|
367
|
+
|
|
368
|
+
def __init__(self):
|
|
369
|
+
super().__init__(stem_name=CryonirspBudName.num_scan_steps.value)
|
|
370
|
+
|
|
364
371
|
def getter(self, key):
|
|
365
372
|
"""
|
|
366
373
|
Compute the number of complete scan steps.
|
|
@@ -980,6 +980,7 @@ def test_parse_cryonirsp_linearized_incomplete_raster_scan(
|
|
|
980
980
|
|
|
981
981
|
assert task.constants._db_dict[CryonirspBudName.num_scan_steps.value] == num_scan_steps - 1
|
|
982
982
|
assert task.constants._db_dict[CryonirspBudName.num_map_scans.value] == num_map_scans
|
|
983
|
+
assert task.constants._db_dict[CryonirspBudName.num_meas.value] == 2
|
|
983
984
|
|
|
984
985
|
|
|
985
986
|
@pytest.mark.parametrize("arm_id", ["CI", "SP"])
|
{dkist_processing_cryonirsp-1.11.1.dist-info → dkist_processing_cryonirsp-1.12.0.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dkist-processing-cryonirsp
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.12.0
|
|
4
4
|
Summary: Science processing code for the Cryo-NIRSP instrument on DKIST
|
|
5
5
|
Author-email: NSO / AURA <dkistdc@nso.edu>
|
|
6
6
|
License: BSD-3-Clause
|
|
@@ -89,7 +89,7 @@ Requires-Dist: WTForms==3.2.1; extra == "frozen"
|
|
|
89
89
|
Requires-Dist: Werkzeug==2.2.3; extra == "frozen"
|
|
90
90
|
Requires-Dist: aioftp==0.26.2; extra == "frozen"
|
|
91
91
|
Requires-Dist: aiohappyeyeballs==2.6.1; extra == "frozen"
|
|
92
|
-
Requires-Dist: aiohttp==3.12.
|
|
92
|
+
Requires-Dist: aiohttp==3.12.15; extra == "frozen"
|
|
93
93
|
Requires-Dist: aiosignal==1.4.0; extra == "frozen"
|
|
94
94
|
Requires-Dist: alembic==1.16.4; extra == "frozen"
|
|
95
95
|
Requires-Dist: amqp==5.3.1; extra == "frozen"
|
|
@@ -121,8 +121,8 @@ Requires-Dist: attrs==25.3.0; extra == "frozen"
|
|
|
121
121
|
Requires-Dist: babel==2.17.0; extra == "frozen"
|
|
122
122
|
Requires-Dist: billiard==4.2.1; extra == "frozen"
|
|
123
123
|
Requires-Dist: blinker==1.9.0; extra == "frozen"
|
|
124
|
-
Requires-Dist: boto3==1.39.
|
|
125
|
-
Requires-Dist: botocore==1.39.
|
|
124
|
+
Requires-Dist: boto3==1.39.16; extra == "frozen"
|
|
125
|
+
Requires-Dist: botocore==1.39.16; extra == "frozen"
|
|
126
126
|
Requires-Dist: cachelib==0.13.0; extra == "frozen"
|
|
127
127
|
Requires-Dist: celery==5.5.3; extra == "frozen"
|
|
128
128
|
Requires-Dist: certifi==2025.7.14; extra == "frozen"
|
|
@@ -147,7 +147,7 @@ Requires-Dist: dill==0.4.0; extra == "frozen"
|
|
|
147
147
|
Requires-Dist: dkist-header-validator==5.2.1; extra == "frozen"
|
|
148
148
|
Requires-Dist: dkist-processing-common==11.2.0; extra == "frozen"
|
|
149
149
|
Requires-Dist: dkist-processing-core==5.1.1; extra == "frozen"
|
|
150
|
-
Requires-Dist: dkist-processing-cryonirsp==1.
|
|
150
|
+
Requires-Dist: dkist-processing-cryonirsp==1.12.0; extra == "frozen"
|
|
151
151
|
Requires-Dist: dkist-processing-math==2.2.0; extra == "frozen"
|
|
152
152
|
Requires-Dist: dkist-processing-pac==3.1.1; extra == "frozen"
|
|
153
153
|
Requires-Dist: dkist-service-configuration==2.2; extra == "frozen"
|
|
@@ -209,14 +209,14 @@ Requires-Dist: networkx==3.5; extra == "frozen"
|
|
|
209
209
|
Requires-Dist: numba==0.61.2; extra == "frozen"
|
|
210
210
|
Requires-Dist: numpy==2.2.5; extra == "frozen"
|
|
211
211
|
Requires-Dist: object-clerk==0.1.2; extra == "frozen"
|
|
212
|
-
Requires-Dist: opentelemetry-api==1.
|
|
213
|
-
Requires-Dist: opentelemetry-exporter-otlp==1.
|
|
214
|
-
Requires-Dist: opentelemetry-exporter-otlp-proto-common==1.
|
|
215
|
-
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc==1.
|
|
216
|
-
Requires-Dist: opentelemetry-exporter-otlp-proto-http==1.
|
|
217
|
-
Requires-Dist: opentelemetry-proto==1.
|
|
218
|
-
Requires-Dist: opentelemetry-sdk==1.
|
|
219
|
-
Requires-Dist: opentelemetry-semantic-conventions==0.
|
|
212
|
+
Requires-Dist: opentelemetry-api==1.36.0; extra == "frozen"
|
|
213
|
+
Requires-Dist: opentelemetry-exporter-otlp==1.36.0; extra == "frozen"
|
|
214
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-common==1.36.0; extra == "frozen"
|
|
215
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc==1.36.0; extra == "frozen"
|
|
216
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-http==1.36.0; extra == "frozen"
|
|
217
|
+
Requires-Dist: opentelemetry-proto==1.36.0; extra == "frozen"
|
|
218
|
+
Requires-Dist: opentelemetry-sdk==1.36.0; extra == "frozen"
|
|
219
|
+
Requires-Dist: opentelemetry-semantic-conventions==0.57b0; extra == "frozen"
|
|
220
220
|
Requires-Dist: ordered-set==4.1.0; extra == "frozen"
|
|
221
221
|
Requires-Dist: packaging==25.0; extra == "frozen"
|
|
222
222
|
Requires-Dist: pandas==2.3.1; extra == "frozen"
|
{dkist_processing_cryonirsp-1.11.1.dist-info → dkist_processing_cryonirsp-1.12.0.dist-info}/RECORD
RENAMED
|
@@ -16,11 +16,11 @@ dkist_processing_cryonirsp/parsers/cryonirsp_l0_fits_access.py,sha256=rMB4mrUGQn
|
|
|
16
16
|
dkist_processing_cryonirsp/parsers/cryonirsp_l1_fits_access.py,sha256=sc8MzxYMc8E1eFrL5KguAGHViCMJhaDfiBtZPml4ELg,886
|
|
17
17
|
dkist_processing_cryonirsp/parsers/exposure_conditions.py,sha256=Mcud-0PQK0oJSxbqtQUtVk0t8b6YBEFSyGsGbG5UqGg,8445
|
|
18
18
|
dkist_processing_cryonirsp/parsers/map_repeats.py,sha256=PjZ986bqkCdii-EOzU045cWqadxQC_nyyqwWYIpYdls,1566
|
|
19
|
-
dkist_processing_cryonirsp/parsers/measurements.py,sha256=
|
|
19
|
+
dkist_processing_cryonirsp/parsers/measurements.py,sha256=nhll_yc-25ougA7N7VGP4kGWTqgQ8tDkhJVLsA0nStE,2813
|
|
20
20
|
dkist_processing_cryonirsp/parsers/modstates.py,sha256=00a4kCiwgioTpMkYY9ouFuiEsoQHcD-sJOM95qI9Fhc,1093
|
|
21
21
|
dkist_processing_cryonirsp/parsers/optical_density_filters.py,sha256=NURdMnNVu_nV7IfabyYynAoLe4xZ5iLbs6VU_lHmBA4,1531
|
|
22
22
|
dkist_processing_cryonirsp/parsers/polarimetric_check.py,sha256=HBzg9Zi9-M1M2jh4J7LoNd3OSn8MmU9TcujyhD788Lo,4746
|
|
23
|
-
dkist_processing_cryonirsp/parsers/scan_step.py,sha256=
|
|
23
|
+
dkist_processing_cryonirsp/parsers/scan_step.py,sha256=3HuclK9kHWgx29V6YQLr0nnGhaJJSSTexWAZ5STwQXA,19177
|
|
24
24
|
dkist_processing_cryonirsp/parsers/time.py,sha256=dpajm3tfrih-8pjlOWOvZVJVP2FihR87HFQSjR_KPYI,2543
|
|
25
25
|
dkist_processing_cryonirsp/parsers/wavelength.py,sha256=Ay5hZiDNV25-N_QXZINTCgn1ToiP2jvwumkbirBiJGk,883
|
|
26
26
|
dkist_processing_cryonirsp/tasks/__init__.py,sha256=iSODAESNU6zBZo_t44LeTmS1oj_l6EVF7k8xSNtppnk,1057
|
|
@@ -65,7 +65,7 @@ dkist_processing_cryonirsp/tests/test_instrument_polarization.py,sha256=lYd4Dg3u
|
|
|
65
65
|
dkist_processing_cryonirsp/tests/test_linearity_correction.py,sha256=00dQy-GiT8HFGIBQRiYJGG7yakdsyUghBXg25RSEuRU,9308
|
|
66
66
|
dkist_processing_cryonirsp/tests/test_make_movie_frames.py,sha256=oQnUmb9IxkRG7NrY00oS1g42L_LP941vdYdbEbI47gE,4858
|
|
67
67
|
dkist_processing_cryonirsp/tests/test_parameters.py,sha256=hy0ssu2OJmkHFKlGd0_d6EW10YjWsqGb68rOFlPqGuo,11105
|
|
68
|
-
dkist_processing_cryonirsp/tests/test_parse.py,sha256=
|
|
68
|
+
dkist_processing_cryonirsp/tests/test_parse.py,sha256=VKd9qa2MkC9u14XchYk2QHyIvuPiHUTdyleJgCycXj4,57136
|
|
69
69
|
dkist_processing_cryonirsp/tests/test_quality.py,sha256=DrlHre7thON2x4QzWdupuqKT_WoPtW43Jnjb7lLnp3I,8083
|
|
70
70
|
dkist_processing_cryonirsp/tests/test_sp_beam_boundaries.py,sha256=fPsXnNvkb76mfp7bxu42eTLQpe_TmCc9Ue8hJ_LymbA,4904
|
|
71
71
|
dkist_processing_cryonirsp/tests/test_sp_geometric.py,sha256=zeELL7dvAntN9k19WWTKwpFX95Fj-GxRV0tx-84sVdE,15645
|
|
@@ -106,7 +106,7 @@ docs/scientific_changelog.rst,sha256=01AWBSHg8zElnodCgAq-hMxhk9CkX5rtEENx4iz0sjI
|
|
|
106
106
|
docs/sp_science_calibration.rst,sha256=XL-H_hyzqwPHYNW3j-muItX_hGqMi-gjFRQbHp60LlU,2997
|
|
107
107
|
docs/wavelength_calibration.rst,sha256=s7ds_QKlVJ68fdONSY3DOBvHHaQC0JR_D4goG_VVKWw,3457
|
|
108
108
|
licenses/LICENSE.rst,sha256=piZaQplkzOMmH1NXg6QIdo9wwo9pPCoHkvm2-DmH76E,1462
|
|
109
|
-
dkist_processing_cryonirsp-1.
|
|
110
|
-
dkist_processing_cryonirsp-1.
|
|
111
|
-
dkist_processing_cryonirsp-1.
|
|
112
|
-
dkist_processing_cryonirsp-1.
|
|
109
|
+
dkist_processing_cryonirsp-1.12.0.dist-info/METADATA,sha256=RaRaB_m8T_SR9utFVwhce6Rq3PuAN94kIMllctKLVCw,22111
|
|
110
|
+
dkist_processing_cryonirsp-1.12.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
111
|
+
dkist_processing_cryonirsp-1.12.0.dist-info/top_level.txt,sha256=Sm9b1ddKnsF9Bh3mqDOct1Sm7k8I9aN7vGHgpmu-MlQ,51
|
|
112
|
+
dkist_processing_cryonirsp-1.12.0.dist-info/RECORD,,
|
{dkist_processing_cryonirsp-1.11.1.dist-info → dkist_processing_cryonirsp-1.12.0.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|