gwcs_slice

specutils.utils.wcs_utils.gwcs_slice(self, item)[source]

This is a bit of a hack in order to fix the slicing of the WCS in the spectral dispersion direction. The NDData slices properly but the spectral dispersion result was not.

There is code slightly downstream that sets the number of entries in the dispersion axis, this is just needed to shift to the correct starting element.

When WCS gets the ability to do slicing then we might be able to remove this code.