bugfixing

This commit is contained in:
Martin Diehl 2014-07-24 22:02:10 +00:00
parent d0ecc0943c
commit a804b23b7a
1 changed files with 10 additions and 7 deletions

View File

@ -79,9 +79,8 @@ class Criterion(object):
'worst' :{'err':np.inf},
'best' :{'err':np.inf}
}
if self.name.lower not in self.results.keys():
raise Exception as detail:
print detail
if self.name.lower() not in self.results.keys():
raise Exception('no suitable fitting criterion selected')
else:
print('fitting to the %s criterion'%name)
@ -211,8 +210,12 @@ parser.add_option('-l','--load' , dest='load', type='float', nargs=3, \
help='load: final strain; increments; time', metavar='float int float')
parser.add_option('-g','--geometry', dest='geometry', type='string', \
help='name of the geometry file', metavar='string')
#parser.add_option('-c','--criterion',dest='formulas', action='extend', type='string', \
# help='(list of) formulas corresponding to labels', metavar='<LIST>')
parser.add_option('-c','--criterion',dest='criterion', action='extend', type='string', \ # this should be a choice
help='(list of) formulas corresponding to labels', metavar='<LIST>')
parser.add_option('--min', dest='min', type='string', \
help='name of the geometry file', metavar='string')
parser.add_option('--max', dest='max', type='string', \
help='name of the geometry file', metavar='string')
parser.set_defaults(load = [0.008,80,80.0])
parser.set_defaults(geometry ='20grains16x16x16')