-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplotScan.py
43 lines (34 loc) · 1.62 KB
/
plotScan.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import os
dv = '0.0002e9'
def callgnuplot(j,xc12,vdet):
global dv
os.system('gnuplot -e "inpref=\'xc12_wn_' + j + '_\';' +
'outfile=\'pres_wn_' + j + '.eps\';' +
'startxcstr=\'(Initial xc12=' + xc12 + ', vdet=' + vdet + ', dv=' + dv + ')\'" plotP_pm.gp')
os.system('gnuplot -e "inpref=\'xc12_wn_' + j + '_\';' +
'outfile=\'dens_wn_' + j + '.eps\';' +
'startxcstr=\'(Initial xc12=' + xc12 + ', vdet=' + vdet + ', dv=' + dv + ')\'" plotRho_pm.gp')
os.system('python getplotmf.py ' + j)
os.system('gnuplot -e "inpref=\'massfrac_wn_' + j + '.dat\';' +
'outfile=\'massfrac_wn_' + j + '.eps\';' +
'startxcstr=\'(Initial xc12=' + xc12 + ', vdet=' + vdet + ')\'" plotX.gp')
os.system('python getplotmf.py ' + j + '_ovr')
os.system('gnuplot -e "inpref=\'massfrac_wn_' + j + '_ovr.dat\';' +
'outfile=\'massfrac_wn_' + j + '_ovr.eps\';' +
'startxcstr=\'(Initial xc12=' + xc12 + ', vdet=' + vdet + ', dv = +' + dv + ')\'" plotX.gp')
os.system('python getplotmf.py ' + j + '_udr')
os.system('gnuplot -e "inpref=\'massfrac_wn_' + j + '_udr.dat\';' +
'outfile=\'massfrac_wn_' + j + '_udr.eps\';' +
'startxcstr=\'(Initial xc12=' + xc12 + ', vdet=' + vdet + ', dv = -' + dv + ')\'" plotX.gp')
return
fs = open('scanrange_log.txt','r')
#get header
h = fs.readline()
#plot all scan entries
for l in fs:
ls = l.split()
j = ls[0]
xc12 = '{: > 8,.6F}'.format(float(ls[6]))
vdet = '{: ^ 18,.16E}'.format(float(ls[2]))
callgnuplot(j,xc12,vdet)
fs.close()