예제 #1
0
#!/usr/bin/python
from scipy import zeros, sqrt,mean
from Gnuplot import Gnuplot, GridData, GnuplotOpts,Data
from numpy import float
from libacepy.readdata import readflux,readres
from libacepy.fluxes import getmaxflux

pathl=open("pathlist2.in")
ion_list=[]
s=pathl.readline()
p=s.split()
liste=open(p[0]+"list.in")
s=liste.readline()
s=liste.readline()
k=s.split()
listeion=readres(p[0]+"res_"+k[0])
for ion in range(len(listeion)-1):
    ion_list.append(listeion[ion+1][0])
print ion_list
pathl.close()
liste.close()

ion_list=["He2+","O6+","O7+","C4+","C5+","C6+","N7+","Fe11+"]

swepamv=[]
swepamt=[]
swepamd=[]
swepamr=[]
swepamin=open("Swepamd279-289y200516min.dat")
for s in swepamin:
    k=s.split()
예제 #2
0
#!/usr/bin/python
from scipy import zeros, sqrt, mean
from Gnuplot import Gnuplot, GridData, GnuplotOpts, Data
from numpy import float
from libacepy.readdata import readflux, readres

GnuplotOpts.prefer_fifo_data = 0
GnuplotOpts.prefer_inline_data = 0

parain = "/data/wimmer/berger/cir/2005279_1h/res_axlv2_et_slices_279_250.dat"
filein = "/data/wimmer/berger/cir/2005279_1h/flux_axlv2_et_slices_279_250.dat"
data = readflux(filein)
para = readres(parain)

hepara = []
for ion in range(len(para)):
    if (para[ion][0] == "He2+"):
        hepara.append([para[ion][1] * 1000., para[ion][3], para[ion][6]])

hedata = []
for step in range(len(data)):
    for ion in range(len(data[step])):
        if (data[step][ion][0] == "He2+"):
            hedata.append([data[step][ion][7] * 1000., data[step][ion][13]])

print hepara
print hedata
heplotdata = Data(hedata)
gp = Gnuplot()
#gp("set logscale x")
gp("set logscale y")
예제 #3
0
#!/usr/bin/python
from scipy import zeros, sqrt, mean
from Gnuplot import Gnuplot, GridData, GnuplotOpts, Data
from numpy import float
from libacepy.readdata import readflux, readres
from libacepy.fluxes import getmaxflux

pathl = open("pathlist2.in")
ion_list = []
s = pathl.readline()
p = s.split()
liste = open(p[0] + "list.in")
s = liste.readline()
s = liste.readline()
k = s.split()
listeion = readres(p[0] + "res_" + k[0])
for ion in range(len(listeion) - 1):
    ion_list.append(listeion[ion + 1][0])
print ion_list
pathl.close()
liste.close()

ion_list = ["He2+", "O6+", "C5+", "C6+", "Fe13+"]
ion_list = ["He2+", "O6+", "C6+", "N5+", "Ne8+", "S9+"]

pathl = open("pathlist2.in")
data = []
print "readinding data"
for s in pathl:
    p = s.split()
    liste = open(p[0] + "list.in")
예제 #4
0
        datafilename = path + "elem_" + k[0]
        tmpdata = readelem(datafilename)
        data.append(tmpdata)
pathl.close()

pathl = open("pathlist2.in")
resdata = []
for p in pathl:
    k = p.split()
    path = k[0]
    filelist = open(path + "list.in")
    s = filelist.readline()
    for s in filelist:
        k = s.split()
        datafilename = path + "res_" + k[0]
        tmpdata = readres(datafilename)
        resdata.append(tmpdata)
pathl.close()

gpvdata = []
for elem in range(len(data[0])):
    tmpvdata = []
    for time in range(len(data)):
        tmpvdata.append([279. + (0.00833 * time * 5.), resdata[time][elem][2]])
    gpvdata.append(Data(tmpvdata))

gpplotdata = []
for elem in range(len(data[0])):
    tmpplotdata = []
    for time in range(len(data)):
        tmpplotdata.append([279. + (0.00833 * time * 5.), data[time][elem][5]])