dkist-processing-cryonirsp 1.4.14__py3-none-any.whl → 1.4.15__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/exposure_conditions.py +5 -3
- dkist_processing_cryonirsp/tests/test_parse.py +41 -0
- {dkist_processing_cryonirsp-1.4.14.dist-info → dkist_processing_cryonirsp-1.4.15.dist-info}/METADATA +1 -1
- {dkist_processing_cryonirsp-1.4.14.dist-info → dkist_processing_cryonirsp-1.4.15.dist-info}/RECORD +6 -6
- {dkist_processing_cryonirsp-1.4.14.dist-info → dkist_processing_cryonirsp-1.4.15.dist-info}/WHEEL +0 -0
- {dkist_processing_cryonirsp-1.4.14.dist-info → dkist_processing_cryonirsp-1.4.15.dist-info}/top_level.txt +0 -0
|
@@ -71,7 +71,8 @@ class CryonirspConditionalTaskExposureConditionsBudBase(Stem):
|
|
|
71
71
|
-------
|
|
72
72
|
The exposure time associated with this fits object
|
|
73
73
|
"""
|
|
74
|
-
|
|
74
|
+
task_type = parse_header_ip_task_with_gains(fits_obj=fits_obj)
|
|
75
|
+
if task_type.upper() not in self.task_types_to_ignore:
|
|
75
76
|
return getattr(fits_obj, self.metadata_key)
|
|
76
77
|
return SpilledDirt
|
|
77
78
|
|
|
@@ -146,11 +147,12 @@ class CryonirspPickyDarkExposureConditionsBudBase(Stem):
|
|
|
146
147
|
-------
|
|
147
148
|
A tuple of a boolean indicating if the task is a dark task, and the exposure conditions for this fits object
|
|
148
149
|
"""
|
|
149
|
-
|
|
150
|
+
task_type = parse_header_ip_task_with_gains(fits_obj=fits_obj)
|
|
151
|
+
if task_type.upper() == TaskName.dark.value:
|
|
150
152
|
return self.DarkTaskTestAndExposureConditions(
|
|
151
153
|
is_dark=True, exposure_conditions=getattr(fits_obj, self.metadata_key)
|
|
152
154
|
)
|
|
153
|
-
if
|
|
155
|
+
if task_type.upper() not in self.task_types_to_ignore:
|
|
154
156
|
return self.DarkTaskTestAndExposureConditions(
|
|
155
157
|
is_dark=False, exposure_conditions=getattr(fits_obj, self.metadata_key)
|
|
156
158
|
)
|
|
@@ -1504,3 +1504,44 @@ def test_missing_lamp_gain_frames(parse_linearized_task, arm_id):
|
|
|
1504
1504
|
|
|
1505
1505
|
with pytest.raises(ValueError, match="lamp_gain frames not found."):
|
|
1506
1506
|
task()
|
|
1507
|
+
|
|
1508
|
+
|
|
1509
|
+
@pytest.mark.parametrize("arm_id", ["CI"])
|
|
1510
|
+
def test_wrong_exposure_time_lamp_gain_dark(parse_linearized_task, arm_id):
|
|
1511
|
+
"""
|
|
1512
|
+
Given: lamp gain frames with a different exposure time than the dark frames
|
|
1513
|
+
When: parsing data where the lamp gain has no matching exposure time
|
|
1514
|
+
Then: everything is fine because CRYO-CI ignores lamp gains
|
|
1515
|
+
"""
|
|
1516
|
+
task = parse_linearized_task
|
|
1517
|
+
lin_tag = [CryonirspTag.linearized()]
|
|
1518
|
+
solar_gain_exposure_condition = ExposureConditions(
|
|
1519
|
+
10.0, AllowableOpticalDensityFilterNames.OPEN.value
|
|
1520
|
+
)
|
|
1521
|
+
write_solar_gain_frames_to_task(
|
|
1522
|
+
task,
|
|
1523
|
+
tags=lin_tag,
|
|
1524
|
+
exposure_condition=solar_gain_exposure_condition,
|
|
1525
|
+
num_modstates=1,
|
|
1526
|
+
)
|
|
1527
|
+
lamp_gain_exposure_condition = ExposureConditions(
|
|
1528
|
+
1000.0, AllowableOpticalDensityFilterNames.OPEN.value
|
|
1529
|
+
)
|
|
1530
|
+
write_lamp_gain_frames_to_task(
|
|
1531
|
+
task,
|
|
1532
|
+
tags=lin_tag,
|
|
1533
|
+
exposure_condition=lamp_gain_exposure_condition,
|
|
1534
|
+
num_modstates=1,
|
|
1535
|
+
)
|
|
1536
|
+
dark_exp_condition = ExposureConditions(10.0, AllowableOpticalDensityFilterNames.OPEN.value)
|
|
1537
|
+
write_dark_frames_to_task(task, exposure_condition=dark_exp_condition, tags=lin_tag)
|
|
1538
|
+
|
|
1539
|
+
task()
|
|
1540
|
+
|
|
1541
|
+
assert task.constants._db_dict["DARK_FRAME_EXPOSURE_CONDITIONS_LIST"] == [[10.0, "OPEN"]]
|
|
1542
|
+
assert task.constants._db_dict["SOLAR_GAIN_EXPOSURE_CONDITIONS_LIST"] == [[10.0, "OPEN"]]
|
|
1543
|
+
assert task.constants._db_dict[
|
|
1544
|
+
"CI_NON_DARK_AND_NON_POLCAL_AND_NON_LAMP_GAIN_TASK_EXPOSURE_CONDITIONS_LIST"
|
|
1545
|
+
] == [[10.0, "OPEN"]]
|
|
1546
|
+
with pytest.raises(KeyError):
|
|
1547
|
+
assert task.constants._db_dict["LAMP_GAIN_EXPOSURE_CONDITIONS_LIST"]
|
{dkist_processing_cryonirsp-1.4.14.dist-info → dkist_processing_cryonirsp-1.4.15.dist-info}/RECORD
RENAMED
|
@@ -11,7 +11,7 @@ dkist_processing_cryonirsp/parsers/__init__.py,sha256=m6UekKftTahNJ3W5K3mZSz4Y4Z
|
|
|
11
11
|
dkist_processing_cryonirsp/parsers/check_for_gains.py,sha256=v-eD1LG0dlFoZXz5Y-2ZyPvRL2TZ8gWfr5cN6YNYqvo,2341
|
|
12
12
|
dkist_processing_cryonirsp/parsers/cryonirsp_l0_fits_access.py,sha256=iu5GJWVQ1PZfv5TR0u_IS2j2KZBU0yewa1ugxjDfVzk,4568
|
|
13
13
|
dkist_processing_cryonirsp/parsers/cryonirsp_l1_fits_access.py,sha256=sc8MzxYMc8E1eFrL5KguAGHViCMJhaDfiBtZPml4ELg,886
|
|
14
|
-
dkist_processing_cryonirsp/parsers/exposure_conditions.py,sha256=
|
|
14
|
+
dkist_processing_cryonirsp/parsers/exposure_conditions.py,sha256=Mcud-0PQK0oJSxbqtQUtVk0t8b6YBEFSyGsGbG5UqGg,8445
|
|
15
15
|
dkist_processing_cryonirsp/parsers/map_repeats.py,sha256=PjZ986bqkCdii-EOzU045cWqadxQC_nyyqwWYIpYdls,1566
|
|
16
16
|
dkist_processing_cryonirsp/parsers/measurements.py,sha256=6IqqrVbXVnUxYUXnQF-WlJSEP-eSffr2Gx6Kj0bjxhc,1872
|
|
17
17
|
dkist_processing_cryonirsp/parsers/modstates.py,sha256=00a4kCiwgioTpMkYY9ouFuiEsoQHcD-sJOM95qI9Fhc,1093
|
|
@@ -65,7 +65,7 @@ dkist_processing_cryonirsp/tests/test_instrument_polarization.py,sha256=GgZmPJVt
|
|
|
65
65
|
dkist_processing_cryonirsp/tests/test_linearity_correction.py,sha256=y9gDWlHsOaTMP7K5-lIIVmboa6nd0ozaqEtl6Fvt5T0,9406
|
|
66
66
|
dkist_processing_cryonirsp/tests/test_make_movie_frames.py,sha256=WznHp9dV2-jbJYzRniCAIbSHCGNc0SpSzyVDSrZkYd4,4904
|
|
67
67
|
dkist_processing_cryonirsp/tests/test_parameters.py,sha256=CbaEnxx3HGZmqZJbNzQ2IJpIg6AKlK26BT3TXUMGYAE,11438
|
|
68
|
-
dkist_processing_cryonirsp/tests/test_parse.py,sha256=
|
|
68
|
+
dkist_processing_cryonirsp/tests/test_parse.py,sha256=UXbAZb4EJ-jlrkSfQXGTp7SA9B-OG5UBgV2SkCQZHxg,55804
|
|
69
69
|
dkist_processing_cryonirsp/tests/test_quality.py,sha256=DWuL7q8x2RtPz3LN9-KEw541sv6Law9WyVQKaamkOmE,8169
|
|
70
70
|
dkist_processing_cryonirsp/tests/test_sp_beam_boundaries.py,sha256=4hONuVLQAqkQjNtpNzvmqEWLg3LI1XJLWaekkeS3SJo,4815
|
|
71
71
|
dkist_processing_cryonirsp/tests/test_sp_dispersion_axis_correction.py,sha256=lhwT_I0HQuH66I0TRvARfuNnWWjxeAvQ4fEEVmbhp_E,6098
|
|
@@ -105,7 +105,7 @@ docs/requirements_table.rst,sha256=FaqSag9kPi77gWPhzeo_tFEhRFjb3qUuNqqQe1K76NM,2
|
|
|
105
105
|
docs/scientific_changelog.rst,sha256=01AWBSHg8zElnodCgAq-hMxhk9CkX5rtEENx4iz0sjI,300
|
|
106
106
|
docs/sp_science_calibration.rst,sha256=fHBOZ2cqySxLjNi737KfynlmHZy9W4EwvuzxnyjDNvk,2597
|
|
107
107
|
licenses/LICENSE.rst,sha256=piZaQplkzOMmH1NXg6QIdo9wwo9pPCoHkvm2-DmH76E,1462
|
|
108
|
-
dkist_processing_cryonirsp-1.4.
|
|
109
|
-
dkist_processing_cryonirsp-1.4.
|
|
110
|
-
dkist_processing_cryonirsp-1.4.
|
|
111
|
-
dkist_processing_cryonirsp-1.4.
|
|
108
|
+
dkist_processing_cryonirsp-1.4.15.dist-info/METADATA,sha256=nzYxsQYcgSPkitS0xUODUPTMDhXnJhGgo3mUvL9VyZE,8410
|
|
109
|
+
dkist_processing_cryonirsp-1.4.15.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
110
|
+
dkist_processing_cryonirsp-1.4.15.dist-info/top_level.txt,sha256=Sm9b1ddKnsF9Bh3mqDOct1Sm7k8I9aN7vGHgpmu-MlQ,51
|
|
111
|
+
dkist_processing_cryonirsp-1.4.15.dist-info/RECORD,,
|
{dkist_processing_cryonirsp-1.4.14.dist-info → dkist_processing_cryonirsp-1.4.15.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|