Open jeffjennings opened 1 month ago
Just to verify - changing roundtrip_coords=False
did not fix the problem?
That's right, I still get the same error when using roundtrip_coords=False
.
This is (I suspect) the same as problem as in #874 : SpectralCoord
is reverting back to frequencies whenever RESTFRQ
is defined in the header.
We could hack in something in spectral-cube that avoids the transformation back to freq; or an option upstream in astropy that avoids this by default
Yes you're right; I tried the workaround in #874 - it worked and the reprojection looks correct. Thank you!
For the moment I'm just adding the workaround in the tutorial to get the notebook to build. But I can leave this issue open if you'd like and revert the workaround in the tutorial once there's a fix here or upstream.
Hi @adamginsburg and @e-koch, I'm hoping for help with fixing the cube reprojection tutorial on learn.astropy.org. The Build tutorials workflow in astropy-tutorials has been failing at least since last year, and the cube reprojection tutorial notebook now errors when executing, presumably due to using a newer version of
spectral-cube
than when the notebook was written. The error occurs in the second cell of Step 6 in the notebook atcube2vel_reproj = cube2vel_spatialspectralsmooth.reproject(cube1vel.header)
with traceback
The input cube,
cube2vel_spatialspectralsmooth
, is not allnan
before the projection. I tried addingroundtrip_coords=False
to the call as suggested, and checked the header used in the call withwcs.WCS(cube1vel.header)
which returns
Also for reference,
wcs.WCS(cube2vel_spatialspectralsmooth.header)
returns
and
cube2vel_spatialspectralsmooth
is
Any advice or fixes you have would be helpful, thanks!