[AstroPy] Convolving FITS images
rplume at ucalgary.ca
Mon Oct 20 06:26:47 EDT 2014
Hi Adam et al.
When I use the following command sequence to convolve my data:
from astropy.io import fits
data = fits.getdata('filename.fits')
header = fits.getheader('filename.fits')
from astropy.convolution import convolve,Gaussian2DKernel
fwhm = 5
smoothed = convolve(data, Gaussian2DKernel(stddev=fwhm/2.35))
I get the following error messages:
# Check that the number of dimensions is compatible
144 if array_internal.ndim != kernel_internal.ndim:
--> 145 raise Exception('array and kernel have differing number of '
Exception: array and kernel have differing number of dimensions.
When I use the next two commands, however, I get:
# Alternatively, display and smooth simultaneously:
fig = aplpy.FITSFigure('filename.fits')
# but this is less flexible
TypeError: x_size should be an integer
But when I put in an actual integer (say 3), these two steps work just fine.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the AstroPy