fixed 2 small flaws in geom_fromAng, corrected stringID and stringName in all remaining files in 'pre'

This commit is contained in:
Martin Diehl 2014-11-16 21:44:46 +00:00
parent 6a3546cee2
commit 409a75c964
15 changed files with 31 additions and 30 deletions

View File

@ -4,8 +4,8 @@
import string,os,sys import string,os,sys
from optparse import OptionParser, Option from optparse import OptionParser, Option
scriptID = '$Id$' scriptID = string.replace('$Id$','\n','\\n')
scriptName = scriptID.split()[1] scriptName = scriptID.split()[1][:-3]
#------------------------------------------------------------------------------------------------- #-------------------------------------------------------------------------------------------------
class extendableOption(Option): class extendableOption(Option):

View File

@ -14,7 +14,7 @@ import sys,os,re,string
from optparse import OptionParser from optparse import OptionParser
import damask import damask
scriptID = '$Id$' scriptID = string.replace('$Id$','\n','\\n')
scriptName = scriptID.split()[1][:-3] scriptName = scriptID.split()[1][:-3]
# ----------------------------- # -----------------------------

View File

@ -6,8 +6,8 @@ import numpy as np
from optparse import OptionParser from optparse import OptionParser
import damask import damask
scriptID = '$Id$' scriptID = string.replace('$Id$','\n','\\n')
scriptName = scriptID.split()[1] scriptName = scriptID.split()[1][:-3]
#-------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------
# MAIN # MAIN
@ -102,7 +102,7 @@ for file in files:
phase = np.zeros(info['grid'][0]*info['grid'][1],dtype='i') phase = np.zeros(info['grid'][0]*info['grid'][1],dtype='i')
else: # finished with comments block else: # finished with comments block
phase[point] = options.phase[int(float(words[options.column-1]) > options.threshold)] phase[point] = options.phase[int(float(words[options.column-1]) > options.threshold)]
eulerangles[point,...] = map(math.degrees, words[:3]) eulerangles[point,...] = map(lambda x: math.degrees(float(x)), words[:3])
point += 1 point += 1
if info['grid'].prod() != point: if info['grid'].prod() != point:
@ -190,5 +190,6 @@ for file in files:
#--- output finalization -------------------------------------------------------------------------- #--- output finalization --------------------------------------------------------------------------
if file['name'] != 'STDIN': if file['name'] != 'STDIN':
file['output'].close() file['output'].close()
print os.path.splitext(file['name'])[0]
os.rename(file['name']+'_tmp', os.rename(file['name']+'_tmp',
os.path.splitext(file['name'])[0] + '_material.config' if options.config else '.geom') os.path.splitext(file['name'])[0] +'%s'%('_material.config' if options.config else '.geom'))

View File

@ -6,8 +6,8 @@ import numpy as np
from optparse import OptionParser from optparse import OptionParser
import damask import damask
scriptID = '$Id$' scriptID = string.replace('$Id$','\n','\\n')
scriptName = scriptID.split()[1] scriptName = scriptID.split()[1][:-3]
#-------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------
# MAIN # MAIN

View File

@ -6,8 +6,8 @@ import numpy as np
from optparse import OptionParser from optparse import OptionParser
import damask import damask
scriptID = '$Id$' scriptID = string.replace('$Id$','\n','\\n')
scriptName = scriptID.split()[1] scriptName = scriptID.split()[1][:-3]
def meshgrid2(*arrs): def meshgrid2(*arrs):

View File

@ -8,8 +8,8 @@ from scipy import ndimage
from multiprocessing import Pool from multiprocessing import Pool
import damask import damask
scriptID = '$Id$' scriptID = string.replace('$Id$','\n','\\n')
scriptName = scriptID.split()[1] scriptName = scriptID.split()[1][:-3]
#-------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------
# MAIN # MAIN

View File

