====== alifraba ======
alifraba (__ali__gn __fra__mes in __ba__ckground) is a program to align frames acquired from a K2 camera by means of Leginon. The program relies on IMOD routines for the alignment of the frames (//tiltxcorr//, //newstack// and //avgstack//).
===== How it works =====
The program uses an iterative approach to determine the shift to apply to each frame against an average reference, which is refined at each iteration (see documentation on //tiltxcorr// for further details). The result is an average image, obtained either from all the frames or from a subselection of them, as specified by the user (the user can also give a threshold shift such that frames that would need to be corrected for larger values are not included in the average).
==== recovery mechanism ====
Once launched, the program monitors the given input directory and process each new stack of frames that it finds. If no new frames are found in 48 consecutive hours, the program will stop. If the program is stopped or crashes for any reason, it can be relaunched with the same input arguments, and it will only process the frames without an average already calculated.
===== How to launch it =====
The program is installed on the server ''borg'', where the frames are stored, but it can be launched and monitored from the computing server ''phage'', using the following commands:
* **alifraba_launch** (with arguments): launch the program by specifying input and output directories
* **alifraba_check** (without arguments): check if the program is running and retrieve the process id
* **alifraba_kill** (with arguments): kill the program by specifying the process id(s)
===== How to use it =====
The simplest command is
alifraba_launch