The data array you get from pyfits
already is a NumPy array. You don't need to create one from it. Moerover, you can simply do the downsampling in a single step:
img_data_r = hdulist[0].data[::4, ::4]
This won't copy the data, but rather simply copy a new view with different strides. If you need the down-sampled image as a contiguous array, use numpy.ascontiguousarray()
.
This method of downsampling only keeps one in sixteen pixels, and completely drops the information in all the other pixels. If you need higher-quality downsampling, rather than doing it in your code, you are probably better off to downsample your FITS files using Imagemagick. This will also reduce the time it takes to read the files from disk.
To convert all your FITS files in the current directory in place (warning: big versions get overwritten), you could use
mogrify -resize 25% *.fits