@ -7,7 +7,7 @@ from optparse import OptionParser, OptionGroup, Option, SUPPRESS_HELP
import damask import damask
scriptID = string.replace('$Id$','\n','\\n') scriptID = string.replace('$Id$','\n','\\n')
scriptName = os.path.splitext(scriptID.split()[1])[0] scriptName = scriptID.split()[1][:-3]
#-------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------
class extendedOption(Option): class extendedOption(Option):

View File

@ -5,8 +5,8 @@ import os,sys,string,re,math,numpy
import damask import damask
from optparse import OptionParser, OptionGroup, Option, SUPPRESS_HELP from optparse import OptionParser, OptionGroup, Option, SUPPRESS_HELP
scriptID = '$Id$' scriptID = string.replace('$Id$','\n','\\n')
scriptName = scriptID.split()[1] scriptName = scriptID.split()[1][:-3]
#-------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------
class extendedOption(Option): class extendedOption(Option):

View File

@ -6,8 +6,8 @@ import numpy as np
from optparse import OptionParser from optparse import OptionParser
import damask import damask
scriptID = '$Id$' scriptID = string.replace('$Id$','\n','\\n')
scriptName = scriptID.split()[1] scriptName = scriptID.split()[1][:-3]
#-------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------
# MAIN # MAIN

View File

@ -5,8 +5,8 @@ import os,sys,string,re,math,numpy, damask
from scipy import ndimage from scipy import ndimage
from optparse import OptionParser, OptionGroup, Option, SUPPRESS_HELP from optparse import OptionParser, OptionGroup, Option, SUPPRESS_HELP
scriptID = '$Id$' scriptID = string.replace('$Id$','\n','\\n')
scriptName = scriptID.split()[1] scriptName = scriptID.split()[1][:-3]
#-------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------
class extendedOption(Option): class extendedOption(Option):

View File

@ -6,8 +6,8 @@ import damask
import re import re
from optparse import OptionParser from optparse import OptionParser
scriptID = '$Id$' scriptID = string.replace('$Id$','\n','\\n')
scriptName = scriptID.split()[1] scriptName = scriptID.split()[1][:-3]
def all_same(items,a): def all_same(items,a):
return all(x == a for x in items) return all(x == a for x in items)

View File

@ -10,8 +10,8 @@ that are written during the first run of the model.
import sys,os,re import sys,os,re
from optparse import OptionParser from optparse import OptionParser
scriptID = '$Id$' scriptID = string.replace('$Id$','\n','\\n')
scriptName = scriptID.split()[1] scriptName = scriptID.split()[1][:-3]
# ----------------------------- # -----------------------------
def ParseOutputFormat(filename,what,me): def ParseOutputFormat(filename,what,me):

View File

@ -4,8 +4,8 @@
import sys,os,pwd,math,re,string,numpy, damask import sys,os,pwd,math,re,string,numpy, damask
from optparse import OptionParser from optparse import OptionParser
scriptID = '$Id$' scriptID = string.replace('$Id$','\n','\\n')
scriptName = scriptID.split()[1] scriptName = scriptID.split()[1][:-3]
sys.path.append(damask.solver.Marc().libraryPath('../../')) sys.path.append(damask.solver.Marc().libraryPath('../../'))

View File

@ -4,8 +4,8 @@
import sys,os,math,re,string, damask import sys,os,math,re,string, damask
from optparse import OptionParser, OptionGroup, Option, SUPPRESS_HELP from optparse import OptionParser, OptionGroup, Option, SUPPRESS_HELP
scriptID = '$Id$' scriptID = string.replace('$Id$','\n','\\n')
scriptName = scriptID.split()[1] scriptName = scriptID.split()[1][:-3]
try: # check for Python Image Lib try: # check for Python Image Lib

View File

@ -6,8 +6,8 @@ import numpy as np
from optparse import OptionParser from optparse import OptionParser
import damask import damask
scriptID = '$Id$' scriptID = string.replace('$Id$','\n','\\n')
scriptName = scriptID.split()[1] scriptName = scriptID.split()[1][:-3]
#-------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------
# MAIN # MAIN