Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cube.wave object does not work anymore #39

Open
Knusper opened this issue Jul 22, 2024 · 0 comments
Open

Cube.wave object does not work anymore #39

Knusper opened this issue Jul 22, 2024 · 0 comments

Comments

@Knusper
Copy link

Knusper commented Jul 22, 2024

When trying to get the wavelength for a particular index in a Cube object, I would usually do:
cbe.wave[i], where [i] is the index of the layer and cbe is the Cube object.

For some reasons this fails now for a standard muse cube (created with CubeList.combine):

Here follows the error:

----> 1 cbe.wave[1]

File ~/miniconda3/envs/astropy_6/lib/python3.12/site-packages/mpdaf/obj/coords.py:1833, in WaveCoord.__getitem__(self, item)
   1831         else:
   1832             lbda = self.coord(pixel=self.shape + item)
-> 1833     return WaveCoord(crpix=1.0, cdelt=0, crval=lbda,
   1834                      cunit=self.unit, shape=1,
   1835                      ctype=self.wcs.wcs.ctype[0])
   1836 elif isinstance(item, slice):
   1837     if item.start is None:

File ~/miniconda3/envs/astropy_6/lib/python3.12/site-packages/mpdaf/obj/coords.py:1695, in WaveCoord.__init__(self, hdr, crpix, cdelt, crval, cunit, ctype, shape)
   1693 self.wcs.wcs.ctype[0] = ctype
   1694 self.wcs.wcs.crval[0] = crval
-> 1695 self.wcs.wcs.set()

SingularMatrixError: ERROR 3 in wcsset() at line 2868 of file cextern/wcslib/C/wcs.c:
Linear transformation matrix is singular.
ERROR 3 in linset() at line 702 of file cextern/wcslib/C/lin.c:
PCi_ja matrix is singular.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant