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

Quicklook: Do something (not something smart) if there are unmatched celestial axes #140

Merged

Conversation

keflavich
Copy link
Contributor

Plotting a PV diagram resulted in this traceback:

>>> sl.quicklook()
Traceback (most recent call last):
  File "<ipython-input-10-9f97ea5fa0be>", line 1, in <module>
    sl.quicklook()
  File "/Users/adam/repos/spectral-cube/spectral_cube/spectral_cube.py", line 152, in quicklook
    self.FITSFigure = aplpy.FITSFigure(self.hdu)
  File "/Users/adam/repos/spectral-cube/spectral_cube/spectral_cube.py", line 120, in hdu
    hdu = fits.PrimaryHDU(self.value, header=self.wcs.to_header())
  File "/Users/adam/repos/astropy/astropy/wcs/wcs.py", line 2379, in to_header
    header_string = self.wcs.to_header(relax)
InconsistentAxisTypesError: ERROR 4 in wcs_types() at line 2136 of file cextern/wcslib/C/wcs.c:
Unmatched celestial axes.

so instead let's use imshow for now.

This is an outstanding bug, though - there needs to be a sensible way to plot a celestial axis. In this particular case, we need smarter slicing: the axis needs to be marked as a celestial axis that doesn't need a partner. In the more general case, we just need the pixel scale and should revert to the OFFSET WCS type used in pvextractor.

@keflavich
Copy link
Contributor Author

This is harmless and helpful if we want a quick viewer; merging.

keflavich added a commit that referenced this pull request Oct 8, 2014
Quicklook: Do something (not something smart) if there are unmatched celestial axes
@keflavich keflavich merged commit ab5b4ce into radio-astro-tools:master Oct 8, 2014
@keflavich keflavich deleted the quicklook_unmatchedaxes branch October 8, 2014 13:54
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

Successfully merging this pull request may close these issues.

None yet

1 participant