# ----------------------------------------------------------------------

Documentation file for the commandline and OpenMP patches to Signature.

Original Signature code is (c) 2005 by James Z. Chen.
Patches are (c) 2009 by Justus Loerke (justus.loerke@charite.de).

Signature and the patches coming with this file are distributed under 
the GPL; please see gpl.txt or http://www.gnu.org/licenses/ for details
of the license.

If you have any bugreports, comments or suggestions concerning the patches, 
please feel free to contact me (justus.loerke@charite.de); I will try to 
fix bugs and incorporate changes as time allows.


1. Installation notes:

Extract the original Signature source code by running 
    "tar xzvf Signature_Install.tar.gz".
This will extract the source into a directory called Signature_Install.
Copy the signature.patches and parser.h files into this directory, then
change into the installation dir and apply changes by running
    "patch -p1 < signature.patches".
Then run 
    "./configure && make && make install" 
with the options appropriate to your local setup (e.g. --prefix options).

Usage of the OpenMP patches will require a threaded FFTW version 
installed. You will have to recompile for threaded FFTWs by using the
"--enable-threads" flag. If not threaded FFTW libs are present, 
compilation of Signature will fail.


2. Usage

Patched Signature is intended to be run from the commandline, but i tried
to keep the original functions intact. There are 3 major modes:

    signature -g 

This will start the regular Signature GUI. No further changes are made to
it.

    signature -b <batchfile>

Batch mode replaces the original "signature <batchfile>" command. Again,
this is not modified and should run as in original Signature.

    signature -c <list of options>

This commandline mode is intended to create all necessary files with 
all options (such as particle size or particle distance) passed in from 
the commandline options. Files will be read in and particles will be 
picked with the specified parameters; only particle coordinates will be 
stored in SPIDER format. Since we do not use all options, only the 
following options are currently implemented:

        -space <space_name> : name of the project space. A project directory
			with the name <space_name>.EMS will be created, as
			with a regular Signature run.
	-film <film_name> :   film name determines the file names contained
			under the project directory; bare filename only, no
			extension.
	-source <mic_name> :  the filename of the micrograph to be processed.
			At this point, only MRC files can be used.
	-template <template_name> : the filename of the particle template to
			be used for correlation searches. Again, only MRC files
			can be used.
	-margin <pix_size> :  a margin of the <pix_size> pixels will be masked 
			around the edges of the micrograph. This is intended
			for CCD data; currently, no mask files can be read,
			since this is done by standard Signature batch mode.
	-resize <factor> :    internal decimation factor to be used.
	-partsize <size> :    particle size in Angstrom
	-partdist <size> :    particle distance in Angstrom
	-pixelsize <size> :   pixel size in Angstrom
	-lcf-thresh <thr> :   the threshold used for local correlation searches


    signature -wisdom <wisdom file> <other options.....>

For threaded FFTW libs, a FFTW wisdom file can be passed in, which may speed
up the FFT searches somewhat; if no wisdom is present, a new one will be 
created with the filename specified.
