### step 3/10: imregrid print("### step 3/10: imregrid") pbimage = glob.glob(dir_data+"data/"+galname+"*pb.image")[0] myim2.easy_imregrid(pbimage,image_co32,False) # pbimage pbimage = pbimage + ".regrid" ### step 4/10: imsmooth print("### step 4/10: imsmooth") beam_mask = beam_size * increment_mask # beam size for the masking myim2.easy_imsmooth(image_co32,beam_mask,False) # co32 ### mv the cubes to the working directory os.system("mkdir "+dir_data+galname) 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]
### step 2/10: Kelvin to Jansky conversion print("### step 2/10: Kelvin to Jansky conversion") bunit = imhead(image_ci10, "list")["bunit"] synsbeam10 = imhead(image_ci10, "list")["beammajor"]["value"] if bunit == "K": # CO(1-0) conversion if bunit = K myim2.easy_K2Jy(image_ci10, synsbeam10, 115.27120) image_ci10 = image_ci10 + ".jy" else: print("# skip easy_K2Jy for the CI(1-0) data") ### step 4/10: imsmooth print("### step 4/10: imsmooth") beam_mask = beam_size * increment_mask # beam size for the masking myim2.easy_imsmooth(image_ci10, beam_mask, False) # ci10 ### mv the cubes to the working directory os.system("mkdir " + dir_data + galname) os.system("mv "+dir_data+"fits/"+galname+"*10*smooth "\ +dir_data+galname+"/"+galname+"_ci10_"+suffix+".cube") ### step 5/10: create CO(1-0) cube mask print("### step 5/10: create CI(1-0) cube mask") cube_ci10 = glob.glob(dir_data+galname+"/"\ +galname+"*_ci10_"+suffix+".cube")[0] thres_ci10 = rms_ci10 * increment_mask * thres_masking outmask_ci10 = cube_ci10.replace(".cube", ".mask") myim2.createmask(cube_ci10, thres_ci10, outmask_ci10)
image_co21 = image_co21 + ".jy" else: print("# skip easy_K2Jy for the CO(2-1) data") ### step 3/10: imregrid print("### step 3/10: imregrid") #pbimage = glob.glob(dir_data+"data/"+galname+"*pb.image")[0] #myim2.easy_imregrid(pbimage,image_co21,False) # pbimage #pbimage = pbimage + ".regrid" ### step 4/10: imsmooth print("### step 4/10: imsmooth") beam_mask = beam_size * increment_mask # beam size for the masking myim2.easy_imsmooth(image_co21, beam_mask, False) # co21 ### mv the cubes to the working directory os.system("mkdir " + dir_data + galname) os.system("mv "+dir_data+"data/"+galname+"*smooth "\ +dir_data+galname+"/"+galname+"_"+suffix+".cube") ### step 6/10: create CO(2-1) cube mask print("### step 6/10: create CO(2-1) cube mask") cube_co21 = glob.glob(dir_data+galname+"/"\ +galname+"_"+suffix+".cube")[0] thres_co21 = rms_co21 * increment_mask * thres_masking outmask_co21 = cube_co21.replace(".cube", ".mask") myim2.createmask(cube_co21, thres_co21, outmask_co21)
image_co10 = image_co10 + ".jy" else: print("# skip easy_K2Jy for the CO(2-1) data") ### step 3/10: imregrid print("### step 3/10: imregrid") #pbimage = glob.glob(dir_data+"data/"+galname+"*pb.image")[0] #myim2.easy_imregrid(pbimage,image_co10,False) # pbimage #pbimage = pbimage + ".regrid" ### step 4/10: imsmooth print("### step 4/10: imsmooth") beam_mask = beam_size * increment_mask # beam size for the masking myim2.easy_imsmooth(image_co10, beam_mask, False) # co10 ### mv the cubes to the working directory os.system("mkdir " + dir_data + galname) os.system("mv "+dir_data+"data/"+galname+"*10*smooth "\ +dir_data+galname+"/"+galname+"_co10_"+suffix+".cube") ### step 6/10: create CO(2-1) cube mask print("### step 6/10: create CO(2-1) cube mask") cube_co10 = glob.glob(dir_data+galname+"/"\ +galname+"*_co10_"+suffix+".cube")[0] thres_co10 = rms_co10 * increment_mask * thres_masking outmask_co10 = cube_co10.replace(".cube", ".mask") myim2.createmask(cube_co10, thres_co10, outmask_co10)