Beispiel #1
0
    def make_mask(self, mask=None):

        if mask is None:
            rad_mask = RadioMask(self.cube)
            mask = rad_mask.to_mask()

        self.cube = self.cube.with_mask(mask)

        return self
Beispiel #2
0
old_noise_cube = Noise(old_cube)

old_noise = old_noise_cube.scale

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)