Ejemplo n.º 1
0
# Get the radius array so we can cut to where the CO data is valid
radii = gal.radius(header=hi_cube[0].header)
max_radius = 6.0 * u.kpc

all_dists = []
all_radii = []
all_vals_hi = []
all_vals_co = []
edge_masks = []
skeletons = []

hi_beam = average_beams(hi_cube.beams)

# Estimate the noise level in an equivalent slab
hi_mom0 = hi_cube.spectral_slab(-180 * u.km / u.s, -183 * u.km / u.s).moment0()
sigma = sig_clip(hi_mom0.value, nsig=10) * \
    hi_beam.jtok(hi_freq).value

for i, (end, start) in enumerate(ProgressBar(zip(vels[1:], vels[:-1]))):

    hi_slab = hi_cube.spectral_slab(start, end)
    hi_mom0 = hi_slab.moment0() * hi_beam.jtok(hi_freq) / u.Jy

    # Make the CO slab, then reproject onto the HI grid
    co_mom0 = co_cube.spectral_slab(start, end).moment0()
    co_mom0_reproj = reproject_interp(co_mom0.hdu, hi_mom0.header)[0]
    co_mom0 = Projection(co_mom0_reproj, wcs=hi_mom0.wcs)

    # Need a mask from the HI
    # Adjust the sigma in a single channel to the moment0 in the slab
    # sigma = 0.00152659 * hi_slab.shape[0] * \
Ejemplo n.º 2
0
"""
Create the bubble catalogue of M33 with the 14B-088 map
"""

data_path = "/media/eric/MyRAID/M33/14B-088/HI/full_imaging/"
# data_path = "/lustre/home/ekoch/m33/"

# Prefix for save files
name = "M33_14B-088"

cube = SpectralCube.read(os.path.join(data_path, "M33_14B-088_HI.clean.image.pbcov_gt_0.3_masked.fits"))

lwidth = fits.getdata(os.path.join(data_path, "M33_14B-088_HI.clean.image.pbcov_gt_0.3_masked.rotsub.lwidth.fits"))

sigma = sig_clip(cube[-1].value, nsig=10)

# Create a cruddy linewidth map. This will need to be improved, but that can
# be done with just the saved bubble objects
# lwidth = cube.with_mask(cube > 2 * sigma * u.Jy).linewidth_sigma()
lwidth = lwidth * u.m / u.s

galaxy_props = {
    "center_coord": SkyCoord(23.461667, 30.660194, unit=(u.deg, u.deg), frame="fk5"),
    "inclination": 56.0 * u.deg,
    "position_angle": 201.0 * u.deg,
    "scale_height": 100.0 * u.pc,
}


scales = 3.0 * np.arange(1, 15, np.sqrt(2))
Ejemplo n.º 3
0
# data_path = "/Users/eric/Data/"
# data_path = "/media/eric/Data_3/VLA/THINGS/HO_II/"

# cube = SpectralCube.read(os.path.join(data_path, "IC1613_NA_ICL001.fits"))
cube = SpectralCube.read(os.path.join(data_path, "IC10_NA_ICL001.fits"))
# cube = SpectralCube.read(os.path.join(data_path, "M33_14B-088_HI.clean.image.pbcov_gt_0.3_masked.fits"))
# cube = SpectralCube.read(os.path.join(data_path, "HO_II_NA_CUBE_THINGS.FITS"))

# Remove empty channels
# cube = cube[:, 500:1500, 500:1500]
# cube = cube[:, 500:1500, 500:1500]

scales = 3. * np.arange(1, 15, np.sqrt(2))

# Find sigma in an empty channel
# sigma = sig_clip(cube[-1].value, nsig=10)
# bubble_15 = BubbleFinder2D(cube[200], channel=15, sigma=sigma, auto_cut=True,
#                            scales=scales)
sigma = sig_clip(cube[0].value, nsig=10)
bubble_15 = BubbleFinder2D(cube[53], channel=15, sigma=sigma, auto_cut=True)
bubble_15.multiscale_bubblefind(overlap_frac=0.5,
                                edge_find=True,
                                nsig=1.5,
                                verbose=False,
                                min_in_mask=0.75)

bubble_15.visualize_regions(show=True,
                            edges=True,
                            region_col='b',
                            edge_col='g')