Merge branch 'development' of magit1.mpie.de:damask/DAMASK into development
This commit is contained in:
commit
942883e9dd
|
@ -1,5 +1,4 @@
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import sys,time,random,threading,os,subprocess,shlex
|
import sys,time,random,threading,os,subprocess,shlex
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from optparse import Option
|
from optparse import Option
|
||||||
|
@ -94,13 +93,12 @@ def execute(cmd,
|
||||||
stdout = subprocess.PIPE,
|
stdout = subprocess.PIPE,
|
||||||
stderr = subprocess.PIPE,
|
stderr = subprocess.PIPE,
|
||||||
stdin = subprocess.PIPE)
|
stdin = subprocess.PIPE)
|
||||||
out,error = [i.replace("\x08","") for i in (process.communicate() if streamIn is None
|
out,error = [i.replace(b"\x08",b"") for i in (process.communicate() if streamIn is None
|
||||||
else process.communicate(streamIn.read()))]
|
else process.communicate(streamIn.read()))]
|
||||||
os.chdir(initialPath)
|
os.chdir(initialPath)
|
||||||
if process.returncode != 0: raise RuntimeError('{} failed with returncode {}'.format(cmd,process.returncode))
|
if process.returncode != 0: raise RuntimeError('{} failed with returncode {}'.format(cmd,process.returncode))
|
||||||
return out,error
|
return out,error
|
||||||
|
|
||||||
|
|
||||||
def coordGridAndSize(coordinates):
|
def coordGridAndSize(coordinates):
|
||||||
"""Determines grid count and overall physical size along each dimension of an ordered array of coordinates"""
|
"""Determines grid count and overall physical size along each dimension of an ordered array of coordinates"""
|
||||||
dim = coordinates.shape[1]
|
dim = coordinates.shape[1]
|
||||||
|
|
Loading…
Reference in New Issue