Commit 13d2032c authored by Adrian Nievergelt's avatar Adrian Nievergelt
Browse files

fixed imodenv problem and local directroy check

parent fd9379ff
......@@ -91,7 +91,8 @@ inPath = os.path.splitext(args.input)
# find subframes directory
mdocDir = os.path.dirname(args.input)
if mdocDir == "":
mdocDir = "."
for (dirpath, dirnames, filenames) in os.walk(mdocDir):
for filename in filenames:
if filename == stackParams[0]['filename']:
......@@ -138,7 +139,7 @@ with open(os.path.join(mdocDir, inBaseName + ""), "w+") as scr
scriptFile.write("echo Aligning frame stack %s \n" % (os.path.join(subframesDir, imageParams['filename']) ))
scriptFile.write("MotionCor2-cuda%i -InMrc %s -OutMrc %s -Patch %i %i -InFmMotion 1 -Iter 30 -Tilt %f -FtBin %i -PixSize %f%s%s\n\n" %(args.cudaVer, os.path.join(subframesDir, imageParams['filename']), os.path.join(alignedDir, imageParams['filename']), args.patchSize, args.patchSize, imageParams['tiltangle'], args.binning, imageParams['pixelspacing'], doseWeightParams, verboseString) )
scriptFile.write("echo Creating combined tilt series stack %s\n" % (inBaseName + "_mc2.mrc"))
scriptFile.write("source /sw/apps/imod/current/imodenv\n")
scriptFile.write("newstack -fileinlist %s -output %s -tilt %s%s\n\n" % ( os.path.basename(stackFileName), inBaseName + "_mc2.mrc", os.path.basename(tiltFileName), verboseString ))
if not args.keepFrames:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment