You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ValueErrorTraceback (mostrecentcalllast)
/scratch/local/60838376/ipykernel_89087/2137793806.pyin<module>---->1reproj_cube17=interp_cube17.reproject(cube_29.header)
/blue/adamginsburg/adamginsburg/repos/spectral-cube/spectral_cube/utils.pyinwrapper(self, *args, **kwargs)
47PossiblySlowWarning48 )
--->49returnfunction(self, *args, **kwargs)
50returnwrapper51/blue/adamginsburg/adamginsburg/repos/spectral-cube/spectral_cube/spectral_cube.pyinreproject(self, header, order, use_memmap, filled, **kwargs)
2703**reproj_kwargs)
2704ifnp.all(np.isnan(newcube)):
->2705raiseValueError("All values in reprojected cube are nan. This can be caused"2706" by an error in which coordinates do not 'round-trip'. Try "2707"setting ``roundtrip_coords=False``. You might also check "ValueError: Allvaluesinreprojectedcubearenan. Thiscanbecausedbyanerrorinwhichcoordinatesdonot'round-trip'. Trysetting``roundtrip_coords=False``. YoumightalsocheckwhethertheWCStransformationproducesvalidpixel->worldandworld->pixelcoordinatesineachaxis.
The issue seems to be that reproject is trying to take the frequency space of the cubes into account when reprojecting, making the reprojected cube be full of NaNs.
A temporary fix is to make a copy of the target header and set its rest frequency to that of the cube you are trying to reproject.
I am attempting to spatially reproject one cube to another.
I am getting the following error:
The issue seems to be that reproject is trying to take the frequency space of the cubes into account when reprojecting, making the reprojected cube be full of NaNs.
A temporary fix is to make a copy of the target header and set its rest frequency to that of the cube you are trying to reproject.
The text was updated successfully, but these errors were encountered: