missing file.close()
This commit is contained in:
parent
4579a696e8
commit
aeb468254d
|
@ -212,7 +212,7 @@ Transform linear binned data into Euler angles.
|
||||||
parser.add_option('-f', '--file', dest='file', type='string', metavar = 'string', \
|
parser.add_option('-f', '--file', dest='file', type='string', metavar = 'string', \
|
||||||
help='file name, the input file is generated by the script "OIMlinear2linearODF.py"')
|
help='file name, the input file is generated by the script "OIMlinear2linearODF.py"')
|
||||||
parser.add_option('-o', '--output', dest='output', type='string', metavar = 'string', \
|
parser.add_option('-o', '--output', dest='output', type='string', metavar = 'string', \
|
||||||
help='the prefix of output file name.')
|
help='the prefix of output files name.')
|
||||||
parser.add_option('-n', '--number', dest='number', type='int', metavar = 'int', \
|
parser.add_option('-n', '--number', dest='number', type='int', metavar = 'int', \
|
||||||
help='the number of orientations needed to be generated, the default is [%default]')
|
help='the number of orientations needed to be generated, the default is [%default]')
|
||||||
parser.add_option('-a','--algorithm', dest='algorithm', type='string', metavar = 'string', \
|
parser.add_option('-a','--algorithm', dest='algorithm', type='string', metavar = 'string', \
|
||||||
|
@ -385,5 +385,6 @@ for method in methods:
|
||||||
fileConfig.write('[Grain%s]\n'%(str(ID).zfill(formatwidth)) + \
|
fileConfig.write('[Grain%s]\n'%(str(ID).zfill(formatwidth)) + \
|
||||||
'(gauss) phi1 %10.5f Phi %10.5f phi2 %10.6f scatter 0.0 fraction 1.0\n'\
|
'(gauss) phi1 %10.5f Phi %10.5f phi2 %10.6f scatter 0.0 fraction 1.0\n'\
|
||||||
%(float(eulers[0]),float(eulers[1]),float(eulers[2])))
|
%(float(eulers[0]),float(eulers[1]),float(eulers[2])))
|
||||||
|
fileConfig.close()
|
||||||
except:
|
except:
|
||||||
print 'unable to write material .config file:', nameSampledODF+'.'+method+str(nSamples)+'.config'
|
print 'unable to write material .config file:', nameSampledODF+'.'+method+str(nSamples)+'.config'
|
Loading…
Reference in New Issue