Setup script for mophological drainage (not complete, but basic python functionality is there)
This commit is contained in:
1 parent
ee2869ab71
commit
c472c9c245
1 file changed
+27
Executable
+27
@@ -0,0 +1,27 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
name=sys.argv[1]
|
||||
numpts=int(sys.argv[2])
|
||||
process="drain"
|
||||
cwd=os.getcwd()
|
||||
|
||||
print(name)
|
||||
print(numpts)
|
||||
|
||||
tau=0.7
|
||||
alpha=0.005
|
||||
beta=0.95
|
||||
for pt in range(0,numpts):
|
||||
dirname=str(name)+"_"+str(process)+"_"+str(pt)
|
||||
# os.path.join(cwd,name,process,"pt"),
|
||||
print(cwd,dirname)
|
||||
if not os.path.exists(dirname):
|
||||
os.mkdir(dirname)
|
||||
os.chdir(dirname)
|
||||
ParamFile = open("Color.in","w")
|
||||
ParamFile.write("%f\n" % tau)
|
||||
ParamFile.write("%f " % alpha)
|
||||
ParamFile.write("%f\n" % beta)
|
||||
ParamFile.close()
|
||||
os.chdir(cwd)
|
||||
Reference in new issue
Block a user