Esempio n. 1
0
ionnames = ["He2+", "O6+", "O7+"]

parkerwinkel = pi * 0.2
marks = [
]  #15.35,29.38,58.2,91.,117.7,127.6,138.5,144.,165.,172.3,180.8,192.,207.5,210.7,219.,222.5,227.,243.8,249.7,257.9,263.5,271.,298.5,324.5,345.,351.3]

mres = 240
pres = 720
sires = 3600

bintime = 4 * 3600
year = 2007
timeframe = [mark - 4, mark + 4]

#Multiplotklasse initialisieren
mp = multiplot(6, 0)
mp.setgv(0)
mp.setxrange(timeframe[0], timeframe[1])
mpi = 0
#vertikale Marks setzen
for i in range(len(marks)):
    mp.addplotmark("vline")
    mp.plotmarks[i].setvlinepos(marks[i])

# Anfang: Magdaten auswerten
mdata = magdata(mres, year, timeframe[0], timeframe[1], "/data/ivar/ace/mag/")
mdata.load()
binres = bintime / mres
mbin = []
for i in range(len(mdata.magbx)):
    # Anfang: Winkel ausrechnen
Esempio n. 2
0
jahr = []
for i in range(1):
    jahr.append([])

#jahr[0] = [2004,[[1,30]]]#120],[150,360]]]
#jahr[1] = [2005,[[1,30]]]#36],[64,103],[105,122],[135,191],[193,230]]]
#jahr[2] = [2006,[[1,30]]]#345],[347,360]]]
jahr[0] = [2007, [[1, 360]]]

gp = Gnuplot()
ionnames = ["He1+"]  #,"O6+","O7+","O8+"]
intervalrange = 20

intervalrange = 0.1
maxrange = 5
mp = multiplot(len(ionnames))
mp.setxrange(0, maxrange)
mp.setxlabel("vel/swvel")

datamin = []
datamax = []

for i in range(len(ionnames)):
    datamin.append(1e30)
    datamax.append(0)

for jh in range(len(jahr)):
    print "Jahr " + str(jahr[jh][0])
    pathh1 = "/data/wimmer/ace/puis/1hdata/" + str(jahr[jh][0]) + "/"
    pathh2 = "/data/wimmer/ace/1hdata/" + str(jahr[jh][0]) + "/"
Esempio n. 3
0
data5 = zeros([100, 100], float)

for i in range(100):
    data1[i][0] = float(i)
    data2[i][0] = float(i)
    data3[i][0] = float(i)
    data4[i][0] = float(i)
    data5[i][0] = float(i)
    data1[i][1] = float(i)
    data2[i][1] = float(i)**2
    data3[i][1] = sqrt(float(i))
    data4[i][1] = float(i)**3
    data5[i][1] = float(i)**3

panels = 4
mp = multiplot(panels)
mp.addplotmark("vline")
mp.addplotmark("vline")
#mp.addplotmark("box")
#mp.addplotmark("box")
mp.plotmarks[0].setvlinepos(10.)
mp.plotmarks[1].setvlinepos(15.)
mp.plotmarks[1].setpanel([0, 2])
#mp.plotmarks[2].setpanel([-1])
#mp.plotmarks[2].setboxrange(0.,10.)
#mp.plotmarks[3].setpanel([-1])
#mp.plotmarks[3].setboxrange(15.,40.)

for panel in range(panels):
    mp.panel[panel].setylabel("Test")
    if (panel == 1):
Esempio n. 4
0
#temp1 = [[20,164.6],[25,172.3],[30,178.4],[35,183.1],[40,186.6],[45,189.2],[50,191.1]]
#temp2 = [[20,173.3],[25,181.5],[30,188],[35,195],[40,199],[45,202],[50,205]]

#quot = []
#for i in range(len(temp2)):
#    quot.append([temp[i][0],temp[i][1]/temp2[i][1]])

#print quot

pardiff = []
for i in range(len(temp2)):
    pardiff.append([temp1[i][0], sqrt(abs(temp1[i][1]**2 - temp2[i][1]**2))])

print pardiff

mp = multiplot(2)
pdata = Data(temp1)
mp.panel[0].adddata(pdata)
pdata = Data(temp2)
mp.panel[0].adddata(pdata)
#pdata = Data(quot)
#mp.panel[0].adddata(pdata)

mp.panel[0].setyrange(140.0, 190.)

