...
 
Commits (2)
......@@ -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'] and not dirpath.endswith(alignedDir):
......@@ -138,7 +139,7 @@ with open(os.path.join(mdocDir, inBaseName + "_alignFramesMC2.sh"), "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("/sw/apps/imod/current/imodenv\n")
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:
......