-
Notifications
You must be signed in to change notification settings - Fork 0
/
transform_yoon
executable file
·51 lines (39 loc) · 1.1 KB
/
transform_yoon
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
44
45
46
47
48
49
50
#! /usr/bin/env python3
import numpy as np
import sys, getopt
from libpp import *
if len(sys.argv)<2:
print('plot_yoon_psuedo -i <inputppfile>')
sys.exit(2)
#end if
exfile = __file__
try:
opts, args = getopt.getopt(sys.argv[1:],"phi:k:l:o:",["ifile=","keep=","lmax","outfile="])
except getopt.GetoptError:
print('{} -i <inputppfile>'.format(exfile))
sys.exit(2)
for opt, arg in opts:
if opt == '-h':
print('{} -i <inputppfile>'.format(exfile))
sys.exit()
elif opt in ("-i", "--ifile"):
inputfile = arg
elif opt in ("-k", "--keep"):
keep = arg
elif opt in ("-l", "--lmax"):
lmax = int(arg)
elif opt in ("-o", "--outfile"):
writefile = True
outputfile = arg
#end try
#zeff=6
#ncore=2
zeff = 17
ncore = 10
tpots = transform_yoon(inputfile,keep,lmax,ncore=ncore,outfile=None,form='yoon')
printchansyoon(tpots,zeff,'Co.mod.pp.d')
fit_exps = [12.5,18.75,28.125]
opt_coeffs = make_bound(fit_exps,tpots,1.6,0.0005)
opt_coeffs *= -1/2
cpots = add_to_vL2(tpots,[2]*len(fit_exps),fit_exps,opt_coeffs)
printchansyoon(cpots,zeff,'Co.mod_corr.pp.d')