# Plotting The Kepler Field Full View

I have downloaded the calibrated ffi(full field image) for the Kepler field, aside from the primary HDU which contains the metadata, they contain 84 channels, each in the form of an image HDU, representing a small part of the field - I want to plot the full field in astropy, how would I go about it?

The Kepler ffi file can be found in the link below

https://archive.stsci.edu/missions/kepler/ffi/kplr2013098115308_ffi-cal.fits

## 1 Answer

Yes! I can do it for K2 and I'm guessing it should be similar.

You can see with fits.info(fits_file) that it has the 84 extensions (21 modules * 4 channels per module) you mention.

Then you can select a channel, e.g. 65, and prepare also the wcs coordinates so you get the RA and dec associated with the image for the axis.

n = 65

with fits.open(fits_file, mode = "readonly") as hdulist:
wcs_info = WCS(hdulist[n].header)
cal_image = hdulist[n].data
header = hdulist[n].header


Then you can just plot:

plt.figure(figsize = (15,15))

fig = plt.figure(figsize=(12, 8))
ax = fig.add_subplot(1, 1, 1, projection=wcs_info)
im = ax.imshow(cal_image, vmin = np.percentile(cal_image,1),vmax = np.percentile(cal_image, 98), origin='lower')

ax.coords[0].set_ticklabel_position('l')
ax.coords[0].grid(color='white', ls='dotted')
ax.set_ylabel('Dec')
ax.coords[1].set_ticklabel_position('b')
ax.coords[1].grid(color='white', ls='dotted')
ax.set_xlabel('RA');