dkist-processing-cryonirsp 1.11.0__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.

@@ -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(UniqueBud):
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 setter(self, fits_obj: CryonirspL0FitsAccess) -> Type[SpilledDirt] | int:
23
+ def getter(self, key: Hashable) -> Hashable:
25
24
  """
26
- Setter for the bud.
25
+ Search all scan steps to find the maximum number of measurements in a step.
27
26
 
28
- Parameters
29
- ----------
30
- fits_obj:
31
- A single FitsAccess object
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
- if fits_obj.ip_task_type != "observe":
34
- return SpilledDirt
35
- return getattr(fits_obj, self.metadata_key)
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 NumberOfScanStepsBud(MapScanStepStemBase):
316
- """Bud for finding the total number of scan steps."""
315
+ class NumberOfScanStepsBase(MapScanStepStemBase, ABC):
316
+ """Base class for managing scan steps."""
317
317
 
318
- def __init__(self):
319
- super().__init__(stem_name=CryonirspBudName.num_scan_steps.value)
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"])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dkist-processing-cryonirsp
3
- Version: 1.11.0
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
@@ -30,7 +30,7 @@ Requires-Dist: peakutils==1.3.5
30
30
  Requires-Dist: scikit-image==0.25.2
31
31
  Requires-Dist: scipy==1.15.3
32
32
  Requires-Dist: sunpy==6.1.1
33
- Requires-Dist: solar-wavelength-calibration==1.0
33
+ Requires-Dist: solar-wavelength-calibration==1.0.1
34
34
  Provides-Extra: test
35
35
  Requires-Dist: pytest; extra == "test"
36
36
  Requires-Dist: pytest-cov; extra == "test"
@@ -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.14; extra == "frozen"
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"
@@ -115,14 +115,14 @@ Requires-Dist: asdf_transform_schemas==0.6.0; extra == "frozen"
115
115
  Requires-Dist: asgiref==3.9.1; extra == "frozen"
116
116
  Requires-Dist: asteval==1.0.6; extra == "frozen"
117
117
  Requires-Dist: astropy==7.0.2; extra == "frozen"
118
- Requires-Dist: astropy-iers-data==0.2025.7.14.0.40.29; extra == "frozen"
118
+ Requires-Dist: astropy-iers-data==0.2025.7.28.0.41.50; extra == "frozen"
119
119
  Requires-Dist: asyncpg==0.30.0; extra == "frozen"
120
120
  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.8; extra == "frozen"
125
- Requires-Dist: botocore==1.39.8; extra == "frozen"
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"
@@ -136,7 +136,7 @@ Requires-Dist: clickclick==20.10.2; extra == "frozen"
136
136
  Requires-Dist: colorama==0.4.6; extra == "frozen"
137
137
  Requires-Dist: colorlog==6.9.0; extra == "frozen"
138
138
  Requires-Dist: connexion==2.14.2; extra == "frozen"
139
- Requires-Dist: contourpy==1.3.2; extra == "frozen"
139
+ Requires-Dist: contourpy==1.3.3; extra == "frozen"
140
140
  Requires-Dist: cron-descriptor==1.4.5; extra == "frozen"
141
141
  Requires-Dist: croniter==6.0.0; extra == "frozen"
142
142
  Requires-Dist: cryptography==45.0.5; 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.11.0; extra == "frozen"
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"
@@ -162,11 +162,11 @@ Requires-Dist: flower==2.0.1; extra == "frozen"
162
162
  Requires-Dist: fonttools==4.59.0; extra == "frozen"
163
163
  Requires-Dist: frozenlist==1.7.0; extra == "frozen"
164
164
  Requires-Dist: fsspec==2025.7.0; extra == "frozen"
165
- Requires-Dist: globus-sdk==3.60.0; extra == "frozen"
166
- Requires-Dist: google-re2==1.1.20240702; extra == "frozen"
165
+ Requires-Dist: globus-sdk==3.61.0; extra == "frozen"
166
+ Requires-Dist: google-re2==1.1.20250722; extra == "frozen"
167
167
  Requires-Dist: googleapis-common-protos==1.70.0; extra == "frozen"
168
168
  Requires-Dist: gqlclient==1.2.3; extra == "frozen"
169
- Requires-Dist: grpcio==1.73.1; extra == "frozen"
169
+ Requires-Dist: grpcio==1.74.0; extra == "frozen"
170
170
  Requires-Dist: gunicorn==23.0.0; extra == "frozen"
171
171
  Requires-Dist: h11==0.16.0; extra == "frozen"
172
172
  Requires-Dist: httpcore==1.0.9; extra == "frozen"
@@ -190,7 +190,7 @@ Requires-Dist: lazy_loader==0.4; extra == "frozen"
190
190
  Requires-Dist: limits==5.4.0; extra == "frozen"
191
191
  Requires-Dist: linkify-it-py==2.0.3; extra == "frozen"
192
192
  Requires-Dist: llvmlite==0.44.0; extra == "frozen"
193
- Requires-Dist: lmfit==1.3.3; extra == "frozen"
193
+ Requires-Dist: lmfit==1.3.4; extra == "frozen"
194
194
  Requires-Dist: lockfile==0.12.2; extra == "frozen"
195
195
  Requires-Dist: loguru==0.7.3; extra == "frozen"
196
196
  Requires-Dist: markdown-it-py==3.0.0; 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.35.0; extra == "frozen"
213
- Requires-Dist: opentelemetry-exporter-otlp==1.35.0; extra == "frozen"
214
- Requires-Dist: opentelemetry-exporter-otlp-proto-common==1.35.0; extra == "frozen"
215
- Requires-Dist: opentelemetry-exporter-otlp-proto-grpc==1.35.0; extra == "frozen"
216
- Requires-Dist: opentelemetry-exporter-otlp-proto-http==1.35.0; extra == "frozen"
217
- Requires-Dist: opentelemetry-proto==1.35.0; extra == "frozen"
218
- Requires-Dist: opentelemetry-sdk==1.35.0; extra == "frozen"
219
- Requires-Dist: opentelemetry-semantic-conventions==0.56b0; extra == "frozen"
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"
@@ -259,7 +259,7 @@ Requires-Dist: rfc3339-validator==0.1.4; extra == "frozen"
259
259
  Requires-Dist: rich==13.9.4; extra == "frozen"
260
260
  Requires-Dist: rich-argparse==1.7.1; extra == "frozen"
261
261
  Requires-Dist: rpds-py==0.26.0; extra == "frozen"
262
- Requires-Dist: s3transfer==0.13.0; extra == "frozen"
262
+ Requires-Dist: s3transfer==0.13.1; extra == "frozen"
263
263
  Requires-Dist: scikit-image==0.25.2; extra == "frozen"
264
264
  Requires-Dist: scipy==1.15.3; extra == "frozen"
265
265
  Requires-Dist: semantic-version==2.10.0; extra == "frozen"
@@ -267,7 +267,7 @@ Requires-Dist: setproctitle==1.3.6; extra == "frozen"
267
267
  Requires-Dist: setuptools==65.5.0; extra == "frozen"
268
268
  Requires-Dist: six==1.17.0; extra == "frozen"
269
269
  Requires-Dist: sniffio==1.3.1; extra == "frozen"
270
- Requires-Dist: solar-wavelength-calibration==1.0; extra == "frozen"
270
+ Requires-Dist: solar-wavelength-calibration==1.0.1; extra == "frozen"
271
271
  Requires-Dist: sqids==0.5.1; extra == "frozen"
272
272
  Requires-Dist: sqlparse==0.5.3; extra == "frozen"
273
273
  Requires-Dist: sunpy==6.1.1; extra == "frozen"
@@ -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=6IqqrVbXVnUxYUXnQF-WlJSEP-eSffr2Gx6Kj0bjxhc,1872
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=7XNUq48qbdpV8GeaBeG9XFRDkYlgw8Fjd6ByFZ24OAc,18972
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=FlrLdn_XDPpPw1YMthnF-XoxSI1R8pNsmYJdu-83UTI,57063
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.11.0.dist-info/METADATA,sha256=t_HCuU3WCxGweGw_ihVM-IJiAzxfIMKa8DLo2kMkkw0,22105
110
- dkist_processing_cryonirsp-1.11.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
111
- dkist_processing_cryonirsp-1.11.0.dist-info/top_level.txt,sha256=Sm9b1ddKnsF9Bh3mqDOct1Sm7k8I9aN7vGHgpmu-MlQ,51
112
- dkist_processing_cryonirsp-1.11.0.dist-info/RECORD,,
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,,