$def with (form, dirs)
This form helps you configure the motioncor2 automatic runs for one directory.
Will run on each TIFF:clip unpack -D "Defects filename" -R 1 (if checkbox "Rotate gain" is activated) "Gain filename" MotionCor2 -FtBin "Binning" -FmDose "Dose per frame" -PixSize "Pixel size" -Throw "Initial frames to ignore" -Group "Group frames before aligning" -kV 300 -Patch 5 5 -RotGain 3 gctf --kV 300 --Cs 0.01 --ac 0.1 --dstep 5.0 --do_EPA 1 --do_Hres_ref 1 --Href_resL 15.0 --Href_resH 3.0 --ctfstar NONE --estimate_B 1 --B_resL 20.0 --B_resH 3.0 --apix "Pixel size" * 2.0 if Volta Phase Plate, add: --phase_shift_L 10 --phase_shift_H 175 --phase_shift_S 10 --phase_shift_T 1 --defL 3000 --defH 12000 --defS 500 --astm 3000 --bfac 100 --resL 20.0 --resH 3.0 --boxsize 1024 --refine_after_EPA 0 --convsize 30 --Href_bfac 50 --do_validation 1$def ul(data): $if data: