Project

General

Profile

What happens to gain/dark references and defects when using Appion makeDDRawFrames.py to align movie frames of direct detectors using motioncorr

Added by Anchi Cheng over 8 years ago

Question from Andrey Malyutin:

I'm curious if you could explain a bit of your alignment procedure. I imagine you use Yifan's algorithm for frame alignment?
If so, does Appion specifies both the dark reference (-fdr) and gain reference (-fgr) during alignment? And do you use
references that have been corrected for defects (*_mod.mrc) or the regular? 

Yes, we do use Motioncorr (or known as dosefgpu_driftcorr in Appion script) from Yifan Cheng's lab in Appion's makeDDRawFrames.py.

Motioncorr or dosefgpu_driftcorr written by Xueming Li can handle dark and gain correction, but not defects. When Appion's makeDDRawFrames.py is run with --align option, it finds out from each image database record whether it needs defect correction, i.e., if there are bad rows, bad columns, or bad pixel marked. If so, the program loads the frame movie frame by frame in a cpu process to perform defect correction after gain/dark correction.

The *_mod.mrc files you find in references folder of the frames directory are spatially transformed references (for flip or rotation) to match the frames, not defect corrected. Defect corrections has to be done on gain/dark corrected frame images, not the references. For example, if there is a dead pixel that always gives 0 counts, Even if we correct the gain reference to have a value of 1, 0*1 is still 0. Defect corrections are done by finding good pixel/row/column round it and then replace the bad values with them.

If there is no defects, then Appion uses both -fdr and -fgr are assigned according to the references used in correcting the original sum image Leginon received to speed up the process.

The alignment uses most default in motioncorr except the ones you specified in myamiweb Appion gui.