Keep consistent with the new file: example.linearODF
This commit is contained in:
parent
2ab90c28a5
commit
37e40fdf79
|
@ -48,7 +48,7 @@ if not os.path.exists(options.file):
|
||||||
inName = options.file
|
inName = options.file
|
||||||
outName = os.path.splitext(inName)[0]+'.linearODF'
|
outName = os.path.splitext(inName)[0]+'.linearODF'
|
||||||
nPhi1,nPHI,nPhi2 = options.step
|
nPhi1,nPHI,nPhi2 = options.step
|
||||||
dPhi1,dPHI,dPhi2 = [sampleSym[options.symmetry][i]/options.step[i] for i in xrange(3)]
|
dPhi1,dPHI,dPhi2 = [sampleSym[options.symmetry][i]/float(options.step[i]) for i in xrange(3)]
|
||||||
|
|
||||||
N = (nPhi1-1)*(nPHI-1)*(nPhi2-1)
|
N = (nPhi1-1)*(nPHI-1)*(nPhi2-1)
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ for iPhi1 in range(nPhi1-1):
|
||||||
inFile.close()
|
inFile.close()
|
||||||
outFile.write('%-6i%-6i%-6i #Ranges of phi1, Phi, phi2\n'%sampleSym[options.symmetry])
|
outFile.write('%-6i%-6i%-6i #Ranges of phi1, Phi, phi2\n'%sampleSym[options.symmetry])
|
||||||
outFile.write('%-6.2f%-6.2f%-6.2f #Deltas of phi1, Phi, phi2\n'%(dPhi1,dPHI,dPhi2))
|
outFile.write('%-6.2f%-6.2f%-6.2f #Deltas of phi1, Phi, phi2\n'%(dPhi1,dPHI,dPhi2))
|
||||||
outFile.write('%-6i%-6i%-6i #Angular steps needed to be converted\n'%(nPhi1-1,nPHI-1,nPhi2-1))
|
#outFile.write('%-6i%-6i%-6i #Angular steps needed to be converted\n'%(nPhi1-1,nPHI-1,nPhi2-1))
|
||||||
outFile.write('cell-centered data\n')
|
outFile.write('cell-centered data\n')
|
||||||
outFile.write('\n')
|
outFile.write('\n')
|
||||||
|
|
||||||
|
@ -104,4 +104,3 @@ for i in range(N):
|
||||||
outFile.write('%g\n'%(linear[i]))
|
outFile.write('%g\n'%(linear[i]))
|
||||||
|
|
||||||
outFile.close()
|
outFile.close()
|
||||||
|
|
||||||
|
|
|
@ -256,13 +256,13 @@ except:
|
||||||
ODF = {}
|
ODF = {}
|
||||||
ODF['limits'] = [math.radians(float(limit)) for limit in fileBinnedODF.readline().split()[0:3]]
|
ODF['limits'] = [math.radians(float(limit)) for limit in fileBinnedODF.readline().split()[0:3]]
|
||||||
ODF['deltas'] = [math.radians(float(delta)) for delta in fileBinnedODF.readline().split()[0:3]]
|
ODF['deltas'] = [math.radians(float(delta)) for delta in fileBinnedODF.readline().split()[0:3]]
|
||||||
ODF['intervals'] = [int(interval) for interval in fileBinnedODF.readline().split()[0:3]]
|
#ODF['intervals'] = [int(interval) for interval in fileBinnedODF.readline().split()[0:3]]
|
||||||
#ODF['intervals'] = [int(round(limit/delta)) for limit,delta in zip(ODF['limits'],ODF['deltas'])]
|
ODF['intervals'] = [int(round(limit/delta)-1) for limit,delta in zip(ODF['limits'],ODF['deltas'])]
|
||||||
nBins = ODF['intervals'][0]*ODF['intervals'][1]*ODF['intervals'][2]
|
nBins = ODF['intervals'][0]*ODF['intervals'][1]*ODF['intervals'][2]
|
||||||
|
|
||||||
print 'Limit: ', [math.degrees(limit) for limit in ODF['limits']]
|
print 'Limit: ', [math.degrees(limit) for limit in ODF['limits']]
|
||||||
print 'Delta: ', [math.degrees(delta) for delta in ODF['deltas']]
|
print 'Delta: ', [math.degrees(delta) for delta in ODF['deltas']]
|
||||||
print 'Interval: ', ODF['intervals']
|
print 'Interval: ', [interval + 1 for interval in ODF['intervals']]
|
||||||
|
|
||||||
centering = fileBinnedODF.readline()
|
centering = fileBinnedODF.readline()
|
||||||
if re.search('cell',centering.lower()):
|
if re.search('cell',centering.lower()):
|
||||||
|
|
Loading…
Reference in New Issue