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
As per title, it looks like that the dimensions of the WCS of Spectrum1D objects are not parsed correctly into the NDCube data class, as shown by the following snippet:
Actually this behavior is correct, the spectral_axis which is wl is of dimension 1, in order to create the wcs instance the Spectrum1D class uses the function gwcs_from_array from utils/wcs_utils.py which is hard coded to create a 1D coordinate frame.
defgwcs_from_array(array):
""" Create a new WCS from provided tabular data. This defaults to being a GWCS object. """orig_array=u.Quantity(array)
coord_frame=cf.CoordinateFrame(naxes=1,
axes_type=('SPECTRAL',),
axes_order=(0,))
I think there might be an option of getting the desired behavior by defining the flux as a NDCube instance in which case you also need to define the wcs by yourself.
Taking into consideration that this issue originated from the discussion regarding #1106 and that we are talking about Spectrum1D (emphasis on 1D) we should move forward with merging #1106 because the changes required to make the "NDCube.plot" method working are a lot more complex.
As per title, it looks like that the dimensions of the WCS of Spectrum1D objects are not parsed correctly into the NDCube data class, as shown by the following snippet:
which returns
while it should be 3.
The text was updated successfully, but these errors were encountered: