Commit 70b2c341 authored by John Douglas Veitch's avatar John Douglas Veitch
Browse files

Fix some misc issues with lalinference wrapper

parent 69a1f712
import lal
import lalinference as li
import collections
......@@ -117,8 +118,10 @@ class LALInferenceCBCWrapper(object):
List of command line arguments that will be used to
set up the lalinference state. (similar to argv)
"""
procParams=li.ParseStringVector(lal.CreateStringVector(*argv))
strvec = lal.CreateStringVector(argv[0])
for a in argv[1:]:
strvec=lal.AppendString2Vector(strvec, a)
procParams=li.ParseStringVector(strvec)
self.state = li.InitRunState(procParams)
self.state.commandLine=procParams
li.InitCBCThreads(self.state,1)
......
......@@ -32,7 +32,7 @@ if __name__=='__main__':
opts, args = parser.parse_known_args(sys.argv)
print(args)
LIstate = LIModel(sys.argv)
nest=cpnest.CPNest(LIstate, Nlive=opts.nlive, Nthreads=opts.nthreads, verbose=opts.verbose, maxmcmc=opts.maxmcmc, Poolsize=opts.poolsize)
nest=cpnest.CPNest(LIstate, nlive=opts.nlive, nthreads=opts.nthreads, verbose=opts.verbose, maxmcmc=opts.maxmcmc, poolsize=opts.poolsize)
nest.run()
if opts.plot:
nest.plot()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment