示例#1
0
dir_casa_region = dir_data1 + "casa_region/"
done = glob.glob(dir_casa_region)
if not done:
    os.mkdir(dir_casa_region)

### Nyquist sampling with varying aperture size
for i in range(len(apertures)):
    print("##### sampling with aperture = " + str(apertures[i]))
    # define sampling grid at the given aperture size
    if galname == "ngc3627":
        stp_ra, stp_dec, rng_ra, rng_dec = Nyq.def_step2(apertures[i], fov)
    else:
        stp_ra, stp_dec, rng_ra, rng_dec = Nyq.def_step(apertures[i], fov)

    # rms calculation at the given aperture size
    Sa_co, Sb_co = Nyq.def_area(m0_co21, apertures[i], beam_co)
    rms_apt_co10 = rms_co10 * velres * sqrt(nchan) / sqrt(Sa_co)  #average
    rms_apt_co21 = rms_co21 * velres * sqrt(nchan) / sqrt(Sa_co)  #average
    Sa_wise, Sb_wise = Nyq.def_area(image_w3, apertures[i], beam_wise)
    rms_apt_w1 = rms_w1 / sqrt(Sa_wise)  #average
    rms_apt_w2 = rms_w2 / sqrt(Sa_wise)  #average
    rms_apt_w3 = rms_w3 / sqrt(Sa_wise)  #average

    # setup for imval txt output
    if type(apertures[i]) == int:
        name_size = "{0:02d}".format(apertures[i])
    elif type(apertures[i]) == float:
        name_size = str(apertures[i]).replace(".", "p").replace("0", "")

    product_file = dir_data1+galname+"_flux_"+suf_wise+"_"\
        +str(name_size)+".txt"
示例#2
0
if not done:
    os.mkdir(dir_casa_region)



### Nyquist sampling with varying aperture size
for i in range(len(apertures)):
    print("##### sampling with aperture = " + str(apertures[i]))
    # define sampling grid at the given aperture size
    if galname == "ngc3627":
        stp_ra,stp_dec,rng_ra,rng_dec=Nyq.def_step2(apertures[i],fov)
    else:
        stp_ra,stp_dec,rng_ra,rng_dec=Nyq.def_step(apertures[i],fov)

    # rms calculation at the given aperture size
    Sa_co,Sb_co = Nyq.def_area(image_co21,apertures[i],beam_size)
    rms_apt_co10 = rms_co10*velres*sqrt(nchan)/sqrt(Sa_co) #average
    rms_apt_co21 = rms_co21*velres*sqrt(nchan)/sqrt(Sa_co) #average

    # setup for imval txt output
    if type(apertures[i]) == int:
        name_size = "{0:02d}".format(apertures[i])
    elif type(apertures[i]) == float:
        name_size = str(apertures[0]).replace(".","p")

    product_file = dir_data+galname+"_flux_"+suffix+"_"\
                   +str(name_size)+".txt"
    os.system("rm -rf "+product_file)
    f = open(product_file,"a")
    f.write(header_output+"\n")
    f.close()
done = glob.glob(dir_casa_region)
if not done:
    os.mkdir(dir_casa_region)



# Nyquist sampling with varying aperture size
for i in range(len(apertures)):
    print("##### sampling with aperture = " + str(apertures[i]))
    # define sampling grid at the given aperture size
    stp_ra,stp_dec,rng_ra,rng_dec=Nyq.def_step(apertures[i],fov)
    #ra_dgr = ra_dgr + stp_ra
    #dec_dgr = dec_dgr - stp_dec

    # rms calculation at the given aperture size
    Sa_co,Sb_co = Nyq.def_area(m0_co21,apertures[i],beam)
    rms_apt_co10 = rms_co10*velres*sqrt(nchan)/sqrt(Sa_co) #average
    rms_apt_co21 = rms_co21*velres*sqrt(nchan)/sqrt(Sa_co) #average

    # setup for imval txt output
    if type(apertures[i]) == int:
        name_size = "{0:02d}".format(apertures[i])
    elif type(apertures[i]) == float:
        name_size = str(apertures[0]).replace(".","p")

    product_file = dir_data1+galname+"_fluxin_"+suffix+"_"\
        +str(name_size)+".txt"
    os.system("rm -rf "+product_file)
    f = open(product_file,"a")
    f.write(header_output+"\n")
    f.close()