aplpy/aplpy — Issue #41: Overlaying contours on sliced image fails
Author: keflavich
Created: 2011-10-27 23:44:26+00:00
State: open

If you create an image with:

f3 = aplpy.FITSFigure('multidim_image.fits',dimensions=[0,1],slices=[0,0])

and try to overlay with

f3.show_contour('twodim_image.fits')

contouring fails with the error:

AttributeError: Attribute nx does not exist

because WCS only makes .nx / .ny if slices are specified. I think the solution is to set WCS.nx / ny whether or not _slices is set