Beispiel #1
0
#!/usr/bin/env ipython
from pylab import *
#from load_data import sh, mc, cr
import func_data as fd
import share.funcs as ff
import matplotlib.patches as patches
import matplotlib.transforms as transforms
#++++++++++++++++++++++++++++++++++++++++++++++++++++

dir_inp_sh = '../../../../sheaths/ascii/MCflag2/wShiftCorr/_test_Vmc_'
dir_inp_mc = '../../../../mcs/ascii/MCflag2/wShiftCorr/_test_Vmc_'
fname_inp_part = 'MCflag2_2before.4after_fgap0.2_Wang90.0'

mgr = fd.mgr_data(dir_inp_sh, dir_inp_mc, fname_inp_part)
sh, mc, cr = mgr.run(vlo=100.0, vhi=450.0)

fname_fig = '../figs/nCR_vlo.%4.1f.vhi.%4.1f.png' % (mgr.vlo, mgr.vhi)
#++++++++++++++++++++++++++++++++++++++++++++++++++++
#-- mc:
mc.cc = (mc.t > 0.0) & (mc.t <= 2.0)
mc.tout = 3.0 * mc.t[mc.cc] + 1.0
mc.rms = mc.rmsB[mc.cc]
mc.B = mc.B[mc.cc]
cr.mc.crs = cr.mc.avr[mc.cc]

#-- sheath
sh.cc = sh.t < 1.0
sh.tout = sh.t[sh.cc]
sh.rms = sh.rmsB[sh.cc]
sh.B = sh.B[sh.cc]
cr.sh.crs = cr.sh.avr[sh.cc]
Beispiel #2
0
        '--seed_' + seed_nm,
        nargs=3,
        type=str_to_other,
        default=seed_default,
        help='try seeds uniformly equiparted in a given range, \
     for `' + seed_nm + '` parameter.',
        metavar=('MIN', 'MAX', 'BINS'),
    )
#--- END
pa = parser.parse_args()

dir_inp_sh = pa.left  #'{dir}/sheaths.icmes/ascii/MCflag0.1.2.2H/woShiftCorr/_auger_/' .format(dir=env['MEAN_PROFILES_ACE'])
dir_inp_mc = pa.right  #'{dir}/icmes/ascii/MCflag0.1.2.2H/woShiftCorr/_auger_/' .format(dir=env['MEAN_PROFILES_ACE'])

CRstr = pa.suffix  #'CRs.Auger_scals'
mgr = fd.mgr_data(dir_inp_sh, dir_inp_mc, pa.prefix)
sh, mc, cr = mgr.run(vlo=pa.lim[0], vhi=pa.lim[1], CRstr=pa.suffix)
#sh, mc, cr      = mgr.run(vlo=375.0, vhi=450.0, CRstr=CRstr)
#sh, mc, cr      = mgr.run(vlo=450.0, vhi=3000.0, CRstr=CRstr)

#--- `fig` argument must be full-filename or directory!
if pa.fig == '':
    raise SystemExit(' --> must specify filename or directory!')
elif pa.fig[-1] == '/':
    fname_fig  = pa.fig + 'nCR' +\
    '_' if pa.lim==[None,None] else\
    '_vlo.{lo:4.1f}.vhi.{hi:4.1f}'.format(lo=mgr.vlo,hi=mgr.vhi) +\
    '_%s.png' % pa.suffix
else:
    fname_fig = pa.fig
#++++++++++++++++++++++++++++++++++++++++++++++++++++