dtype='float', name='{0} F_total(slab)'.format(stat)))

    pkfrac = cube13ss.with_mask(cubemask).spectral_slab(vrange1[0], vrange2[1])[slices].sum().value / total_co_slab_reg.value
    tbl.meta['Peak Fraction'] = pkfrac

    tables[region] = tbl


if __name__ == "__main__":
    from aplpy_figure_maker import FITSFigure
    import aplpy
    import pylab as pl
    fig = pl.figure(1, figsize=(12,12))
    fig.clf()
    F1 = FITSFigure(cube13ss_slab3_masked_mom0.hdu, subplot=[0.05,0.5,0.4,0.4], figure=fig)
    F1.show_grayscale()
    F1._ax1.set_title("$^{13}$CO masked with H$_2$CO")
    F2 = FITSFigure(cube13_slab3_masked_mom0.hdu, subplot=[0.50,0.5,0.4,0.4], figure=fig)
    F2.show_grayscale()
    F2._ax1.set_title("$^{13}$CO masked by S/N")
    F3 = FITSFigure(high5e4dens_co_slab3_mom0.hdu, subplot=[0.05,0.05,0.4,0.4], figure=fig)
    F3.show_grayscale()
    F3._ax1.set_title("$^{13}$CO masked by $n>5\\times10^4$")
    F4 = FITSFigure(high1e4dens_co_slab3_mom0.hdu, subplot=[0.50,0.05,0.4,0.4], figure=fig)
    F4.show_grayscale()
    F4._ax1.set_title("$^{13}$CO masked by $n>1\\times10^4$")
    F13 = FITSFigure(high1e5dens_co_slab3_mom0.hdu, subplot=[0.05,0.05,0.4,0.4], figure=fig)
    F13.show_grayscale()

    pl.matplotlib.rc_file('pubfiguresrc')