mp.panel[1].setlogscale(0)
mp.panel[1].setylabel("Abs")
pdata = Data(pardiff)
mp.panel[1].adddata(pdata)
mp.panel[1].setyrange(20., 70.)
mp.panel[1].setlogscale(0)
Esempio n. 5
0
phistarr[26].set_option_colonsep("title", "'Si^{9+}'")
phistarr[26].set_option_colonsep("with", "steps lt 5 lw 2")
phistarr2[-1].set_option_colonsep("with", "steps lt 1 lw 2")
phistarr2[36].set_option_colonsep("with", "steps lt 3 lw 2")
phistarr2[9].set_option_colonsep("with", "steps lt 4 lw 2")
phistarr2[26].set_option_colonsep("with", "steps lt 5 lw 2")
pmeandv[-1].set_option_colonsep("with", "l lt 1 lw 2")
pmeandv[36].set_option_colonsep("with", "l lt 3 lw 2")
pmeandv[9].set_option_colonsep("with", "l lt 4 lw 2")
pmeandv[26].set_option_colonsep("with", "l lt 5 lw 2")
pmeandv2[-1].set_option_colonsep("with", "l lt 1 lw 2")
pmeandv2[36].set_option_colonsep("with", "l lt 3 lw 2")
pmeandv2[9].set_option_colonsep("with", "l lt 4 lw 2")
pmeandv2[26].set_option_colonsep("with", "l lt 5 lw 2")

mp = multiplot(2, 1)
mp.setname("paperdvhistfinal")
mp.setxlabel("|v_{ip}|/C_{A}")
mp.setxrange(0, 2)
mp.panel[1].setylabel("# occurences")
mp.panel[1].setyrange(0, 180)
mp.panel[1].key = "set key"
mp.panel[1].adddata(phistarr[-1])
mp.panel[1].adddata(phistarr[36])
mp.panel[1].adddata(phistarr[26])
mp.panel[1].adddata(phistarr[9])
mp.panel[1].adddata(pmeandv[-1])
mp.panel[1].adddata(pmeandv[36])
mp.panel[1].adddata(pmeandv[26])
mp.panel[1].adddata(pmeandv[9])
mp.panel[0].setylabel("# occurences")
Esempio n. 6
0
            break

    integral_sw = integral(data.densspec[takt], sw_ende, sw_anfang)
    integral_spth = integral(data.densspec[takt], 0, sw_ende)

    if (integral_sw > 0):
        vergleich2.append(integral_spth / integral_sw)
    else:
        vergleich2.append(0)

#print sw_anfang
#print sw_ende
#gp("set style data lines")
#gp.plot(vergleich)

mp = multiplot(3)
mp.setxrange(timeframe[0][0], timeframe[-1][1])

#marks = [data.densspec[takt][sw_anfang][0],data.densspec[takt][sw_ende][0], data.densspec[takt][maximum][0]]
#for i in range(len(marks)):
#        mp.addplotmark("vline")
#        mp.plotmarks[i].setvlinepos(marks[i])

mp.panel[0].adddata(Data(zip(data.time, data.vel)))
mp.panel[0].setyrange(0., 1000.)
mp.panel[0].setlogscale(0)
mp.panel[0].setylabel("Geschwindigkeit")

mp.panel[1].adddata(Data(zip(data.time, vergleich)))
mp.panel[1].setyrange(0., 0.04)
mp.panel[1].setlogscale(0)
Esempio n. 7
0
    vyb2 = tan(syncatt.phi) * (hdata.vel + valf * 0.5) - (
        hdata.vely + valf * 0.5 * tan(tmpmagphi))
    vzb2 = tan(syncatt.theta) * (hdata.vel + valf * 0.5) - (
        hdata.velz + valf * 0.5 * tan(magdata.theta))
    dvb2 = sqrt(vyb2**2 + vzb2**2)

    counts = sum(hedata.countspec[:, :, 1], axis=1)

    #vspec=[]
    #for i in range(len(hedata.time)):
    #    vd=vdetector(func=twobimaxmag,para=[hdata.vel[i]+0.2*valf[i],0.,0.,20.,30.,30.,0.03,0.8,0.8*valf[i],tmpmagphi[i],magdata.theta[i]],aspphi=-syncatt.phi[i],asptheta=syncatt.theta[i])
    #vd=vdetector(func=twobimaxmag,para=[hdata.velx[i],hdata.vely[i],hdata.velz[i],20.,30.,30.,0.02,0.5,valf[i],tmpmagphi[i],magdata.theta[i]],aspphi=-syncatt.phi[i],asptheta=syncatt.theta[i])
    #    vspec.append(array(vd.vspec))

    mp = multiplot(4)
    mp.setgv(0)
    mp.setname("sp_%3.i_%3.i" % (int(timeframe[0, 0]), int(timeframe[-1, 1])))
    mp.setxrange(timeframe[0, 0], timeframe[-1, 1])
    mp.panel[0].adddata(Data(magdata.time, thetaarr, with_="l lt 1"))
    mp.panel[0].adddata(
        Data(array([[timeframe[0, 0], pi / 2.], [timeframe[-1, 1], pi / 2.]]),
             with_="l lt 0"))
    mp.panel[0].setyrange(0, pi)
    mp.panel[0].setytics(
        "('0' 0,'' %f 1,'' %f 1,'' %f 1,'{/Symbol p}/4' %f,'' %f 1,'' %f 1,'' %f 1,'{/Symbol p}/2' %f,'' %f 1,'' %f 1,'' %f 1,'{/Symbol p}3/4' %f,'' %f 1,'' %f 1,'' %f 1,'{/Symbol p}' %f)"
        %
        (pi / 16., pi / 8., pi * 3 / 16., pi / 4., pi * 5. / 16., pi * 6 / 16.,
         pi * 7 / 16., pi / 2., pi * 9. / 16., pi * 10. / 16., pi * 11. / 16.,
         pi * 3. / 4., pi * 13. / 16., pi * 14. / 16., pi * 15. / 16., pi))
    mp.panel[1].adddata(Data(magdata.time, magdata.phi, with_="l lt 1"))
