Skip to content

Commit

Permalink
Merge pull request spacetelescope#2504 from pllim/vlt-musing
Browse files Browse the repository at this point in the history
BUG: Cubeviz to recognize VLT MUSE data
  • Loading branch information
pllim authored Oct 12, 2023
2 parents 2f24a20 + 54e4d65 commit 2937038
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ Cubeviz

- Fixed moment map losing WCS when being written out to FITS file. [#2431]

- Fixed parsing for VLT MUSE data cube so spectral axis unit is correctly converted. [#2504]

Imviz
^^^^^

Expand Down
4 changes: 2 additions & 2 deletions jdaviz/configs/cubeviz/plugins/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def _return_spectrum_with_correct_units(flux, wcs, metadata, data_type, target_w

if target_wave_unit is None and hdulist is not None:
found_target = False
for ext in ('SCI', 'FLUX', 'PRIMARY'): # In priority order
for ext in ('SCI', 'FLUX', 'PRIMARY', 'DATA'): # In priority order
if found_target:
break
if ext not in hdulist:
Expand All @@ -153,7 +153,7 @@ def _return_spectrum_with_correct_units(flux, wcs, metadata, data_type, target_w
for cunit_num in (3, 1):
cunit_key = f"CUNIT{cunit_num}"
ctype_key = f"CTYPE{cunit_num}"
if cunit_key in hdr and 'WAVE' in hdr[ctype_key]:
if cunit_key in hdr and 'WAV' in hdr[ctype_key]:
target_wave_unit = u.Unit(hdr[cunit_key])
found_target = True
break
Expand Down

0 comments on commit 2937038

Please sign in to comment.