Exemple #1
0
    gp("set xrange[" + str(b_low) + ":" + str(b_high) + "]")
    #    gp("sb=sa")
    gp("fit b(x) '" + src + str(v_int) + "/e_files/" + str(v_int) + "_step_" +
       str(eq_step) + "_e" + str(echannel) + "' u 1:2:3 via B,xb,sb")
    #    gp("fit b(x) '"+src+str(v_int)+"/e_files/"+str(v_int)+"_step_"+str(eq_step)+"_e_all' u 1:2:3 via B,xb,sb")
    gp("set xrange[" + str(pr_low) + ":" + str(pr_high) + "]")
    gp("plot '" + src + str(v_int) + "/e_files/" + str(v_int) + "_step_" +
       str(eq_step) + "_e" + str(echannel) +
       "' u 1:2:3 with errorbars,a(x),b(x),a(x)+b(x)")
    #    gp("plot '"+src+str(v_int)+"/e_files/"+str(v_int)+"_step_"+str(eq_step)+"_e_all' u 1:2:3 with errorbars , a(x),b(x),a(x)+b(x)")
    #    gp("set term postscript color 18")
    #    gp("set output '"+src+str(v_int)+"/diff_files/"+"plot_"+str(eq_step)+"_"+str(i)+".ps'")
    #    gp("plot '"+src+str(v_int)+"/e_files/"+str(v_int)+"_step_"+str(eq_step)+"_e"+str(echannel)+"' u 1:2:3 with errorbars , a(x),b(x)")
    #    gp("set term X11")

    a[l - 1, 0] = float(str(gp.getvar("xa")))
    b[l - 1, 0] = float(str(gp.getvar("xb")))
    c[l - 1, 0] = float(str(gp.getvar("xc")))
    d[l - 1, 0] = float(str(gp.getvar("xd")))

    a[l - 1, 1] = float(str(gp.getvar("sa")))
    b[l - 1, 1] = float(str(gp.getvar("sb")))
    c[l - 1, 1] = float(str(gp.getvar("sc")))
    d[l - 1, 1] = float(str(gp.getvar("sd")))

    a[l - 1, 2] = float(str(gp.getvar("A")))
    b[l - 1, 2] = float(str(gp.getvar("B")))
    c[l - 1, 2] = float(str(gp.getvar("C")))
    d[l - 1, 2] = float(str(gp.getvar("D")))

    for j in range(3):
Exemple #2
0
        cfile.write("%f\t" % mousexpos[k])
        cfile.write("%f\t" % mouseypos[k])
        if (mousexpos[k]>0. and mouseypos[k]>0.):
            cfile.write("%f\t" % 1.)
        else:
            cfile.write("%f\t" % 0.)
        cfile.write("\n")
    cfile.close()

    
    gp("set xrange[%i:%i]" % (xrange[0],xrange[1]))
    gp("set yrange[%i:%i]" % (yrange[0],yrange[1]))
    gp("set title '%s'" %(labelnames[i]))
    gp("splot 'tmpetmat.dat' w pm3d t '', 'tmppointssrimmat.dat' w p lt 5 pt 2 ps 3 t '', 'tmppointsmat.dat' w p lt 3 pt 1 ps 3 t''")
    gp("pause mouse '%s' "%(labelnames[i]))
    tmpx=float(gp.getvar("MOUSE_X"))
    mousexpos[i]=tmpx
    tmpy=float(gp.getvar("MOUSE_Y"))
    mouseypos[i]=tmpy
    print mousexpos[i],mouseypos[i]
    gp("set terminal x11 close")


f=open("/home/asterix/berger/projects/ionpositions/test_ion_pos.dat")
w=open("/home/asterix/berger/projects/ionpositions/tmp_ion_pos_end.dat","w")
print "loading test_ion_pos.dat"

for i in range(step-1):
    s=f.readline()
    w.write(s)
    k=s.split()