Esempio n. 8
0
          [224.5, 227.2, 0, 0], [242.3, 244.3, 0, 0],
          [296., 297.6, 298.3, 298.5]]

ionnames = ["He2+", "O6+", "O7+"]

parkerwinkel = pi * 0.2

mres = 240
pres = 720
sires = 3600

bintime = 4 * 3600
year = 2007

#Multiplotklasse initialisieren
mp = multiplot(7, 1)
mp.setgv(1)
mp.setxlabel("Tage relativ zum Ereignis")
mp.setxrange(-4, +4)
mpi = 0

# parameteuebergabe zum plotten eines einzelnen ereignisses
if (len(sys.argv) > 1):
    del mark
    mark = [float(sys.argv[1])]
    mp.setgv(0)
    mp.settitle("Ereignis " + str(mark[0]))

    #dips einzeichnen
    for i in range(len(event)):
        mp.addplotmark("vline")
Esempio n. 9
0
	for p in range(len(hist)):
		for i in range(len(data[0][w])):
			bin = int(data[0][w][i][1]/binsize)
			sum[p,bin] += (data[p+1][w][i][1]-hist[p,w,bin,1])**2
		for i in range(len(sum[p])):
			hist[p,w,i,2] = sqrt(sum[p,i] / ((hist[p,w,i,3])**2))
	# Ende: Standartabweichung bestimmen
	
	# Anfang: Geschwindigkeiten anfügen
	for p in range(len(hist)):
		hist[p,w,:,0] = linspace(0,(bincount-1)*binsize,bincount) + binsize/2
	# Ende: Geschwindigkeiten anfügen



mp = multiplot(plotcount+1,1)
mpi = 0
mp.setgv(1)
mp.setxlabel("Geschwindigkeitsbins")
mp.setxrange(200,bincount*binsize)

#Anfang: Panels plotten
for p in range(len(hist)):
	for w in range(len(marks)):
		plotdata = Data(hist[p,w,:,0:3])
		plotdata.set_option_colonsep("title","'"+title[p]+" "+marktitle[w]+"'")
		plotdata.set_option_colonsep("with","yerrorline")
		mp.panel[mpi].adddata(plotdata)
	mp.panel[mpi].setyrange(ranges[p][0],ranges[p][1])
	mp.panel[mpi].setlogscale(log[p])
	del plotdata
Esempio n. 10
0
from Gnuplot import Gnuplot, Data
from libacepy.multiplot import multiplot
from math import sqrt, atan, pi, acos, cos

parkerwinkel = pi * 0.2

mres = 240
pres = 720
sires = 3600

bintime = 6 * 3600
year = 2007
timeframe = [220, 365]

#Multiplotklasse initialisieren
mp = multiplot(4, 0)
mp.setgv(1)
mp.setxrange(timeframe[0], timeframe[1])
mpi = 0

# Anfang: Magdaten auswerten
mdata = magdata(mres, year, timeframe[0], timeframe[1], "/data/ivar/ace/mag/")
mdata.load()
binres = bintime / mres
mbin = []
for i in range(len(mdata.magbx)):
    # Anfang: Winkel ausrechnen
    if (mdata.magbx[i][1] < 0):
        phi = atan(-mdata.magby[i][1] / mdata.magbx[i][1])
    elif (mdata.magbx[i][1] == 0):
        if (mdata.magby[i][1] > 0):