Commit be0adc78 authored by Adrian Nievergelt's avatar Adrian Nievergelt

fix header and load imod

parent ec49716b
......@@ -31,7 +31,7 @@ parser.add_argument('-i', '--input', nargs='?', default='.', help='Input MDOC fi
parser.add_argument('-d', '--outDir', nargs='?', default='.', help='Optional output directory to write scripts to.')
parser.add_argument('-dp', '--dataPath', nargs='?', default='.', help='Optional override to use if the data is mounted in a different network base path.')
parser.add_argument('-cp', '--clusterPath', nargs='?', default='/projects/project-nieverge/', help='Destination path of the HPC filesystem data directory.')
parser.add_argument('-cv', '--cudaVer', nargs='?', type=int, default=92, help='Override CUDA version. Default 9.2')
parser.add_argument('-cv', '--cudaVer', nargs='?', type=int, default=92, help='Override CUDA version. Default 92. Reduce to a lower value if MotionCor2 does not run properly with the installed graphics card.')
parser.add_argument('-ps', '--patchSize', nargs='?', type=int, default=3, help='Override local alignment patch count. Default 3.')
parser.add_argument('-b', '--binning', nargs='?', type=int, default=1, help='Output binning. Default 1 (no binning).')
parser.add_argument('-dw', '--doseWeight', action='store_true', help='Do dose-weighting on alignment.')
......@@ -111,7 +111,7 @@ with open(tiltFileName, "w+") as tiltFile:
tiltFile.write("%f\n" % (imageParams['tiltangle']) )
with open(os.path.join(mdocDir, inBaseName + ""), "w+") as scriptFile:
scriptFile.write("# Script file for motioncor2 alignment of tilt series created by on %s by %s\n\n" % ('%Y-%m-%d %H:%M'), getpass.getuser()) )
scriptFile.write('cd "$(dirname "$0")"\n')
......@@ -129,7 +129,8 @@ 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("echo Creating combined tilt series stack %s\n" % (inBaseName + "_mc2.mrc"))
scriptFile.write("newstack -fileinlist %s -output %s -tilt %s\n\n" % ( os.path.basename(stackFileName), inBaseName + "_mc2.mrc", os.path.basename(tiltFileName) ))
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