In [30]:
%%bash
pip install aplpy
pip install https://github.com/ericmandel/pyds9/archive/master.zip
In [31]:
%%bash
curl -O https://astropy.stsci.edu/data/galactic_center/gc_bolocam_gps.fits
curl -O https://astropy.stsci.edu/data/galactic_center/gc_2mass_k.fits
In [32]:
%matplotlib inline
import pylab as pl
In [33]:
from astropy.io import fits
In [34]:
stellardata = fits.getdata('gc_2mass_k.fits')
In [35]:
pl.imshow(stellardata, cmap=pl.cm.gray, vmax=1000)
Out[35]:
In [36]:
dustdata = fits.getdata('gc_bolocam_gps.fits')
In [37]:
pl.contour(dustdata)
Out[37]:
In [38]:
# pl.hist(dustdata.flatten(), bins=50)
pl.hist(dustdata[np.isfinite(dustdata)], bins=50)
Out[38]:
In [39]:
pl.contour(dustdata, levels=np.linspace(0.2,10,10))
Out[39]:
An example of why overplotting directly doesn't work:
In [40]:
pl.figure(figsize=(12,12))
pl.imshow(stellardata, cmap=pl.cm.gray, vmax=1000)
pl.contour(dustdata, levels=np.linspace(0.2,10,10))
Out[40]:
In [41]:
import aplpy
In [42]:
F = aplpy.FITSFigure('gc_2mass_k.fits')
F.show_grayscale(vmax=1000)
F.show_contour('gc_bolocam_gps.fits', convention='calabretta')
In [43]:
import pyds9
In [47]:
DD = pyds9.DS9('mine')
In [48]:
DD.set('frame 1')
DD.set_pyfits(fits.open('gc_2mass_k.fits'))
Out[48]:
In [49]:
DD.set('frame lock wcs')
DD.set('frame 2')
DD.set_pyfits(fits.open('gc_bolocam_gps.fits'))
Out[49]:
In [50]:
DD.set('blink')
Out[50]:
Using the gc_2mass_k.fits image & aplpy, make a finder chart of the galactic center
In [ ]: