ipython -pylab # APLpy is written by the applied physics lab at JHU (aplpy.github.com) # it provides WCS support for matplotlib through the pywcs library # To get it to work you need to install the right versions of # various libraries (numpy, matplotlib, pyfits and pywcs), but it is possible! # Details are given on the aplpy install page. # APLpy is a much more powerful package than this simple demo shows, but # the essentials are here import aplpy import numpy gc = aplpy.FITSFigure('shrunk.fits') gc.show_grayscale(invert=True) gc.show_grid() gc.set_grid_color('k') gc.set_grid_alpha(0.5) gc.show_rectangles([242.5],[54.5],1.05,1.05,edgecolor='r',lw=2) # lockman # HerMES in red gc.show_rectangles([163.18],[57.48],0.63,0.63,edgecolor='r',layer='rectangles_1',lw=2) gc.show_rectangles([161.5],[59.0167],0.52,0.52,edgecolor='r',layer='rectangles_2',lw=2) # chandra field in cyan gc.show_rectangles([161.5],[59.0167],0.67,0.67,edgecolor='c',layer='rectangles_3',lw=2) gc.save('test.png',dpi=72)