'Nhires': {
     'bottomleft':
     coordinates.SkyCoord("17:47:20.072",
                          "-28:22:22.0",
                          unit=(u.h, u.deg),
                          frame='icrs'),
     'topright':
     coordinates.SkyCoord("17:47:19.706",
                          "-28:22:15.6",
                          unit=(u.h, u.deg),
                          frame='icrs'),
     'inregion':
     'fullN',
     'fitsfile':
     paths.lbpath(
         'sgr_b2m.N.B6.allspw.continuum.r0.5.clean1000.image.tt0.pbcor.fits'
     ),
     'bbox': [-0.15, 0.95],
     'loc':
     2,
     'l1':
     1,
     'l2':
     4,
     'min':
     -1,  # mJy
     'max':
     25,
     'width':
     2.5,
     'height':
Exemple #2
0
                                           frame='fk5')
        diskycoorddict[source] = diskycoords

    diskycoorddict['e2'] = diskycoorddict['e2e']


    for name, cutoutname, source, vrange in (
        ('lacy', 'northwest', lacy, (50,75)),
        ('north', 'north', north, (45,75)),
        ('e8', 'e8', e8, (45,75)),
        ('e2', 'e2', e2e, (45,70)),
       ):

        diskycoords = diskycoorddict[name]

        for fn in glob.glob(paths.lbpath("W51{0}cax*ALL_medsub_cutout.fits".format(cutoutname))):

            print(fn)
            try:
                cube = SpectralCube.read(fn).with_spectral_unit(u.GHz)
            except TypeError as ex:
                print(ex)
                continue

            extraction_path = pvextractor.Path(diskycoords, 0.05*u.arcsec)

            for line, restfreq, velocity_res, spw in line_to_image_list:

                basename = line

                frq = float(restfreq.strip('GHz')) * u.GHz
Exemple #3
0
                              vmax_b=1.5,
                              vmax_r=1.5,
                              vmin_g=0.0001,
                              embed_avm_tags=True)

fig1.clf()
F = aplpy.FITSFigure(lacy_rgb_cube_png, figure=fig1)
F.recenter(lacy.ra.deg, lacy.dec.deg, radius=0.001)
F.show_rgb(lacy_rgb_cube_png)
F.add_scalebar((5000*u.au / (5400*u.pc)).to(u.deg,u.dimensionless_angles()))
F.scalebar.set_label('5000 au / 0.025 pc')
F.scalebar.set_color('w')
F.save(paths.fpath("outflows/rgb_SO_continuum_outflows_aplpy_wideLacy.png"))
F.recenter(lacy.ra.deg, lacy.dec.deg, radius=0.0005)
F.save(paths.fpath("outflows/rgb_SO_continuum_outflows_aplpy_zoomLacy.png"))
F.show_contour(paths.lbpath('W51ncax.cont.image.pbcor.fits'), levels=[0.001,
                                                                      0.0020,
                                                                      0.004,
                                                                      0.008,
                                                                      0.012],
               colors=['w']*6, layer='alma_cont_cycle3hires')
F.recenter(lacy.ra.deg, lacy.dec.deg, radius=0.0005)
F.save(paths.fpath("outflows/rgb_SO_continuum_outflows_aplpy_zoomLacy_cycle3hires.png"))
F.save(paths.fpath("outflows/rgb_SO_continuum_outflows_aplpy_zoomLacy_cycle3hires.pdf"))





red_fits_cutout_lacy_fn = paths.dpath('12m/moments/LacyJet_12CO2m1_red70_95.fits')
blue_fits_cutout_lacy_fn = paths.dpath('12m/moments/LacyJet_12CO2m1_blue30_50.fits')
                  'radius': 0.10*u.arcsec,
                  'filename': 'W51n_cont_uniform.image.tt0.pbcor.fits'},
           'e2e': {'center': coordinates.SkyCoord('19:23:43.969', '14:30:34.525', unit=(u.hour, u.deg), frame='fk5'),
                   'radius': 0.25*u.arcsec,
                   'filename': 'W51e2_cont_uniform.image.tt0.pbcor.fits'},
           'e8': {'center': coordinates.SkyCoord('19:23:43.906', '14:30:28.269', unit=(u.hour, u.deg), frame='fk5'),
                  'radius': 0.16*u.arcsec,
                  'filename': 'W51e2_cont_uniform.image.tt0.pbcor.fits'},
          }
for key in objects:
    obj = objects[key]
    objects[key]['aperture'] = regions.CircleSkyRegion(center=obj['center'],
                                                       radius=obj['radius'])

for objname in objects:
    obj = objects[objname]
    fh = fits.open(paths.lbpath(obj['filename']))[0]
    datawcs = wcs.WCS(fh.header)
    data = fh.data
    beam = radio_beam.Beam.from_fits_header(fh.header)
    pixreg = obj['aperture'].to_pixel(datawcs)
    mask = pixreg.to_mask()
    cutout = mask.cutout(data) * mask.data

    pkflux = cutout.max() * u.Unit(fh.header['BUNIT'])
    #pkbright = pkflux.to(u.K, beam.jtok_equiv(fh.header['CRVAL3']*u.Unit(fh.header['CUNIT3'])))
    pkbright = pkflux.to(u.K, beam.jtok_equiv(225*u.GHz))

    print("%{2:10s} Peak flux: {0:8.2f}  Peak brightness: {1:8.1f} Beam major: {3:0.3f}"
          .format(pkflux.to(u.mJy/u.beam), pkbright, objname, beam.major.to(u.arcsec)))