diff --git a/CHANGELOG.md b/CHANGELOG.md index ca6101a..eb18198 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -78,3 +78,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Bump `actions/setup-python` from 6 to 7 ([#367](https://github.com/PhangsTeam/phangs_imaging_scripts/pull/367)) - Bump `tarides/changelog-check-action` from 3 to 4 ([#368](https://github.com/PhangsTeam/phangs_imaging_scripts/pull/368)) - Bump convolve-uv from >=0.2.0 to >=0.5.0 (#408) +- Bump `spectral-cube` from 0.6.7 to 0.7.0 ([#412](https://github.com/PhangsTeam/phangs_imaging_scripts/pull/412)) diff --git a/phangsPipeline/scCubeRoutines.py b/phangsPipeline/scCubeRoutines.py index f95ad35..fb34fc8 100644 --- a/phangsPipeline/scCubeRoutines.py +++ b/phangsPipeline/scCubeRoutines.py @@ -602,17 +602,6 @@ def convolve_cube( for chan in range(n_chan): chan_slice = cube[chan] - # FIXME: This has been raised in https://github.com/radio-astro-tools/spectral-cube/issues/1016 - # and should be removed once fixed (for the spectral-cube convolution) - # Also make sure we're converting things correctly if we're in Jy/beam-like units, but only - # for spectral-cube routines - if chan_slice.unit.is_equivalent(u.Jy / u.beam) and convolve_fn not in [ - "convolve_uv" - ]: - beam_ratio_factor = (target_beam.sr / chan_slice.beam.sr).value - else: - beam_ratio_factor = 1.0 - # Do the actual convolution if convolve_fn == "convolve_uv": chan_slice = convolve_uv( @@ -632,8 +621,7 @@ def convolve_cube( chan_conv = chan_slice.unitless_filled_data[:] # Put this into the data and write out - chan_vals = chan_conv * beam_ratio_factor - hdu[0].data[chan] = chan_vals.astype(dtype) + hdu[0].data[chan] = chan_conv.astype(dtype) hdu.flush() bar.update() diff --git a/pyproject.toml b/pyproject.toml index f94b89b..979b468 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ dependencies = [ "radio-beam >= 0.3.9", "reproject >= 0.21.0", "scipy >= 1.16.3", - "spectral-cube == 0.6.7", + "spectral-cube >= 0.7.0", "uvcombine >= 1.0.0", ]