Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions iris/sg/_spectrograph.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,10 @@ def from_fits(
raise ValueError(f"{window=} not in {windows=}")

hdu_prototype = hdul_prototype[index_window]

if hdu_prototype.header["CDELT3"] == 0:
hdu_prototype.header["CDELT3"] = 1

wcs_prototype = astropy.wcs.WCS(hdu_prototype)

axes_wcs = list(reversed(wcs_prototype.axis_type_names))
Expand Down Expand Up @@ -293,6 +297,9 @@ def from_fits(
hdu = hdul[index_window]
hdu_aux = hdul[~1]

if hdu.header["CDELT3"] == 0:
hdu.header["CDELT3"] = 1

detector_type = hdul[0].header[f"TDET{index_window}"]

key_timedelta = "EXPTIMEF" if "FUV" in detector_type else "EXPTIMEN"
Expand Down
6 changes: 5 additions & 1 deletion iris/sg/_spectrograph_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
time_start=astropy.time.Time("2021-09-23T06:00"),
time_stop=astropy.time.Time("2021-09-23T07:00"),
nrt=True,
)
),
iris.sg.SpectrographObservation.from_time_range(
time_start=astropy.time.Time("2019-01-23T02:49:03"),
time_stop=astropy.time.Time("2019-01-23T02:50:03"),
),
],
)
class TestSpectrographObservation:
Expand Down