#!/usr/bin/python from libacepy.lv2data import lv2data from libacepy.lv1data import lv1data ion = 0 datafilename = "axlv2_et_slices_280_001.dat" bla = lv2data(datafilename, ["He2+", "C4+", "C5+", "C6+"]) bla.calcfromlv1() bla.write() print bla.ions[ion].flux print bla.ions[ion].dens print bla.ions[ion].velocity print "numflux = ", bla.ions[ion].totfluxnumint print "numdens = ", bla.ions[ion].totdensnumint print "fitflux = ", bla.ions[ion].totfluxfit print "fitdens = ", bla.ions[ion].totdensfit print "tempflux = ", bla.ions[ion].iontempfluxfit print "bulkvflux = ", bla.ions[ion].bulkspeedfluxfit print "tempdens = ", bla.ions[ion].iontempdensfit print "bulkvdens = ", bla.ions[ion].bulkspeeddensfit print bla.__doc__
posname = path + "1H1+.tof" posin = open(posname) pos = [] for s in posin: k = s.split() v = sqrt((2 * float(k[0]) * e * 1000.) / m) pos.append([v / 1000., int(float(k[2]))]) listname = path + "list.in" listin = open(listname) s = listin.readline() data = [] for k in listin: name = k.split() tmplv2dat = lv2data(path, name[0], ionlist) tmplv2dat.setions() tmplv2dat.ions[0].mass = 1. tmplv2dat.ions[0].charge = 1. dataname = path + name[0] datain = open(dataname) k2 = ["++"] while (k2[0] != "*****"): s = datain.readline() k2 = s.split() if (k2[0] == "Cycles"): tmplv2dat.ions[0].cycles = float(k2[2]) print "cycles = ", float(k2[2]) print tmplv2dat.ions[0].cycles if (k2[0] == "Aspang"): tmplv2dat.ions[0].aspang = float(k2[2])
for p in liste: k = p.split() path = k[0] #ion_list=["He2+","He1+","C4+","C5+","C6+","13C6+","N5+","N6+","N7+","O5+","O6+","O7+","O8+","Ne8+","Ne7+","Mg6+","Mg7+","Mg8+","Mg9+","Mg10+","Mg11+","Mg12+","Si5+","Si6+","Si7+","Si8+","Si9+","Si10+","Si11+","Si12+","S5+","S6+","S7+","S8+","S9+","S10+","S11+","S12+","Ca6+","Ca7+","Ca8+","Ca9+","Ca10+","Ca11+","Ca12+","Ca13+","Ca14+","Fe5+","Fe6+","Fe7+","Fe8+","Fe9+","Fe10+","Fe11+","Fe12+","Fe13+","Fe14+","Fe15+","Fe16+","Fe17+"] # ion_list=["O5+","O6+","O7+","O8+","Ne7+","Ne8+","N5+","N6+","N7+","C4+","C5+","C6+","Fe7+","Fe8+","Fe9+","Fe10+","Fe11+","Fe12+","Fe13+","Fe14+","Fe15+","Fe16+","Fe17+","Fe18+","Fe19+","Fe20+","Fe21+","Fe22+","Fe23+","Fe24+"] ion_list = [ "He2+", "C4+", "C5+", "C6+", "N5+", "N6+", "N7+", "O4+", "O5+", "O6+", "O7+", "O8+", "Ne7+", "Ne8+", "Ne9+", "Ne10+", "Mg5+", "Mg6+", "Mg7+", "Mg8+", "Mg9+", "Mg10+", "Mg11+", "Mg12+", "Si6+", "Si7+", "Si8+", "Si9+", "Si10+", "Si11+", "Si12+", "Si13+", "Si14+", "S5+", "S6+", "S7+", "S8+", "S9+", "S10+", "S11+", "S12+", "S13+", "S14+", "Ca6+", "Ca7+", "Ca8+", "Ca9+", "Ca10+", "Ca11+", "Ca12+", "Ca13+", "Ca14+", "Ca15+", "Ca16+", "Ca17+", "Ca18+", "Ca19+", "Ca20+", "Fe5+", "Fe6+", "Fe7+", "Fe8+", "Fe9+", "Fe10+", "Fe11+", "Fe12+", "Fe13+", "Fe14+", "Fe15+", "Fe16+", "Fe17+", "Fe18+", "Fe19+", "Fe20+", "Fe21+", "Fe22+", "Fe23+", "Fe24+", "Fe25+", "Fe26+" ] """ filelist=open(path+"list.in") s=filelist.readline() for s in filelist: k=s.split() print "k=",k data=lv2data(path,k[0],ion_list) data.calcfromlv1() data.write() """ data = lv2data(path, argv[1], ion_list) data.calcfromlv1() data.write()
#!/usr/bin/python from scipy import sqrt,zeros from numpy import float from libacepy.lv2data import lv2data from sys import argv # script that recalcs ion properties <- mainly to fix problem with old data where some He2+ pileup screws heavy ions velocity distributions due to some counts at very low velocities. This has a somehow large effekt on Fe distributions!!! this program is copied and called by shell script recalcions.sh liste=open("pathlist.in") for p in liste: k=p.split() path=k[0] #ion_list=["He2+","He1+","C4+","C5+","C6+","13C6+","N5+","N6+","N7+","O5+","O6+","O7+","O8+","Ne8+","Ne7+","Mg6+","Mg7+","Mg8+","Mg9+","Mg10+","Mg11+","Mg12+","Si5+","Si6+","Si7+","Si8+","Si9+","Si10+","Si11+","Si12+","S5+","S6+","S7+","S8+","S9+","S10+","S11+","S12+","Ca6+","Ca7+","Ca8+","Ca9+","Ca10+","Ca11+","Ca12+","Ca13+","Ca14+","Fe5+","Fe6+","Fe7+","Fe8+","Fe9+","Fe10+","Fe11+","Fe12+","Fe13+","Fe14+","Fe15+","Fe16+","Fe17+"] # ion_list=["O5+","O6+","O7+","O8+","Ne7+","Ne8+","N5+","N6+","N7+","C4+","C5+","C6+","Fe7+","Fe8+","Fe9+","Fe10+","Fe11+","Fe12+","Fe13+","Fe14+","Fe15+","Fe16+","Fe17+","Fe18+","Fe19+","Fe20+","Fe21+","Fe22+","Fe23+","Fe24+"] ion_list=["He2+","C4+","C5+","C6+","N5+","N6+","N7+","O4+","O5+","O6+","O7+","O8+","Ne7+","Ne8+","Mg5+","Mg6+","Mg7+","Mg8+","Mg9+","Mg10+","Mg11+","Mg12+","Si6+","Si7+","Si8+","Si9+","Si10+","Si11+","Si12+","S5+","S6+","S7+","S8+","S9+","S10+","S11+","S12+","Ca6+","Ca7+","Ca8+","Ca9+","Ca10+","Ca11+","Ca12+","Ca13+","Ca14+","Fe5+","Fe6+","Fe7+","Fe8+","Fe9+","Fe10+","Fe11+","Fe12+","Fe13+","Fe14+","Fe15+","Fe16+","Fe17+","Fe18+","Fe19+","Fe20+","Fe21+","Fe22+","Fe23+","Fe24+","Fe25+","Fe26+"] filelist=open(path+"list.in") s=filelist.readline() for s in filelist: k=s.split() print "k=",k data=lv2data(path,k[0],ion_list) data.calcfromlv1() data.write() """ data=lv2data(path,argv[1],ion_list) data.calcfromlv1() data.write() """