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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
14 changes: 1 addition & 13 deletions phangsPipeline/scCubeRoutines.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]

Expand Down
Loading