Example #1
0
        temp_mi = float(temp_mi)

        if temp_mi > 0:
            temp_mi = temp_mi
        else:
            temp_mi = 15.0
        cmd = '%s/nomagic in=%s out=%s repval=%s > /dev/null '%(kapdir,ctemp,mtemp,temp_mi)
        os.system(cmd)

        temp_45(mask,mtemp,masktemp)

        print 'mean temperature is ', temp_mi, 'K'

    #MASS - 
        #calculate masses
        mass450 = mass_maps2.mass_map(c450,masktemp,kappa_4,d,i,450,'clumps')
        mass850 = mass_maps2.mass_map(c850,masktemp,kappa_8,d,i,850,'clumps')

        #Get mass error. - based on mean temp. and final mass 
        dMi_450 = mass_err(c450i,temp_mi,0.3)
        dMi_850 = mass_err(c850i,temp_mi,0.02)

        #Extract clump mass as number
        cmd = '%s/stats ndf=%s %s'%(kapdir,mass450,'> /dev/null')
        os.system(cmd)
        cmd = '%s/parget parname=%s applic=%s'%(kapdir,'total','stats') 
        status, output = commands.getstatusoutput(cmd)
        m450i = output
        cmd = '%s/stats ndf=%s %s'%(kapdir,mass850,'> /dev/null')
        os.system(cmd)
        cmd = '%s/parget parname=%s applic=%s'%(kapdir,'total','stats') 
Example #2
0
        os.system(cmd)
        cmd = "%s/parget parname=%s applic=%s" % (kapdir, "mean", "stats")
        status, output = commands.getstatusoutput(cmd)
        temp_mi = output
        temp_mi = float(temp_mi)

        if temp_mi > 0:
            temp_mi = temp_mi
        else:
            temp_mi = 15.0

        cmd = "%s/nomagic in=%s out=%s repval=%s > /dev/null " % (kapdir, ctemp, mtemp, temp_mi)
        os.system(cmd)

        # Make maps of mass
        m450 = mass_maps2.mass_map(c450, mtemp, kappa_4, d, i, 450, "cores")
        m850 = mass_maps2.mass_map(c850, mtemp, kappa_8, d, i, 850, "cores")

        # Get mass error. - based on mean temp. and final mass

        dMi_450 = mass_err(c450i, temp_mi, 0.3)
        dMi_850 = mass_err(c850i, temp_mi, 0.02)

        # Extract core mass as number
        cmd = "%s/stats ndf=%s %s" % (kapdir, m450, "> /dev/null")
        os.system(cmd)
        cmd = "%s/parget parname=%s applic=%s" % (kapdir, "total", "stats")
        status, output = commands.getstatusoutput(cmd)
        m450i = output
        cmd = "%s/stats ndf=%s %s" % (kapdir, m850, "> /dev/null")
        os.system(cmd)