os.system("mv "+dir_data+"data/"+galname+"*32*smooth "\ +dir_data+galname+"/"+galname+"_co32_"+suffix+".cube") ### step 6/10: create CO(2-1) cube mask print("### step 6/10: create CO(2-1) cube mask") cube_co32 = glob.glob(dir_data+galname+"/"\ +galname+"*_co32_"+suffix+".cube")[0] thres_co32 = rms_co32 * increment_mask * thres_masking outmask_co32=cube_co32.replace(".cube",".mask") myim2.createmask(cube_co32,thres_co32,outmask_co32) beamarea = myim2.beam_area(image_co32,increment_mask) myim2.remove_smallmask(outmask_co32,beamarea,pixelmin) ### mv to working directory os.system("rm -rf "+cube_co32) os.system("mv "+image_co32+" "+cube_co32) print("### step 9/10: immoments") myim2.moment_maps(cube_co32,chans,outmask_co32,rms_co32*thres_mom) ### pbmask print("### step 10/10: pb mask at " + str(pbcut))
thres_co21 = rms_co21 * increment_mask * thres_masking outmask_co21 = cube_co21.replace(".cube", ".mask") myim2.createmask(cube_co21, thres_co21, outmask_co21) ### step 7/10: combine masks print("### step 7/10: combine masks") mask_combine = dir_data + galname + "/" + galname + "_combine_" + suffix + ".mask" os.system("rm -rf " + mask_combine) immath(imagename=[outmask_co32, outmask_co21], mode="evalexpr", expr="IM0*IM1", outfile=mask_combine) beamarea = myim2.beam_area(image_co21, increment_mask) myim2.remove_smallmask(mask_combine, beamarea, pixelmin) """ ### step 8/10: imsmooth print("### step 8/10: imsmooth") myim2.easy_imsmooth(image_co32,beam_size,False) # co32 myim2.easy_imsmooth(image_co21,beam_size,False) # co21 """ ### mv to working directory os.system("rm -rf " + cube_co32) os.system("rm -rf " + cube_co21) os.system("cp -r " + dir_data + "data/" + galname + "*co32* " + cube_co32) print("### step 9/10: immoments") myim2.moment_maps(cube_co32, chans, mask_combine, rms_co32 * thres_mom)