|
@@ -61,8 +61,9 @@ def convertUnit(tUnit):
|
|
|
return 1
|
|
|
|
|
|
def getStrides(setup):
|
|
|
- tmax=setup['tmax']*convertUnit(setup['tUnit'])
|
|
|
+ tmax=float(setup['tmax'])*convertUnit(setup['tUnit'])
|
|
|
t0=setup['t0']
|
|
|
+ print('t0 {} tmax {}'.format(t0,tmax))
|
|
|
try:
|
|
|
stride=setup['stride']
|
|
|
except KeyError:
|
|
@@ -100,23 +101,27 @@ def main(parFiles,jobDir,startDir='NONE'):
|
|
|
model.parse(modelFile,parameterFile)
|
|
|
setup=parseSetup(setupFile)
|
|
|
scale=getScale(setup)
|
|
|
- tmax=setup['tmax']*scale
|
|
|
+ tmax=float(setup['tmax'])*scale
|
|
|
print('Using {}'.format(jobDir))
|
|
|
if startDir!='NONE':
|
|
|
print('Using solution from {}'.format(startDir))
|
|
|
#t0,y0,s0,lut,lutSE=getStartPointFromDir(startDir)
|
|
|
startPoint=getStartPointFromDir(startDir)
|
|
|
- print('t0={}'.format(t0))
|
|
|
+ print('t0={}'.format(startPoint['t0']))
|
|
|
else:
|
|
|
- #t0,y0,s0,lut,lutSE=getStartPoint(setup)
|
|
|
+ try:
|
|
|
+ print('Using solution from {}'.format(setup['startFromRef']))
|
|
|
+ except KeyError:
|
|
|
+ pass
|
|
|
startPoint=getStartPoint(setup)
|
|
|
+ print('t0={}'.format(startPoint['t0']))
|
|
|
|
|
|
#we should reorder S1 to match model.lutSE
|
|
|
#S1 is nxm, so we should reorder columns
|
|
|
- sIn=numpy.zeros(s0.shape)
|
|
|
- s0=startPoint['s0']
|
|
|
t0=startPoint['t0']
|
|
|
y0=startPoint['y0']
|
|
|
+ s0=startPoint['s0']
|
|
|
+ sIn=numpy.zeros(s0.shape)
|
|
|
if s0.size>0:
|
|
|
for x in model.lutSE:
|
|
|
#this could be modified for different ordering of lut as well
|