コード例 #1
0
old_cube = old_cube.with_mask(old_cube > old_noise*u.Jy)

# Load in the broad clean mask used
clean_mask = fits.getdata("../../../Arecibo/M33_newmask.fits")

# Need to match the dims
clean_mask = clean_mask.squeeze()
clean_mask = clean_mask[11:195, ::-1, ::-1]
clean_mask = clean_mask[:, 595:3504, 1065:3033]

mask = RadioMask(cube)
mask.intersection(clean_mask)
# mask.remove_small_regions()
mask.open(iterations=3)
mask.close(iterations=3)
mask.dilate(iterations=6)

cube = cube.with_mask(mask.mask)

mom0 = cube.moment0()

 old_arecibo_mask = fits.getdata("../old_imaging/M33_arecibo_mask_old_AT0206.fits")
 old_arecibo_mask = old_arecibo_mask.squeeze()

old_mask = RadioMask(old_cube)
old_mask.intersection(old_arecibo_mask)
# old_mask.remove_small_regions()
old_mask.open(iterations=3)
old_mask.close(iterations=3)
old_mask.dilate(iterations=6)