Skip to content

Commit

Permalink
BUG: Cubeviz to recognize VLT MUSE data
Browse files Browse the repository at this point in the history
  • Loading branch information
pllim committed Oct 11, 2023
1 parent 30685d0 commit 54e4d65
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 @@ -86,6 +86,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 54e4d65

Please sign in to comment.