dkist-processing-common 12.2.0__py3-none-any.whl → 12.2.0rc2__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.
- changelog/272.feature.rst +1 -0
- dkist_processing_common/models/constants.py +8 -8
- dkist_processing_common/tasks/l1_output_data.py +4 -8
- dkist_processing_common/tasks/write_extra.py +5 -5
- dkist_processing_common/tests/test_construct_dataset_extras.py +2 -7
- dkist_processing_common/tests/test_trial_catalog.py +0 -2
- {dkist_processing_common-12.2.0.dist-info → dkist_processing_common-12.2.0rc2.dist-info}/METADATA +1 -1
- {dkist_processing_common-12.2.0.dist-info → dkist_processing_common-12.2.0rc2.dist-info}/RECORD +10 -9
- {dkist_processing_common-12.2.0.dist-info → dkist_processing_common-12.2.0rc2.dist-info}/WHEEL +0 -0
- {dkist_processing_common-12.2.0.dist-info → dkist_processing_common-12.2.0rc2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Add the framework for using Dataset Extras, that is, other data that can be included with the L1 FITS files generated by the regular pipeline. A new abstract class, WriteL1DatasetExtras, provides helper functionality for use in the instrument pipelines.
|
|
@@ -473,14 +473,14 @@ class ConstantsBase:
|
|
|
473
473
|
return self._db_dict[BudName.solar_gain_gos_polarizer_status]
|
|
474
474
|
|
|
475
475
|
@property
|
|
476
|
-
def dark_gos_polarizer_angle(self) ->
|
|
476
|
+
def dark_gos_polarizer_angle(self) -> float:
|
|
477
477
|
"""Return the gos polarizer angle constant for the dark task."""
|
|
478
|
-
return
|
|
478
|
+
return self._db_dict[BudName.dark_gos_polarizer_angle]
|
|
479
479
|
|
|
480
480
|
@property
|
|
481
|
-
def solar_gain_gos_polarizer_angle(self) ->
|
|
481
|
+
def solar_gain_gos_polarizer_angle(self) -> float:
|
|
482
482
|
"""Return the gos polarizer angle constant for the solar gain task."""
|
|
483
|
-
return
|
|
483
|
+
return self._db_dict[BudName.solar_gain_gos_polarizer_angle]
|
|
484
484
|
|
|
485
485
|
@property
|
|
486
486
|
def dark_gos_retarder_status(self) -> str:
|
|
@@ -493,14 +493,14 @@ class ConstantsBase:
|
|
|
493
493
|
return self._db_dict[BudName.solar_gain_gos_retarder_status]
|
|
494
494
|
|
|
495
495
|
@property
|
|
496
|
-
def dark_gos_retarder_angle(self) ->
|
|
496
|
+
def dark_gos_retarder_angle(self) -> float:
|
|
497
497
|
"""Return the gos retarder angle constant for the dark task."""
|
|
498
|
-
return
|
|
498
|
+
return self._db_dict[BudName.dark_gos_retarder_angle]
|
|
499
499
|
|
|
500
500
|
@property
|
|
501
|
-
def solar_gain_gos_retarder_angle(self) ->
|
|
501
|
+
def solar_gain_gos_retarder_angle(self) -> float:
|
|
502
502
|
"""Return the gos retarder angle constant for the solar gain task."""
|
|
503
|
-
return
|
|
503
|
+
return self._db_dict[BudName.solar_gain_gos_retarder_angle]
|
|
504
504
|
|
|
505
505
|
@property
|
|
506
506
|
def dark_gos_level0_status(self) -> str:
|
|
@@ -189,9 +189,7 @@ class SubmitDatasetMetadata(L1OutputDataBase):
|
|
|
189
189
|
class PublishCatalogAndQualityMessages(L1OutputDataBase, InterserviceBusMixin):
|
|
190
190
|
"""Task class for publishing Catalog and Quality Messages."""
|
|
191
191
|
|
|
192
|
-
def frame_messages(
|
|
193
|
-
self, paths: Iterable[Path], folder_modifier: str | None = None
|
|
194
|
-
) -> list[CatalogFrameMessage]:
|
|
192
|
+
def frame_messages(self, paths: Iterable[Path]) -> list[CatalogFrameMessage]:
|
|
195
193
|
"""
|
|
196
194
|
Create the frame messages.
|
|
197
195
|
|
|
@@ -199,8 +197,6 @@ class PublishCatalogAndQualityMessages(L1OutputDataBase, InterserviceBusMixin):
|
|
|
199
197
|
----------
|
|
200
198
|
paths
|
|
201
199
|
The input paths for which to publish frame messages
|
|
202
|
-
folder_modifier
|
|
203
|
-
A subdirectory to use if the files in paths are not in the base directory
|
|
204
200
|
|
|
205
201
|
Returns
|
|
206
202
|
-------
|
|
@@ -208,7 +204,7 @@ class PublishCatalogAndQualityMessages(L1OutputDataBase, InterserviceBusMixin):
|
|
|
208
204
|
"""
|
|
209
205
|
message_bodies = [
|
|
210
206
|
CatalogFrameMessageBody(
|
|
211
|
-
objectName=self.format_object_key(path=p
|
|
207
|
+
objectName=self.format_object_key(path=p),
|
|
212
208
|
conversationId=str(self.recipe_run_id),
|
|
213
209
|
bucket=self.destination_bucket,
|
|
214
210
|
)
|
|
@@ -237,7 +233,7 @@ class PublishCatalogAndQualityMessages(L1OutputDataBase, InterserviceBusMixin):
|
|
|
237
233
|
message_bodies = [
|
|
238
234
|
CatalogObjectMessageBody(
|
|
239
235
|
objectType=object_type,
|
|
240
|
-
objectName=self.format_object_key(
|
|
236
|
+
objectName=self.format_object_key(p),
|
|
241
237
|
bucket=self.destination_bucket,
|
|
242
238
|
conversationId=str(self.recipe_run_id),
|
|
243
239
|
groupId=self.constants.dataset_id,
|
|
@@ -260,7 +256,7 @@ class PublishCatalogAndQualityMessages(L1OutputDataBase, InterserviceBusMixin):
|
|
|
260
256
|
messages = []
|
|
261
257
|
messages += self.frame_messages(paths=frames)
|
|
262
258
|
frame_message_count = len(messages)
|
|
263
|
-
messages += self.frame_messages(paths=extras
|
|
259
|
+
messages += self.frame_messages(paths=extras)
|
|
264
260
|
extra_message_count = len(extras)
|
|
265
261
|
messages += self.object_messages(paths=movies, object_type="MOVIE")
|
|
266
262
|
object_message_count = len(movies)
|
|
@@ -27,7 +27,6 @@ class WriteL1DatasetExtras(WriteL1Base, ABC):
|
|
|
27
27
|
filename: str,
|
|
28
28
|
task_type: TaskName,
|
|
29
29
|
extra_name: DatasetExtraType,
|
|
30
|
-
end_time: str,
|
|
31
30
|
total_exposure: float | None = None,
|
|
32
31
|
readout_exposure: float | None = None,
|
|
33
32
|
) -> dict:
|
|
@@ -39,6 +38,7 @@ class WriteL1DatasetExtras(WriteL1Base, ABC):
|
|
|
39
38
|
self.constants.dark_observing_program_execution_ids
|
|
40
39
|
)
|
|
41
40
|
task_specific_date_begin = self.constants.dark_date_begin
|
|
41
|
+
task_specific_date_end = self.constants.dark_date_end
|
|
42
42
|
task_specific_raw_frames_per_fpa = (
|
|
43
43
|
0 # can be updated in construction of dataset extra if required
|
|
44
44
|
)
|
|
@@ -74,6 +74,7 @@ class WriteL1DatasetExtras(WriteL1Base, ABC):
|
|
|
74
74
|
)
|
|
75
75
|
|
|
76
76
|
task_specific_date_begin = self.constants.solar_gain_date_begin
|
|
77
|
+
task_specific_date_end = self.constants.solar_gain_date_end
|
|
77
78
|
task_specific_raw_frames_per_fpa = self.constants.solar_gain_num_raw_frames_per_fpa
|
|
78
79
|
task_specific_telescope_tracking_mode = (
|
|
79
80
|
self.constants.solar_gain_telescope_tracking_mode
|
|
@@ -109,6 +110,7 @@ class WriteL1DatasetExtras(WriteL1Base, ABC):
|
|
|
109
110
|
)
|
|
110
111
|
|
|
111
112
|
task_specific_date_begin = self.constants.polcal_date_begin
|
|
113
|
+
task_specific_date_end = self.constants.polcal_date_end
|
|
112
114
|
task_specific_raw_frames_per_fpa = self.constants.polcal_num_raw_frames_per_fpa
|
|
113
115
|
task_specific_telescope_tracking_mode = (
|
|
114
116
|
self.constants.polcal_telescope_tracking_mode
|
|
@@ -140,14 +142,14 @@ class WriteL1DatasetExtras(WriteL1Base, ABC):
|
|
|
140
142
|
raise ValueError(f"Unsupported task type {task_type}")
|
|
141
143
|
|
|
142
144
|
start_datetime = datetime.fromisoformat(task_specific_date_begin)
|
|
143
|
-
end_datetime = datetime.fromisoformat(
|
|
145
|
+
end_datetime = datetime.fromisoformat(task_specific_date_end)
|
|
144
146
|
|
|
145
147
|
dataset_extra_header = {
|
|
146
148
|
DatasetExtraHeaderSection.common: {
|
|
147
149
|
"BUNIT": "count",
|
|
148
150
|
"DATE": Time.now().fits,
|
|
149
151
|
"DATE-BEG": task_specific_date_begin,
|
|
150
|
-
"DATE-END":
|
|
152
|
+
"DATE-END": task_specific_date_end,
|
|
151
153
|
"TELAPSE": (end_datetime - start_datetime).total_seconds(),
|
|
152
154
|
"DATE-AVG": (start_datetime + (end_datetime - start_datetime) / 2).isoformat(),
|
|
153
155
|
"TIMESYS": "UTC",
|
|
@@ -263,7 +265,6 @@ class WriteL1DatasetExtras(WriteL1Base, ABC):
|
|
|
263
265
|
extra_name: DatasetExtraType,
|
|
264
266
|
total_exposure: float | None = None,
|
|
265
267
|
readout_exposure: float | None = None,
|
|
266
|
-
end_time: str | None = None,
|
|
267
268
|
) -> fits.Header:
|
|
268
269
|
"""Build FITS header for dataset extra file."""
|
|
269
270
|
header = fits.Header()
|
|
@@ -273,7 +274,6 @@ class WriteL1DatasetExtras(WriteL1Base, ABC):
|
|
|
273
274
|
total_exposure=total_exposure,
|
|
274
275
|
readout_exposure=readout_exposure,
|
|
275
276
|
extra_name=extra_name,
|
|
276
|
-
end_time=end_time,
|
|
277
277
|
)
|
|
278
278
|
for section in sections:
|
|
279
279
|
header.update(all_section_headers[section].items())
|
|
@@ -118,7 +118,6 @@ class ConstructDatasetExtrasTest(WriteL1DatasetExtras):
|
|
|
118
118
|
extra_name=(
|
|
119
119
|
DatasetExtraType.dark if task_type == "DARK" else DatasetExtraType.solar_gain
|
|
120
120
|
),
|
|
121
|
-
end_time="2025-01-01T00:00:00",
|
|
122
121
|
)
|
|
123
122
|
|
|
124
123
|
self.assemble_and_write_dataset_extra(data=data, header=header, filename=filename)
|
|
@@ -140,7 +139,6 @@ class ConstructDatasetExtrasTest(WriteL1DatasetExtras):
|
|
|
140
139
|
total_exposure=0.058,
|
|
141
140
|
readout_exposure=0.029,
|
|
142
141
|
extra_name=DatasetExtraType.demodulation_matrices,
|
|
143
|
-
end_time="2025-01-01T00:00:00",
|
|
144
142
|
)
|
|
145
143
|
self.assemble_and_write_dataset_extra(data=data, header=header, filename=filename)
|
|
146
144
|
|
|
@@ -217,8 +215,5 @@ def test_construct_dataset_extras(
|
|
|
217
215
|
assert header["OBSPR_ID"] == "OP1"
|
|
218
216
|
assert header["EXTOBSID"] == "OP2,OP3"
|
|
219
217
|
assert header["EXTNAME"] in ["DARK", "SOLAR GAIN", "DEMODULATION MATRICES"]
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
else:
|
|
223
|
-
assert header.get("POLANGLE") == "0.0"
|
|
224
|
-
assert header.get("RETANGLE") == "0.0"
|
|
218
|
+
assert header["TELAPSE"] == 3600
|
|
219
|
+
assert header["DATE-AVG"] == "2023-01-01T00:30:00"
|
|
@@ -7,8 +7,6 @@ from uuid import uuid4
|
|
|
7
7
|
import astropy.units as u
|
|
8
8
|
import pytest
|
|
9
9
|
from astropy.io import fits
|
|
10
|
-
from dkist_data_simulator.dataset_extras import DatasetExtraBase
|
|
11
|
-
from dkist_data_simulator.dataset_extras import InstrumentTables
|
|
12
10
|
from dkist_data_simulator.spec214.vbi import SimpleVBIDataset
|
|
13
11
|
from sqids import Sqids
|
|
14
12
|
|
{dkist_processing_common-12.2.0.dist-info → dkist_processing_common-12.2.0rc2.dist-info}/RECORD
RENAMED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
changelog/.gitempty,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
changelog/272.feature.rst,sha256=hqbgG7F741E8KO0k_l9WNFNNi4A5ZYpdABnr34yhbmk,254
|
|
2
3
|
dkist_processing_common/__init__.py,sha256=GQ9EBnYhkOnt-qODclAoLS_g5YVhurxfg1tjVtI9rDI,320
|
|
3
4
|
dkist_processing_common/config.py,sha256=f511KVpK24sQO4dDr4L6PMj5dz0jmWgnx2Y-3DpV0cw,5991
|
|
4
5
|
dkist_processing_common/manual.py,sha256=bIVVyLsbXMh-g_2L3kGROL-1TtJe0_XviHsp7Br31x8,7023
|
|
@@ -21,7 +22,7 @@ dkist_processing_common/codecs/str.py,sha256=Xqt5k8IhLc95KiiNiFwB1JWcVVc6T8AfcLr
|
|
|
21
22
|
dkist_processing_common/fonts/Lato-Regular.ttf,sha256=1jbkaDIx-THtoiLViOlE0IK_0726AvkovuRhwPGFslE,656568
|
|
22
23
|
dkist_processing_common/fonts/__init__.py,sha256=hBvZRtkoGRPlNDWCK-ZePXdSIlThCcjwBDfYaamVgAw,101
|
|
23
24
|
dkist_processing_common/models/__init__.py,sha256=6LMqemdzVZ87fRrpAsbEnTtWZ02_Gu_oajsUlwGRH_Q,74
|
|
24
|
-
dkist_processing_common/models/constants.py,sha256=
|
|
25
|
+
dkist_processing_common/models/constants.py,sha256=QHLDdMlYab6g5dEivBjkf7O3mW7aJZPSd1OC_EfuRDM,20490
|
|
25
26
|
dkist_processing_common/models/dkist_location.py,sha256=6Nk0wvv4R8ptlrV7BXon7abq4YLvmTdUmPsDN5G8nWc,971
|
|
26
27
|
dkist_processing_common/models/extras.py,sha256=RI4JWOinYl1rRyA4anNDj5nCSIrvwrix_dOod9bcyHA,1207
|
|
27
28
|
dkist_processing_common/models/fits_access.py,sha256=imKqL4-_g6gTR-IeIjZ6qkMhQX3JujdrKFrTd9gOXnw,5605
|
|
@@ -60,7 +61,7 @@ dkist_processing_common/parsers/wavelength.py,sha256=P5C9mG8DAKK3GB3vWNRBI5l7pAW
|
|
|
60
61
|
dkist_processing_common/tasks/__init__.py,sha256=l23ctjNsKJbHbbqaZBMeOPaOtw0hmITEljI_JJ-CVsU,627
|
|
61
62
|
dkist_processing_common/tasks/assemble_movie.py,sha256=1ixDG-f4ODt0vywqVccG3aodLljVO5OGlvuMO9EEvcU,12767
|
|
62
63
|
dkist_processing_common/tasks/base.py,sha256=itAHCvzcodo-q8_AjpWoRaM86BlcjWDpCIiUP7uwmP0,13236
|
|
63
|
-
dkist_processing_common/tasks/l1_output_data.py,sha256=
|
|
64
|
+
dkist_processing_common/tasks/l1_output_data.py,sha256=eTMAgkV65n7GQ5U9Q3FkdTI38BNteTWBRr2bkamgiDo,10745
|
|
64
65
|
dkist_processing_common/tasks/output_data_base.py,sha256=lJZ3olayA_nUWbxzozfbIbJFD3j2VpxPMt1CB9LB5IY,4763
|
|
65
66
|
dkist_processing_common/tasks/parse_l0_input_data.py,sha256=xcWmwSKwxEeManltCFrqVG224Vk-BYRE6g32VOK--rI,19241
|
|
66
67
|
dkist_processing_common/tasks/quality_metrics.py,sha256=cvGF6tJ8yAvxOvkeG3tWxYwL885BrFW5X3V7_MSzL-A,12481
|
|
@@ -68,7 +69,7 @@ dkist_processing_common/tasks/teardown.py,sha256=rwT9lWINVDF11-az_nx-Z5ykMTX_SJC
|
|
|
68
69
|
dkist_processing_common/tasks/transfer_input_data.py,sha256=4TJqlDjTc503QFvzSmMert99r9KHDwyd72r1kHAVhQA,5879
|
|
69
70
|
dkist_processing_common/tasks/trial_catalog.py,sha256=Yf-BKNCT_OHwJsxxZP8p2eRW04CcY0tw5_YIe1e9RQY,10535
|
|
70
71
|
dkist_processing_common/tasks/trial_output_data.py,sha256=pUdrNlAzuir4AUdfax5_MOplB-A9NrXErMJmAwtJmLA,6811
|
|
71
|
-
dkist_processing_common/tasks/write_extra.py,sha256=
|
|
72
|
+
dkist_processing_common/tasks/write_extra.py,sha256=YObiq0xMy5Z1QtpahAKjfELlZ_hcTLtiuD1WKZREeg0,16366
|
|
72
73
|
dkist_processing_common/tasks/write_l1.py,sha256=upsaFN3S0r4MasrzjZ6i0gNF_bvQLf_oyYoRogB7odc,21163
|
|
73
74
|
dkist_processing_common/tasks/write_l1_base.py,sha256=iqejlYb3CSagUyi6U56nmgItzrwcQxLIDwgruxZho3A,2474
|
|
74
75
|
dkist_processing_common/tasks/mixin/__init__.py,sha256=-g-DQbU7m1bclJYuFe3Yh757V-35GIDTbstardKQ7nU,68
|
|
@@ -87,7 +88,7 @@ dkist_processing_common/tests/test_assemble_quality.py,sha256=-F22jMY6mPy65VZ1TZ
|
|
|
87
88
|
dkist_processing_common/tests/test_base.py,sha256=gsyBG2R6Ufx7CzbHeGMagUwM9yCfpN4gCSZ6-aH2q48,6643
|
|
88
89
|
dkist_processing_common/tests/test_codecs.py,sha256=WpF15UYklpNRgETI4EwXsgbNzxMcHlelfpprBbupC0I,23907
|
|
89
90
|
dkist_processing_common/tests/test_constants.py,sha256=I_KcJs7ScCn53GYhEO6qjWrrnfZuyC1IVYOy87Pjlg4,6565
|
|
90
|
-
dkist_processing_common/tests/test_construct_dataset_extras.py,sha256=
|
|
91
|
+
dkist_processing_common/tests/test_construct_dataset_extras.py,sha256=LjFoLt1oChS298T8vmMK3xT0-5LSxRO3gUexxYSVY7w,9113
|
|
91
92
|
dkist_processing_common/tests/test_cs_step.py,sha256=RA0QD3D8eaL3YSOL_gIJ9wkngy14RQ2jbD-05KAziW4,2408
|
|
92
93
|
dkist_processing_common/tests/test_dkist_location.py,sha256=-_OoSw4SZDLFyIuOltHvM6PQjxm5hTiJQsiTGZ8Sadc,456
|
|
93
94
|
dkist_processing_common/tests/test_fits_access.py,sha256=a50B4IAAH5NH5zeudTqyy0b5uWKJwJuzQLUdK1LoOHM,12832
|
|
@@ -112,7 +113,7 @@ dkist_processing_common/tests/test_task_parsing.py,sha256=2_OOmeZQWD17XAd_ECYmod
|
|
|
112
113
|
dkist_processing_common/tests/test_teardown.py,sha256=DaliHSGsiQBZaFkf5wb3XBo6rHNPmx2bmQtVymYeBN4,5601
|
|
113
114
|
dkist_processing_common/tests/test_transfer_input_data.py,sha256=eyAAWXpTHQ8aew87-MncWpYBn4DAZrTSOL3LvlQfR5Q,12611
|
|
114
115
|
dkist_processing_common/tests/test_transfer_l1_output_data.py,sha256=OV2XMEkCbEuL9_i2S3P9Jfyf15tcBkAP3JNE8Jn_A9k,2137
|
|
115
|
-
dkist_processing_common/tests/test_trial_catalog.py,sha256=
|
|
116
|
+
dkist_processing_common/tests/test_trial_catalog.py,sha256=CxjtVABE5Fw2EvyXR56IJ3PPi9QvEOjccH0OzzRWk30,9424
|
|
116
117
|
dkist_processing_common/tests/test_trial_output_data.py,sha256=fu3iGNV_FI8LOacezyt4HvXnxY3g1_UiBuRI63yz5Oo,11977
|
|
117
118
|
dkist_processing_common/tests/test_workflow_task_base.py,sha256=LTVusltNrsGUOvw9G323am4CXebgE4tJhP6gZCcS0CQ,10457
|
|
118
119
|
dkist_processing_common/tests/test_write_l1.py,sha256=qraecD9Vv6jsqg00XOSlM1IdK9l8i36VoHLoLj8ypiU,27918
|
|
@@ -124,7 +125,7 @@ docs/landing_page.rst,sha256=aPAuXFhBx73lEZ59B6E6JXxkK0LlxzD0n-HXqHrfumQ,746
|
|
|
124
125
|
docs/make.bat,sha256=mBAhtURwhQ7yc95pqwJzlhqBSvRknr1aqZ5s8NKvdKs,4513
|
|
125
126
|
docs/requirements.txt,sha256=Kbl_X4c7RQZw035YTeNB63We6I7pvXFU4T0Uflp2yDY,29
|
|
126
127
|
licenses/LICENSE.rst,sha256=piZaQplkzOMmH1NXg6QIdo9wwo9pPCoHkvm2-DmH76E,1462
|
|
127
|
-
dkist_processing_common-12.2.
|
|
128
|
-
dkist_processing_common-12.2.
|
|
129
|
-
dkist_processing_common-12.2.
|
|
130
|
-
dkist_processing_common-12.2.
|
|
128
|
+
dkist_processing_common-12.2.0rc2.dist-info/METADATA,sha256=Bj4OJ6TE6R6cARWLXrG6HgARKHLFxUeqtYoEfczL5kU,14214
|
|
129
|
+
dkist_processing_common-12.2.0rc2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
130
|
+
dkist_processing_common-12.2.0rc2.dist-info/top_level.txt,sha256=LJhd1W-Vn90K8HnQDIE4r52YDpUjjMWDnllAWHBByW0,48
|
|
131
|
+
dkist_processing_common-12.2.0rc2.dist-info/RECORD,,
|
{dkist_processing_common-12.2.0.dist-info → dkist_processing_common-12.2.0rc2.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|