more files with confirmed python3 compatibility
This commit is contained in:
parent
b5b2b68206
commit
a3647cc587
2
PRIVATE
2
PRIVATE
|
@ -1 +1 @@
|
||||||
Subproject commit 3810987d64d232a7fc9e709c036f7a19d6e4d027
|
Subproject commit 1b31d1239393cfe3322a341df3b3b846328a6733
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys,math
|
import os,sys,math
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys,math
|
import os,sys,math
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys,math
|
import os,sys,math
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys,math
|
import os,sys,math
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import sys,os
|
import sys,os
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys,math,re,time,struct
|
import os,sys,math,re,time,struct
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys,math
|
import os,sys,math
|
||||||
|
@ -63,7 +63,7 @@ parser.set_defaults(center = (.0,.0,.0),
|
||||||
if options.dimension is None:
|
if options.dimension is None:
|
||||||
parser.error('no dimension specified.')
|
parser.error('no dimension specified.')
|
||||||
if options.angleaxis is not None:
|
if options.angleaxis is not None:
|
||||||
options.angleaxis = map(float,options.angleaxis)
|
options.angleaxis = list(map(float,options.angleaxis))
|
||||||
rotation = damask.Quaternion().fromAngleAxis(np.radians(options.angleaxis[0]) if options.degrees else options.angleaxis[0],
|
rotation = damask.Quaternion().fromAngleAxis(np.radians(options.angleaxis[0]) if options.degrees else options.angleaxis[0],
|
||||||
options.angleaxis[1:4])
|
options.angleaxis[1:4])
|
||||||
elif options.quaternion is not None:
|
elif options.quaternion is not None:
|
||||||
|
@ -137,17 +137,17 @@ for name in filenames:
|
||||||
indexing='ij')
|
indexing='ij')
|
||||||
# Padding handling
|
# Padding handling
|
||||||
X = np.roll(np.roll(np.roll(X,
|
X = np.roll(np.roll(np.roll(X,
|
||||||
-grid[0]/2, axis=0),
|
-grid[0]//2, axis=0),
|
||||||
-grid[1]/2, axis=1),
|
-grid[1]//2, axis=1),
|
||||||
-grid[2]/2, axis=2)
|
-grid[2]//2, axis=2)
|
||||||
Y = np.roll(np.roll(np.roll(Y,
|
Y = np.roll(np.roll(np.roll(Y,
|
||||||
-grid[0]/2, axis=0),
|
-grid[0]//2, axis=0),
|
||||||
-grid[1]/2, axis=1),
|
-grid[1]//2, axis=1),
|
||||||
-grid[2]/2, axis=2)
|
-grid[2]//2, axis=2)
|
||||||
Z = np.roll(np.roll(np.roll(Z,
|
Z = np.roll(np.roll(np.roll(Z,
|
||||||
-grid[0]/2, axis=0),
|
-grid[0]//2, axis=0),
|
||||||
-grid[1]/2, axis=1),
|
-grid[1]//2, axis=1),
|
||||||
-grid[2]/2, axis=2)
|
-grid[2]//2, axis=2)
|
||||||
else: # nonperiodic, much lighter on resources
|
else: # nonperiodic, much lighter on resources
|
||||||
# change to coordinate space where the primitive is the unit sphere/cube/etc
|
# change to coordinate space where the primitive is the unit sphere/cube/etc
|
||||||
(X, Y, Z) = np.meshgrid(np.arange(0, grid[0], dtype=np.float32),
|
(X, Y, Z) = np.meshgrid(np.arange(0, grid[0], dtype=np.float32),
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys,math
|
import os,sys,math
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys,math
|
import os,sys,math
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys
|
import os,sys
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys,math
|
import os,sys,math
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys,math
|
import os,sys,math
|
||||||
|
@ -46,7 +46,7 @@ parser.set_defaults(origin = (0.0,0.0,0.0),
|
||||||
datatype = 'f' if options.real else 'i'
|
datatype = 'f' if options.real else 'i'
|
||||||
|
|
||||||
sub = {}
|
sub = {}
|
||||||
for i in range(len(options.substitute)/2): # split substitution list into "from" -> "to"
|
for i in range(len(options.substitute)//2): # split substitution list into "from" -> "to"
|
||||||
sub[int(options.substitute[i*2])] = int(options.substitute[i*2+1])
|
sub[int(options.substitute[i*2])] = int(options.substitute[i*2+1])
|
||||||
|
|
||||||
# --- loop over input files ----------------------------------------------------------------------
|
# --- loop over input files ----------------------------------------------------------------------
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys,math
|
import os,sys,math
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 no BOM -*-
|
# -*- coding: UTF-8 no BOM -*-
|
||||||
|
|
||||||
import os,sys,math
|
import os,sys,math
|
||||||
|
|
Loading…
Reference in New Issue