cmhot.set_over('black') cmjet = mpl.cm.jet cmjet = mpl.cm.RdYlBu_r cmjet.set_bad('white') cmjet.set_under('white') cmjet.set_over('black') topbounds = [0.1,0.50,0.8,0.45] bottombounds = [0.1,0.05,0.8,0.464] # centerx, centery, radius, width, height pl.figure(1,figsize=(12,12)) pl.clf() dens1 = FITSFigure(parcubefile,convention='calabretta',slices=[0],figure=pl.figure(1),subplot=topbounds) dens1.show_colorscale(vmin=2,vmax=6,cmap=cmhot) dens1.recenter(**zoomargs) dens1.colorbar._colorbar_axes.set_ylabel('log$_{10}$(n(H$_2$) cm$^{-3}$)') dens1.hide_xaxis_label() dens1.hide_xtick_labels() velo1 = FITSFigure(parcubefile,convention='calabretta',slices=[4],figure=pl.figure(1),subplot=bottombounds) velo1.show_colorscale(vmin=52,vmax=66,cmap=cmjet) velo1.recenter(**zoomargs) velo1.colorbar._colorbar_axes.set_ylabel('Velocity ($V_{LSR}$ km s$^{-1}$)') savefig('W51_H2CO_2parfittry11_v1_densityvelocity%s.png' % extrastr,bbox_inches='tight') dens1.remove_colorbar() dens1.hide_colorscale() col1 = FITSFigure(parcubefile,convention='calabretta',slices=[1],figure=pl.figure(1),subplot=topbounds) col1.show_colorscale(vmin=11,vmax=13.5,cmap=cmhot) col1.recenter(**zoomargs)
msxpixsize_deg2 = np.product(wcs.utils.proj_plane_pixel_scales(msxwcs))*u.deg**2 msxpixsize = (msxpixsize_deg2*distance**2).to(u.pc**2, u.dimensionless_angles()) msxfreq = (24*u.um).to(u.THz, u.spectral()) L_msx = ((msxhdu.data*u.MJy/u.sr) * msxpixsize_deg2 * (4*np.pi*distance**2) * msxfreq).to(u.erg/u.s) sfrmsx = np.log10(L_msx.to(u.erg/u.s).value) - logC24 # Kennicutt & Evans 2012 sfrsdmsx = sfrmsx - np.log10(msxpixsize.to(u.kpc**2).value) msxhdu.data = sfrsdmsx fig9 = pl.figure(9) fig9.clf() gray = copy.copy(pl.cm.gray_r) gray.set_bad('white') gray.set_under('white') FMM = FITSFigure(msxhdu, figure=fig9, cmap=gray) FMM.show_colorscale(cmap=gray, vmin=-0.5, vmax=2.5, stretch='linear') FMM.show_contour(sfmasshdu1e4, levels=[100,300,500,1000], zorder=1000, smooth=1) FMM.colorbar._colorbar.set_label("SFR Surface Density\n[log $M_{\odot}$ yr$^{-1}$ kpc$^{-2}$]", rotation=270, labelpad=50) #FMM.show_markers(cl1coords.l, cl1coords.b, marker='x', edgecolor='r', zorder=1100) FMM.save(paths.fpath('SFRmap24um_SFMassDensityContours_1e4.pdf')) fig10 = pl.figure(10) fig10.clf() sfr2hdu = fits.PrimaryHDU(data=np.log10(sfr2cmd.value), header=hdr2cm) FMM = FITSFigure(sfr2hdu, figure=fig10, cmap=gray) FMM.show_contour(sfmasshdu1e4, levels=[100,300,500,1000,2000], zorder=1000, smooth=1) FMM.show_colorscale(cmap=gray, vmin=-0.5, vmax=2.5, stretch='linear') FMM.colorbar._colorbar.set_label("SFR Surface Density\n[log $M_{\odot}$ yr$^{-1}$ kpc$^{-2}$]", rotation=270, labelpad=50) FMM.save(paths.fpath('SFRmap2cm_SFMassDensityContours.pdf'))