aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-09-14 18:21:42 +0200
committerThomas White <taw@physics.org>2023-09-18 13:05:01 +0200
commit4c5d675e9fbc00c27acdf0b1eb3e02d38bee51df (patch)
tree7862d1df8515d374c687c97cc125ef68f87951d8 /doc
parente84f8c67fbeca8d82633287032f8cb2a828f1b1a (diff)
Convert indexamajig(1) manual page to Markdown
Diffstat (limited to 'doc')
-rw-r--r--doc/man/indexamajig.1675
-rw-r--r--doc/man/indexamajig.1.md885
2 files changed, 885 insertions, 675 deletions
diff --git a/doc/man/indexamajig.1 b/doc/man/indexamajig.1
deleted file mode 100644
index 0f35d4d8..00000000
--- a/doc/man/indexamajig.1
+++ /dev/null
@@ -1,675 +0,0 @@
-.\"
-.\" indexamajig man page
-.\"
-.\" Copyright © 2012-2023 Deutsches Elektronen-Synchrotron DESY,
-.\" a research centre of the Helmholtz Association.
-.\"
-.\" Part of CrystFEL - crystallography with a FEL
-.\"
-
-.TH INDEXAMAJIG 1
-.SH NAME
-indexamajig \- bulk indexing and data reduction program
-.SH SYNOPSIS
-.PP
-.BR indexamajig
-\fB-i\fR \fIfilename\fR \fB-o\fR \fIoutput.stream\fR \fB-g\fR \fIdetector.geom\fR \fB--peaks=\fR\fImethod\fR \fB--indexing=\fR\fImethod\fR
-[\fBoptions\fR] \fB...\fR
-.PP
-\fBindexamajig --help\fR
-
-.SH DESCRIPTION
-
-\fBindexamajig\fR takes a list of diffraction snapshots from crystals in random orientations and attempts to find peaks, index and integrate each one. The input is a list of diffraction image files and some auxiliary files and parameters. The output is a long text file ('stream') containing the results from each image in turn.
-
-For minimal basic use, you need to provide the list of diffraction patterns, the method which will be used to index, a file describing the geometry of the detector, and a file which contains the unit cell which will be used for the indexing. Here is what the minimal use might look like on the command line:
-
-.IP \fBindexamajig\fR
-.PD
--i mypatterns.lst -g mygeometry.geom --indexing=mosflm,dirax --peaks=hdf5 -o test.stream -p mycell.pdb
-
-.PP
-More typical use includes all the above, but might also include extra parameters to modify the behaviour. For example, you'll probably want to run more than one indexing job at a time (-j <n>).
-
-See \fBman crystfel_geometry\fR for information about how to create a file describing the detector geometry and beam characteristics.
-
-.SH DIFFRACTION PATTERN LIST
-
-Indexamajig requires an input file with a list of diffraction patterns ("events") to process. In its simplest form, this is just a text files containing a list of image filenames. The image files might be in some folder a long way from the current directory, so you might want to specify a full pathname to be added in front of each filename. The geometry file includes a description of the data layout within the files. Indexamajig uses this description to determine the number of diffraction patterns stored in each file, and tries to process them all. You can also specify explicity which event(s) you would like to process by putting a string describing the event after the file name(s) in this list.
-
-
-.SH PEAK DETECTION
-
-You can control the peak detection on the command line. First, you can choose the peak detection method using \fB--peaks=\fR\fImethod\fR. \fB--peaks=hdf5\fR or \fB--peaks=cxi\fR will take the peak locations from the input file. See the documentation for \fBpeak_list\fR and \fBpeak_list_type\fR in crystfel_geometry(5) for details.
-
-If you use \fB--peaks=zaef\fR, indexamajig will use a simple gradient search after Zaefferer (2000). You can control the overall threshold and minimum squared gradient for finding a peak using \fB--threshold\fR and \fB--min-squared-gradient\fR. The threshold has arbitrary units matching the pixel values in the data, and the minimum gradient has the equivalent squared units. Peaks will be rejected if the 'foot point' is further away from the 'summit' of the peak by more than the inner integration radius (see below). They will also be rejected if the peak is closer than twice the inner integration radius from another peak.
-
-If you instead use \fB--peaks=peakfinder8\fR, indexamajig will use the "peakfinder8" peak finding algorithm describerd in Barty et al. (2014). Pixels above a radius-dependent intensity threshold are considered as candidate peaks (although the user sets an absolute minimum threshold for candidate peaks). Peaks are then only accepted if their signal to noise level over the local background is sufficiently high. Peaks can include multiple pixels and the user can reject a peak if it includes too many or too few. The distance of a peak from the center of the detector can also be used as a filtering criterion. Note that the peakfinder8 will not report more than 2048 peaks for each panel: any additional peak is ignored.
-
-If you instead use \fB--peaks=peakfinder9\fR, indexamajig will use the "peakfinder9" peak finding algorithm described in the master thesis "Real-time image analysis and data compression in high throughput X-ray diffraction experiments" by Gevorkov. Other than peakFinder8, peakFinder9 uses local background estimation based on border pixels in a specified radius (\fB--local-bg-radius\fR). For being fast and precise, a hierarchy of conditions is used. First condition is only useful for speed consideration, it demands that a pixel that is the biggest pixel in a peak must be larger than every border pixel by a constant value (\fB--min-peak-over-neighbour\fR). Second condition ensures, that the pixel passing the previous condition is the highest pixel in the peak. It assumes, that peaks rise monotonically towards the biggest pixel. Third condition ensures, that the biggest pixel in the peak is significantly over the noise level (\fB--min-snr-biggest-pix\fR) by computing the local statistics from the border pixels in a specified radius. Fourth condition sums up all pixels belonging to the peak (\fB--min-snr-peak-pix\fR) and demands that the whole peak must be significantly over the noise level (\fB--min-snr\fR). Only if all conditions are passed, the peak is accepted.
-
-You can suppress peak detection altogether for a panel in the geometry file by specifying the "no_index" value for the panel as non-zero.
-
-
-.SH INDEXING METHODS
-
-You can choose between a variety of indexing methods. You can choose more than one method, in which case each method will be tried in turn until one of them reports that the pattern has been successfully indexed. Choose from:
-
-.IP \fBdirax\fR
-.PD
-Invoke DirAx. See Duisenberg, J. Applied Crystallography 25 (1992) p92, https://doi.org/10.1107/S0021889891010634.
-
-.IP \fBmosflm\fR
-.PD
-Invoke Mosflm. See Powell, Acta Crystallographica D55 (1999) p1690, https://doi.org/10.1107/S0907444999009506.
-
-.IP \fBasdf\fR
-.PD
-This is a implementation of the \fBdirax\fR algorithm, with some very small changes such as using a 1D Fourier transform for finding the lattice repeats. This algorithm is implemented natively within CrystFEL meaning that no external software is required.
-
-.IP \fBfelix\fR
-.PD
-Invoke Felix, which will use your cell parameters to find multiple crystals in each pattern.
-.sp
-The Felix indexer has been developed by Soeren Schmidt <ssch@fysik.dtu.dk>. To use this option, 'Felix' must be in your shell's search path. This can be a link to the latest version of Felix. If you see the Felix version information when you run \fBFelix\fR on the command line, things are set up correctly.
-
-.IP \fBxds\fR
-.PD
-Invoke XDS, and use its REFIDX procedure to attempt to index the pattern.
-
-.IP \fBtaketwo\fR
-.PD
-Use the TakeTwo algorithm. See Ginn et al., Acta Crystallographica D72 (2016), p956, https://doi.org/10.1107/S2059798316010706.
-
-.IP \fBxgandalf\fR
-.PD
-Invoke XGANDALF - eXtended GrAdieNt Descent Algorithm for Lattice Finding. See Gevorkov et al., Acta Crystallographica A75 (2019) p694, https://doi.org/10.1107/S2053273319010593.
-
-.IP \fBpinkIndexer\fR
-.PD
-Invoke pinkIndexer. See Gevorkov et al., Acta Crystallographica A76 (2020) p121, https://doi.org/10.1107/S2053273319015559.
-
-.PP
-Most of the indexing methods require some extra software to be installed, either at the time of compiling CrystFEL or afterwards. CrystFEL is distributed with a script (\fBscripts/install-indexers\fR) which can help you to quickly install all the required programs.
-
-.PP
-You can add one or more of the following to the above indexing methods, to control what information should be provided to them. Note that indexamajig performs a series of checks on the indexing results, including checking that the result is consistent with the target unit cell parameters. To get completely "raw" indexing, you need to disable these checks (see below) \fBand\fR not provide prior information.
-
-.IP \fB-latt\fR
-.PD
-Provide the Bravais lattice type (e.g. the knowledge that the lattice is tetragonal primitive), as prior information to the indexing engine.
-
-.IP \fB-nolatt\fR
-.PD
-The opposite of \fB-latt\fR: do not provide Bravais lattice type information to the indexing engine.
-
-.IP \fB-cell\fR
-.PD
-Provide your unit cell parameters as prior information to the indexing engine.
-
-.IP \fB-nocell\fR
-.PD
-The opposite of \fB-cell\fR: do not provide unit cell parameters as prior information to the indexing engine.
-
-.PP
-Example: \fB--indexing=mosflm-cell-latt\fR means to use Mosflm for indexing, and provide it with unit cell parameters and Bravais lattice type information.
-
-.PP
-If you don't specify any indexing methods, \fBindexamajig\fR will try to automatically determine which indexing methods are available. You can also specify indexing method \fBnone\fR, in which case no indexing will be done. This is useful if you just want to check that the peak detection is working properly.
-
-.PP
-Usually, you do not need to explicitly specify anything more than the indexing method itself (e.g. \fBmosflm\fR or \fBasdf\fR). The default behaviour for all indexing methods is to make the maximum possible use of prior information such as the lattice type and cell parameters. If you do not provide this information, for example if you do not give any unit cell file or if the unit cell file does not contain cell parameters (only lattice type information), the indexing methods you give will be modified accordingly. If you only specify the indexing methods themselves, in most cases \fBindexamajig\fR will do what you want and intuitively expect! However, the options are available if you need finer control.
-
-The indexing results from the indexing engine will be put through a number of refinement and checking stages. See the options \fB--no-check-cell, --no-multi, --no-retry\fR and \fB--no-refine\fR below for more details.
-
-.SH PEAK INTEGRATION
-If the pattern could be successfully indexed, peaks will be predicted in the pattern and their intensities measured. You have a choice of integration methods, and you specify the method using \fB--integration\fR. Choose from:
-
-.IP \fBrings\fR
-.PD
-Use three concentric rings to determine the peak, buffer and background estimation regions. The radius of the smallest circle sets the peak region. The radius of the middle and outer circles describe an annulus from which the background will be estimated. You can set the radii of the rings using \fB--int-radius\fR (see below). The default behaviour with \fBrings\fR is \fBnot\fR to center the peak boxes first. Use \fBrings-cen\fR if you want to use centering.
-
-.IP \fBprof2d\fR
-.PD
-Integrate the peaks using 2D profile fitting with a planar background, close to the method described by Rossmann (1979) J. Appl. Cryst. 12 p225. The default behaviour with \fBprof2d\fR is to center the peak first - use \fBprof2d-nocen\fR to skip this step.
-
-.PP
-You can add one or more of the following to the above integration methods:
-
-.IP \fB-cen\fR
-.PD
-Center the peak boxes iteratively on the actual peak locations. The opposite is \fB-nocen\fR, which is the default.
-
-.IP \fB-sat\fR
-.PD
-Normally, reflections which contain one or more pixels above max_adu (defined in the detector geometry file) will not be integrated and written to the stream. Using this option skips this check, and allows saturated reflections to be passed to the later merging stages. The opposite is \fB-nosat\fR, which is the default for all integration methods. However, note that the saturation check will only be done if max_adu is set in the geometry file. Usually, it's better to exclude saturated reflections at the merging stage. See the documentation for max_adu in crystfel_geometry(5).
-
-.IP \fB-grad\fR
-.PD
-Fit the background around the reflection using gradients in two dimensions. This was the default until version 0.6.1. Without the option (or with its opposite, \fB-nograd\fR, which is the default), the background will be considered to have the same value across the entire integration box, which gives better results in most cases.
-
-.SH BASIC OPTIONS
-.PD 0
-.IP "\fB-i\fR \fIfilename\fR"
-.IP \fB--input=\fR\fIfilename\fR
-.PD
-Read the list of images to process from \fIfilename\fR. \fB--input=-\fR means to read from stdin. There is no default.
-
-.PD 0
-.IP "\fB-o\fR \fIfilename\fR"
-.IP \fB--output=\fR\fIfilename\fR
-.PD
-Write the output data stream to \fIfilename\fR.
-
-.PD 0
-.IP "\fB-g\fR \fIfilename\fR"
-.IP \fB--geometry=\fR\fIfilename\fR
-.PD
-Read the detector geometry description from \fIfilename\fR. See \fBman crystfel_geometry\fR for more information.
-
-.PD 0
-.IP \fB--zmq-input=\fIaddress\fR
-.PD
-Receive data over ZeroMQ from \fIaddress\fR. The options \fB--input\fR and \fB--zmq-input\fR are mutually exclusive - you must specify exactly one of them. Example: \fB--zmq-input=tcp://127.0.0.1:5002\fR.
-.IP
-If you use this option, you should also use either \fB--zmq-subscribe\fR to add a ZeroMQ subscription, or \fB--zmq-request\fR to define how to request data.
-
-.PD 0
-.IP \fB--zmq-subscribe=\fItag\fR
-.PD
-Subscribe to ZeroMQ message type \fItag\fR. You can use this option multiple times to add multiple subscriptions. This option and \fB--zmq-request\fR are mutually exclusive.
-
-.PD 0
-.IP \fB--zmq-request=\fImsg\fR
-.PD
-Request new data over ZeroMQ by sending string \fImsg\fR. This will cause indexamajig's ZeroMQ socket to use REQ mode instead of SUB. This option and \fB--zmq-subscribe\fR are mutually exclusive.
-
-.PD 0
-.IP \fB--asapo-endpoint=\fIendpoint\fR
-.PD
-Receive data via the specified ASAP::O endpoint. This option and \fB--zmq-input\fR are mutually exclusive.
-
-.PD 0
-.IP \fB--asapo-token=\fItoken\fR
-.IP \fB--asapo-beamtime=\fIbeamtime\fR
-.IP \fB--asapo-source=\fIsource\fR
-.IP \fB--asapo-group=\fIgroup\fR
-.IP \fB--asapo-stream=\fIstream\fR
-.PD
-Authentication token, beamtime, data source, consumer group and stream, respectively, for ASAP::O data.
-
-.PD 0
-.IP \fB--asapo-output-stream=\fIstream\fR
-.PD
-Send an output stream via ASAP::O. For non-hits, a small placeholder will be sent.
-
-.PD 0
-.IP \fB--asapo-wait-for-stream
-.PD
-If the ASAP::O stream does not exist, wait for it to be appear. Without this option, indexamajig will exit immediately if the stream is not found.
-
-.PD 0
-.IP \fB--data-format=\fIformat\fR
-.PD
-Specify the data format for data received over ZeroMQ or ASAP::O. Possible values in this version are \fBmsgpack\fR, \fBhdf5\fR and \fBseedee\fR.
-
-.PD 0
-.IP \fB--basename\fR
-.PD
-Remove the directory parts of the filenames taken from the input file. If \fB--prefix\fR or \fB-x\fR is also given, the directory parts of the filename will be removed \fIbefore\fR adding the prefix.
-
-.PD 0
-.IP "\fB-x\fR \fIprefix\fR"
-.IP \fB--prefix=\fR\fIprefix\fR
-.PD
-Prefix the filenames from the input file with \fIprefix\fR. If \fB--basename\fR is also given, the filenames will be prefixed \fIafter\fR removing the directory parts of the filenames.
-
-.PD 0
-.IP "\fB-j\fR \fIn\fR"
-.PD
-Run \fIn\fR analyses in parallel. Default: 1. See also \fB--max-indexer-threads\fR.
-.IP
-Tip: use \fB-j `nproc`\fR (note the backticks) to use as many processes as there are available CPUs.
-
-.PD 0
-.IP \fB--cpu-pin
-.PD
-Pin worker processes to CPUs. Usually this is not needed or desirable, but in some cases it dramatically improves performance.
-
-.PD 0
-.IP \fB--no-check-prefix\fR
-.PD
-Don't attempt to correct the prefix (see \fB--prefix\fR) if it doesn't look correct.
-
-.PD 0
-.IP \fB--highres=\fIn\fR
-.PD
-Mark all pixels on the detector higher than \fIn\fR Angstroms as bad. This might be useful when you have noisy patterns and don't expect any signal above a certain resolution.
-
-.PD 0
-.IP \fB--profile
-.PD
-Display timing data for performance monitoring.
-
-.PD 0
-.IP \fB--temp-dir=\fIpath\fR
-.PD
-Put the temporary folder under \fIpath\fR.
-
-.PD 0
-.IP \fB--wait-for-file=\fIn\fR
-.PD
-Wait at most \fIn\fR seconds for each image file in the input list to be created before trying to process it. This is useful for some automated processing pipelines. It obviously only really works for single-frame files. If a file exists but is not readable when this option is set non-zero, a second attempt will be made after ten seconds. This is to allow for incompletely written files. A value of -1 means to wait forever. The default value is \fB--wait-for-file=0\fR.
-
-.IP \fB--no-image-data\fR
-.PD
-Do not load the actual image data (or bad pixel masks), only the metadata. This allows you to check if patterns can be indexed, without high data bandwidth requirements. Obviously, any feature requiring the image data, especially peak search procedures and integration, cannot be used in this case. Therefore, you'll need to get the peaks from somewhere else (see \fB--peaks=msgpack\fR or \fB--peaks=hdf5\fR).
-
-
-.SH PEAK SEARCH OPTIONS
-.PD 0
-.IP \fB--peaks=\fR\fImethod\fR
-.PD
-Find peaks in the images using \fImethod\fR. See the second titled \fBPEAK DETECTION\fB (above) for more information.
-
-.PD 0
-.IP \fB--peak-radius=\fR\fIinner,middle,outer\fR
-.PD
-Set the inner, middle and outer radii for three-ring integration during the peak search. See the section about \fBPEAK INTEGRATION\fR, above, for details of how to determine
-these. The default is to use the same values as for \fB--int-radius\fR.
-
-.PD 0
-.IP \fB--min-peaks=\fIn\fR
-.PD
-Do not try to index frames with fewer than \fIn\fR peaks. These frames will still be described in the output stream. To exclude them, use \fB--no-non-hits-in-stream\fR. The default is \fB--min-peaks=0\fR, which means that \fIall\fR frames will be considered hits, even if they have no peaks at all.
-
-.PD 0
-.IP \fB--median-filter=\fR\fIn\fR
-.PD
-Apply a median filter with box "radius" \fIn\fR to the image. The median of the values from a \fI(n+1)\fRx\fI(n+1)\fR square centered on the pixel will be subtracted from each pixel. This might help with peak detection if the background is high and/or noisy. The \fIunfiltered\fR image will be used for the final integration of the peaks. If you also use \fB--noise-filter\fR, the median filter will be applied first.
-
-.PD 0
-.IP \fB--filter-noise\fR
-.PD
-Apply a noise filter to the image with checks 3x3 squares of pixels and sets all of them to zero if any of the nine pixels have a negative value. This filter may help with peak detection under certain circumstances. The \fIunfiltered\fR image will be used for the final integration of the peaks, because the filter is destroys a lot of information from the pattern. If you also use \fB--median-filter\fR, the median filter will be applied first.
-
-.PD 0
-.IP \fB--threshold=\fR\fIthres\fR
-.PD
-Set the overall threshold for peak detection using \fB--peaks=zaef\fR or \fB--peaks=peakfinder8\fR to \fIthres\fR, which has the same units as the detector data. The default is \fB--threshold=800\fR.
-
-.PD 0
-.IP \fB--min-squared-gradient=\fR\fIgrad\fR
-.PD
-Set the square of the gradient threshold for peak detection using \fB--peaks=zaef\fR to \fIgrad\fR, which has units of "squared detector units per pixel". The default is \fB--min-squared-gradient=100000\fR. \fB--min-sq-gradient\fR and \fB--min-gradient\fR are synonyms for this option, however the latter should not be used to avoid confusion.
-
-.PD 0
-.IP \fB--min-snr=\fR\fIsnr\fR
-.PD
-Set the minimum I/sigma(I) for peak detection when using \fB--peaks=zaef\fR, \fB--peaks=peakfinder8\fR or \fB--peaks=peakfinder9\fR. The default is \fB--min-snr=5\fR.
-
-.PD 0
-.IP \fB--min-snr-biggest-pix=<n>\fR
-.PD
-(peakFinder9 only) min snr of the biggest pixel in the peak, given as a factor of the standard deviation. Default is 7.0.
-
-.PD 0
-.IP \fB--min-snr-peak-pix=<n>\fR
-.PD
-(peakFinder9 only) min snr of a peak pixel, given as a factor of the standard deviation. Should be smaller or equal to sig_fac_biggest_pix. Default is 6.0.
-
-.PD 0
-.IP \fB--min-sig=<n>\fR
-.PD
-(peakFinder9 only) minimum standard deviation of the background. Prevents finding of peaks in erroneous or highly shadowed unmasked regions. Default is 11.0.
-
-.PD 0
-.IP \fB--min-peak-over-neighbour=<n>\fR
-.PD
-(peakFinder9 only) just for speed. Biggest pixel must be n higher than the pixels in window_radius distance to be a candidate for the biggest pixel in a peak. Should be chosen as a small positive number, a few times smaller than the weakest expected peak. The default is -INFINITY, which turns off the speedup and searches with maximum precision.
-
-.PD 0
-.IP \fB--min-pix-count=\fR\fIcnt\fR
-.PD
-Accepts peaks only if they include more than \fR\fIcnt\fR pixels, when using \fB--peaks=peakfinder8\fR. The default is \fB--min-pix-count=2\fR.
-
-.PD 0
-.IP \fB--max-pix-count=\fR\fIcnt\fR
-.PD
-Accepts peaks only if they include less than \fR\fIcnt\fR pixels, when using \fB--peaks=peakfinder8\fR. The default is \fB--max-pix-count=200\fR.
-
-.PD 0
-.IP \fB--local-bg-radius=\fR\fIr\fR
-.PD
-Radius (in pixels) used for the estimation of the local background when using \fB--peaks=peakfinder8 or --peaks=peakfinder9\fR. The default is \fB--local-bg-radius=3\fR.
-
-.PD 0
-.IP \fB--min-res=\fR\fIpx\fR
-.PD
-Only accept peaks if they lay at more than \fR\fIpx\fR pixels from the center of the detector when using \fB--peaks=peakfinder8\fR. The default is \fB--min-res=0\fR.
-
-.PD 0
-.IP \fB--max-res=\fR\fIpx\fR
-.PD
-Only accept peaks if they lay at less than \fR\fIpx\fR pixels from the center of the detector when using \fB--peaks=peakfinder8\fR. The default is \fB--max-res=1200\fR.
-
-.PD 0
-.IP \fB--no-use-saturated\fR
-.PD
-Normally, peaks which contain one or more pixels above max_adu (defined in the detector geometry file) will be used for indexing (but not used in the final integration - see the section on peak integration above). Using this option causes saturated peaks to be ignored completely. The opposite is \fB--use-saturated\fR, which is the default.
-
-.PD 0
-.IP \fB--no-revalidate\fR
-.PD
-When using \fB--peaks=hdf5\fR, \fB--peaks=cxi\fR or \fB--peaks=msgpack\fR, the peaks will be put through some of the same checks as if you were using \fB--peaks=zaef\fR. These checks reject peaks which are too close to panel edges, are saturated (unless you use \fB--use-saturated\fR), have other nearby peaks (closer than twice the inner integration radius, see \fB--int-radius\fR), or have any part in a bad region. Using this option skips this validation step, and uses the peaks directly.
-
-.PD 0
-.IP \fB--no-half-pixel-shift\fR
-.PD
-CrystFEL considers all peak locations to be distances from the corner of the detector panel, in pixel units, consistent with its description of detector geometry (see 'man crystfel_geometry'). The software which generates the image data files, including Cheetah, may instead consider the peak locations to be pixel indices in the data array. Therefore, the peak coordinates from \fB--peaks=cxi\fR or \fB--peaks=hdf5\fR will by default have 0.5 added to them. This option \fBdisables\fR this half-pixel offset.
-
-.PD 0
-.IP \fB--check-hdf5-snr\fR
-.PD
-With this option with \fB--peaks=hdf5\fR (or \fBcxi\fR or \fBmsgpack\fR), the peaks will additionally be checked to see that they satisfy the minimum SNR specified with \fB--min-snr\fR.
-
-.PD 0
-.IP \fB--peakfinder8-fast\fR
-.PD
-(peakfinder8 only) Increase speed by pre-calculating some coordinate tables.
-
-.SH INDEXING OPTIONS
-.PD 0
-.IP \fB--indexing=\fR\fImethod\fR
-.PD
-Index the patterns using \fImethod\fR. See the section titled \fBINDEXING METHODS\fR (above) for more information. The default is to automatically detect which indexing methods to use.
-
-.PD 0
-.IP "\fB-p\fR \fIunitcell.cell\fR"
-.IP "\fB-p\fR \fIunitcell.pdb\fR"
-.IP \fB--pdb=\fR\fIunitcell.pdb\fR
-.PD
-Specify the name of the file containing unit cell information, in PDB or CrystFEL format.
-
-.PD 0
-.IP \fB--tolerance=\fR\fItol\fR
-.PD
-Set the tolerances for unit cell comparison. \fItol\fR takes the form \fIa\fR,\fIb\fR,\fIc\fR,\fIang\fR. \fIa\fR, \fIb\fR and \fIc\fR are the tolerances, in percent, for the respective \fIreciprocal\fR space axes, and \fIang\fR is the tolerance in degrees for the reciprocal space angles. If the unit cell is centered, the tolerances are applied to the corresponding primitive unit cell.
-.PD
-The default is \fB--tolerance=5,5,5,1.5\fR.
-
-.PD 0
-.IP \fB--no-check-cell
-.PD
-Do not check the cell parameters against the reference unit cell (given with \fB-p\fR). If you've used older versions of CrystFEL, this replaces putting "-raw" in the indexing method.
-
-.PD 0
-.IP \fB--no-check-peaks
-.PD
-Do not check that most of the peaks can be accounted for by the indexing solution. The thresholds for a successful result are influenced by option \fB--multi\fR.
-
-.PD 0
-.IP \fB--multi
-.PD
-Enable the "subtract and retry" method, where after a successful indexing attempt the spots accounted for by the indexing solution are removed before trying to index again in the hope of finding a second lattice. This doesn't have anything to do with the multi-lattice indexing algorithms such as Felix.
-.IP
-This option also adjusts the thresholds for identifying successful indexing results (see \fB--no-check-peaks\fR).
-
-.PD 0
-.IP \fB--no-retry
-.PD
-Disable retry indexing. After an unsuccessful indexing attempt, indexamajig would normally remove the 10% weakest peaks and try again. This option disables that, which makes things much faster but decreases the indexing success rate.
-
-.PD 0
-.IP \fB--no-refine
-.PD
-Skip the prediction refinement step. Usually this will decrease the quality of the results and allow false solutions to get through, but occasionally it might be necessary.
-
-.PD 0
-.IP \fB--wavelength-estimate=\fIm\fR
-.IP \fB--camera-length-estimate=\fIm\fR
-.PD
-Some indexing algorithms need to know the camera length or the wavelength of the incident radiation in advance, e.g. to prepare an internal look-up table. However, if these values are taken from image headers, then they are not available at start-up. In this case, you will be prompted to add one of these options to give approximate values (in metres). A warning will be generated if the actual value differs from this value by more than 10%.
-
-.PD 0
-.IP \fB--max-indexer-threads=\fIn\fR
-.PD
-Some indexing algorithms (e.g. pinkIndexer) can use multiple threads for faster calculations. This is in addition to the frame-based parallelism already available in indexamajig (see \fB-j\fR). This option sets the maximum number of threads that each indexing engine is allowed to use. Default: 1.
-
-.PD 0
-.IP \fB--taketwo-member-threshold=\fIn\fR
-.IP \fB--taketwo-len-tolerance=\fIn\fR
-.IP \fB--taketwo-angle-tolerance=\fIn\fR
-.IP \fB--taketwo-trace-tolerance=\fIn\fR
-.PD
-These set low-level parameters for the TakeTwo indexing algorithm. Respectively, the minimum number of vectors in the network before the pattern is considered indexed, the length and angle tolerances (in reciprocal Angstroms and degrees, respectively) and the rotation matrix angle tolerance (in degrees) for considering rotation matrices as equal.
-.IP
-The defaults are: \fB--taketwo-member-threshold=20\fR, \fB--taketwo-len-tolernace=0.001\fR, \fB--taketwo-angle-tolerance=0.6\fR and \fB--taketwo-trace-tolerance=3\fR.
-
-.PD 0
-.IP \fB--felix-domega=\fIn\fR
-.IP \fB--felix-fraction-max-visits=\fIn\fR
-.IP \fB--felix-max-internal-angle=\fIn\fR
-.IP \fB--felix-max-uniqueness=\fIn\fR
-.IP \fB--felix-min-completeness=\fIn\fR
-.IP \fB--felix-min-visits=\fIn\fR
-.IP \fB--felix-num-voxels=\fIn\fR
-.IP \fB--felix-sigma=\fIn\fR
-.IP \fB--felix-tthrange-max=\fIn\fR
-.IP \fB--felix-tthrange-min=\fIn\fR
-.PD 0
-These set low-level parameters for the Felix indexing algorithm.
-
-.PD 0
-.IP \fB--xgandalf-sampling-pitch=\fIn\fR
-.IP \fB--xgandalf-grad-desc-iterations=\fIn\fR
-.IP \fB--xgandalf-tolerance=\fIn\fR
-.IP \fB--xgandalf-no-deviation-from-provided-cell\fR
-.IP \fB--xgandalf-max-lattice-vector-length=\fIn\fR
-.IP \fB--xgandalf-min-lattice-vector-length=\fIn\fR
-.IP \fB--xgandalf-max-peaks=\fIn\fR
-.IP \fB--xgandalf-fast-execution\fR
-.PD
-These set low-level parameters for the XGANDALF indexing algorithm.
-.IP
-\fB--xgandalf-sampling-pitch\fR selects how dense the reciprocal space is sampled. [0-4]: extremelyLoose to extremelyDense. [5-7]: standardWithSeondaryMillerIndices to extremelyDenseWithSeondaryMillerIndices. Default is 6 (denseWithSeondaryMillerIndices).
-.IP
-\fB--xgandalf-grad-desc-iterations\fR selects how many gradient descent iterations are performed. [0-5]: veryFew to extremelyMany. Default is 4 (manyMany).
-.IP
-\fB--xgandalf-tolerance\fR relative tolerance of the lattice vectors. Default is 0.02.
-.IP
-\fB--xgandalf-no-deviation-from-provided-cell\fR if a prior unit cell was provided, and this flag is set, the found unit cell will have exactly the same size as the provided one.
-.IP
-\fB--xgandalf-min-lattice-vector-length\fR and \fB--xgandalf-min-lattice-vector-length\fR minimum and maximum possible lattice vector lengths (unit is A). Used for fitting without prior lattice as starting point for gradient descent, so the final minimum lattice vector length can be smaller/highier as min/max. Note: This is valid for the uncentered cell, i.e. the P-cell! Default is 30A and 250A respectively.
-.IP
-\fB--xgandalf-max-peaks\fR maximum number of peaks used for indexing. For refinement all peaks are used. Peaks are selected by increasing radius. Limits the maximum execution time for patterns with a huge amount of peaks - either real ones or false positives. Default is 250.
-.IP
-\fB--xgandalf-fast-execution\fR Shortcut to set --xgandalf-sampling-pitch=2 --xgandalf-grad-desc-iterations=3
-
-.PD 0
-.IP \fB--pinkIndexer-considered-peaks-count=\fIn\fR
-.IP \fB--pinkIndexer-angle-resolution=\fIn\fR
-.IP \fB--pinkIndexer-refinement-type=\fIn\fR
-.IP \fB--pinkIndexer-tolerance=\fIn\fR
-.IP \fB--pinkIndexer-reflection-radius=\fIn\fR
-.IP \fB--pinkIndexer-max-resolution-for-indexing=\fIn\fR
-.IP \fB--pinkIndexer-max-refinement-disbalance=\fIn\fR
-
-.PD
-These set low-level parameters for the PinkIndexer indexing algorithm.
-.IP
-\fB--pinkIndexer-considered-peaks-count\fR selects how many peaks are considered for indexing. [0-4] (veryFew to manyMany). Default is 4 (manyMany).
-.IP
-\fB--pinkIndexer-angle-resolution\fR selects how dense the orientation angles of the sample lattice are sampled. [0-4] (extremelyLoose to extremelyDense). Default is 2 (normal).
-.IP
-\fB--pinkIndexer-refinement-type\fR selects the refinement type. 0 = none, 1 = fixedLatticeParameters, 2 = variableLatticeParameters, 3 = firstFixedThenVariableLatticeParameters, 4 = firstFixedThenVariableLatticeParametersMultiSeed, 5 = firstFixedThenVariableLatticeParametersCenterAdjustmentMultiSeed.
-.IP
-\fB--pinkIndexer-tolerance\fR selects the tolerance of the pinkIndexer (relative tolerance of the lattice vectors). Default is 0.06. For bad geometrys or cell parameters use a high tolerance. For a well known geometry and cell use a small tolerance. Only important for refinement and indexed/not indexed identificaton. Too small tolerance will lead to refining to only a fraction of the peaks and possibly discarding of correctly indexed images. Too high tolerance will lead to bad fitting in presence of multiples or noise and can mark wrongly-indexed patterns as indexed.
-.IP
-\fB--pinkIndexer-reflection-radius\fR sets radius of the reflections in reciprocal space in 1/A. Default is 2%% of a* (which works quiet well for X-rays). Should be chosen much bigger for electrons (~0.002).
-.IP
-\fB--pinkIndexer-max-resolution-for-indexing\fR sets the maximum resolution in 1/A used for indexing. Peaks at high resolution don't add much information, but they add a lot of computation time. Default is infinity. Does not influence the refinement.
-.IP
-\fB--pinkIndexer-max-refinement-disbalance\fR Indexing solutions are dismissed if the refinement refined very well to one side of the detector and very badly to the other side. Allowed values range from 0 (no disbalance) to 2 (extreme disbalance), default 0.4. Disbalance after refinement usually appears for bad geometries or bad prior unit cell parameters.
-
-.PD 0
-.IP \fB--asdf-fast
-.PD
-This enables a faster mode of operation for \fIasdf\fR indexing, which is around 3 times faster but only about 7% less successful.
-
-.SH INTEGRATION OPTIONS
-.PD 0
-.IP \fB--integration=\fR\fImethod\fR
-.PD
-Integrate the reflections using \fImethod\fR. See the section titled \fBPEAK INTEGRATION\fR (above) for more information. The default is \fB--integration=rings-nocen\fR.
-
-.PD 0
-.IP \fB--fix-profile-radius=\fIn\fR
-.IP \fB--fix-divergence=\fIn\fR
-.PD
-Fix the beam and crystal paramters to the given values. The profile radius is given in m^-1 and the divergence in radians (full angle). The default is to set the divergence to zero, and then to automatically determine the profile radius.
-.IP
-You do not have to use all three of these options together. For example, if the automatic profile radius determination is not working well for your data set, you could fix that alone and continue using the default values for the other parameters (which might be automatically determined in future versions of CrystFEL, but are not currently).
-
-.PD 0
-.IP \fB--int-radius=\fR\fIinner,middle,outer\fR
-.PD
-Set the inner, middle and outer radii for three-ring integration. See the
-section about \fBPEAK INTEGRATION\fR, above, for details of how to determine
-these. The defaults are probably not appropriate for your situation.
-.PD
-The default is \fB--int-radius=4,5,7\fR.
-
-.PD 0
-.IP \fB--int-diag=\fIcondition\fR
-.PD
-Show detailed information about reflection integration when \fIcondition\fR is met. The \fIcondition\fR can be \fBall\fR, \fBnone\fR, a set of Miller indices separated by commas, \fBrandom\fR, \fBimplausible\fR or \fBnegative\fR. \fBrandom\fR means to show information about a random 1% of the peaks. \fBnegative\fR means to show peaks with intensities which are negative by more than 3 sigma. \fBimplausible\fR means to show peaks with intensities which are negative by more than 5 sigma. \fBstrong\fR means to show peaks with intensities which are positive by more than 3 sigma The default is \fB--int-diag=none\fR.
-
-.PD 0
-.IP \fB--push-res=\fIn\fR
-.PD
-Integrate \fIn\fR nm^-1 higher than the apparent resolution limit of each individual crystal. \fIn\fR can be negative to integrate \fIlower\fR than the apparent resolution limit. The default is \fB--push-res=infinity\fR, which means that no cutoff is applied. Note that you can also apply this cutoff at the merging stage using \fBprocess_hkl/partialator --push-res\fR, which is usually better: reflections which are thrown away at the integration stage cannot be brought back later. However, applying a resolution cutoff during integration will make the stream file significantly smaller and faster to merge.
-
-.PD 0
-.IP \fB--overpredict\fR
-.PD
-Over-predict reflections. This is needed to provide a buffer zone when using post-refinement, but makes it difficult to judge the accuracy of the predictions because there are so many reflections. It will also reduce the quality of the merged data if you merge without partiality estimation.
-
-.PD 0
-.IP \fB--cell-parameters-only\fR
-.PD
-Do not predict reflections at all. Use this option if you're not at all interested in the integrated reflection intensities or even the positions of the reflections. You will still get unit cell parameters, and the process will be much faster, especially for large unit cells.
-
-.SH OUTPUT OPTIONS
-
-.PD 0
-.IP \fB--no-non-hits-in-stream\fR
-.PD
-Completely exclude 'non-hit' frames in the stream. When this option is given, frames with fewer than the number of peaks given to \fB--min-peaks\fR will not have chunks written to the stream at all. Note that the default value for \fB--min-peaks\fR is zero, which means \fIall\fR frames will be written to the stream, even if they have no peaks at all.
-
-.PD 0
-.IP \fB--copy-header=\fR\fIheader\fR
-.PD
-Copy the information from \fR\fIheader\fR in the image file into the output stream. For HDF5 files, \fIheader\fR is interpreted as a path within the file. This option is sometimes useful to allow data to be separated after indexing according to some condition such the presence of an optical pump pulse. You can give this option as many times as you need to copy multiple bits of information.
-.IP
-The old option \fB--copy-hdf5-field\fR is a synonym for this option.
-
-.PD 0
-.IP \fB--no-peaks-in-stream\fR
-.PD
-Do not record peak search results in the stream. You won't be able to check that the peak detection was any good, but the stream will be around 30% smaller.
-
-.PD 0
-.IP \fB--no-refls-in-stream\fR
-.PD
-Do not record integrated reflections in the stream. The resulting output won't be usable for merging, but will be a lot smaller. This option might be useful if you're only interested in things like unit cell parameters and orientations.
-
-.PD 0
-.IP \fB--serial-offset=\fIn\fR
-.PD
-Start the serial numbers in the stream at \fIn\fR instead of 1. Use this if you are splitting an indexing job up into several smaller ones, so that the streams can be concatenated into a single one with consistent numbering. This is important if you use \fBwhirligig\fR.
-
-.PD 0
-.IP \fB--harvest-file=\fIfn\fR
-.PD
-Write a list of parameters to \fIfn\fR, in JSON format. This is intended to be used for harvesting data into a database system. This option has no effect if --serial-offset is set to a number larger than 1, to avoid the file being overwritten multiple times in a batch system.
-
-
-.SH HISTORICAL OPTIONS
-
-.PD 0
-.IP \fB--no-sat-corr\fR
-.PD
-This option is here for historical purposes only, to disable a correction which is done if certain extra information is included in the image data file.
-
-.SH IDENTIFYING SINGLE PATTERNS IN THE INPUT FILE
-
-By default indexamajig processes all diffraction patterns ("events") in each of the data files listed in the input list. It is however, possible, to only process single events in a multi-event file, by adding in the list an event description string after the data filename. The event description always includes a first section with alphanumeric strings separated by forward slashes ("/") and a second section with integer numbers also separated by forward slashes. The two sections are in turn separated by a double forward slash ('//'). Any of the two sections can be empty, but the double forward slash separator must always be present. Indexamajig matches the strings and the numbers in the event description with the event placeholders ('%') present respectively in the 'data' and 'dim' properties defined in the geometry file, and tries to retrieve the full HDF path to the event data and the the its location in a multi-dimensional data space. Consider the following examples:
-
-\fBExample 1:\fR The 'data' and 'dim' properties have been defined like this in the geometry file:
-
-.br
-data = /data/%/rawdata
-.br
-dim0 = ss
-.br
-dim1 = fs
-
-The event list contains the following line:
-.br
-
-filename.h5 event1//
-.br
-
-This identifies an event in the 2-dimensional data block located at /data/event1/rawdata in the HDF5 file called filename.h5.
-
-\fBExample 2:\fR The 'data' and 'dim' properties have been defined like this in the geometry file:
-
-.br
-data = /data/rawdata
-.br
-dim0 = %
-.br
-dim1 = ss
-.br
-dim2 = fs
-
-The event list contains the following line:
-.br
-
-filename.h5 //3
-.br
-
-This identifies an event in the 3-dimensional data block located at /data/rawdata in the HDF5 file called filename.h5, specifically the 2-dimensional data slice defined by the value 3 of the first axis of the data space.
-
-Indexamajig tries to match the alphanumerical strings to the placeholders in the 'dim' property defined in the geometry file. The first string is matched to the first placeholder, the second to
-the second placeholder, and so on. A similar strategy is followed to match integer numbers to the placeholders in the 'dim' property defined in the geometry file.
-For a full explanation of how the internal layout of the data file can be described in the geometry file, please see \fBman crystfel_geometry\fR.
-
-You can use \fBlist_events\fR to prepare a list of each event in one or more input files. Note that you only need to do this if you need to perform some sorting or filtering on this list. If you want to process every event in a file, simply specify the filename in the input file.
-
-.SH AUTHOR
-This page was written by Thomas White, Yaroslav Gevorkov and Valerio Mariani.
-
-.SH REPORTING BUGS
-Report bugs to <taw@physics.org>, or visit <http://www.desy.de/~twhite/crystfel>.
-
-.SH COPYRIGHT AND DISCLAIMER
-Copyright © 2012-2023 Deutsches Elektronen-Synchrotron DESY, a research centre of the Helmholtz Association.
-.P
-indexamajig, and this manual, are part of CrystFEL.
-.P
-CrystFEL is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-.P
-CrystFEL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-.P
-You should have received a copy of the GNU General Public License along with CrystFEL. If not, see <http://www.gnu.org/licenses/>.
-
-.SH SEE ALSO
-.BR crystfel (7),
-.BR crystfel_geometry (5),
-.BR cell_explorer (1),
-.BR process_hkl (1),
-.BR partialator (1),
-.BR list_events (1),
-.BR whirligig (1)
diff --git a/doc/man/indexamajig.1.md b/doc/man/indexamajig.1.md
new file mode 100644
index 00000000..e296839e
--- /dev/null
+++ b/doc/man/indexamajig.1.md
@@ -0,0 +1,885 @@
+% indexamajig(1)
+
+NAME
+====
+
+indexamajig - bulk indexing and data reduction program
+
+
+SYNOPSIS
+========
+
+indexamajig
+-i _filename_ -o _output.stream_ -g _detector.geom_ --peaks=_method_ --indexing=_method_ ...
+
+
+DESCRIPTION
+===========
+
+**indexamajig** takes a list of diffraction snapshots from crystals in random
+orientations and attempts to find peaks, index and integrate each one. The
+input is a list of diffraction image files and some auxiliary files and
+parameters. The output is a long text file ('stream') containing the results
+from each image in turn.
+
+For minimal basic use, you need to provide the list of diffraction patterns,
+the method which will be used to index, a file describing the geometry of the
+detector, and a file which contains the unit cell which will be used for the
+indexing. Here is what the minimal use might look like on the command line:
+
+ indexamajig
+ -i mypatterns.lst
+ -g mygeometry.geom
+ --indexing=xgandalf
+ --peaks=hdf5
+ -p mycell.pdb
+ -o test.stream
+
+More typical use includes all the above, but might also include extra
+parameters to modify the behaviour. For example, you'll probably want to run
+more than one indexing job at a time (-j <n>).
+
+See **man crystfel_geometry** for information about how to create a file
+describing the detector geometry and beam characteristics.
+
+
+DIFFRACTION PATTERN LIST
+========================
+
+Indexamajig requires an input file with a list of diffraction patterns to
+process. In its simplest form, this is just a text files containing a list of
+image filenames. The image files might be in some folder a long way from the
+current directory, so you might want to specify a full pathname to be added in
+front of each filename. The geometry file includes a description of the data
+layout within the files. Indexamajig uses this description to determine the
+number of diffraction patterns stored in each file, and tries to process them
+all. You can also specify explicity which framess you would like to process
+by putting a string describing the frames after the file name(s) in this list.
+
+
+PEAK DETECTION
+==============
+
+You can control the peak detection on the command line. First, you can choose
+the peak detection method using **--peaks=method**. **--peaks=hdf5** or
+**--peaks=cxi** will take the peak locations from the input file. See the
+documentation for peak_list and peak_list_type in **crystfel_geometry**(5) for
+details.
+
+If you use **--peaks=zaef**, indexamajig will use a simple gradient search
+after Zaefferer (2000). You can control the overall threshold and minimum
+squared gradient for finding a peak using **--threshold** and
+**--min-squared-gradient**. The threshold has arbitrary units matching the
+pixel values in the data, and the minimum gradient has the equivalent squared
+units. Peaks will be rejected if the 'foot point' is further away from the
+'summit' of the peak by more than the inner integration radius (see below).
+They will also be rejected if the peak is closer than twice the inner
+integration radius from another peak.
+
+If you instead use **--peaks=peakfinder8**, indexamajig will use the
+"peakfinder8" peak finding algorithm describerd in Barty et al. (2014). Pixels
+above a radius-dependent intensity threshold are considered as candidate peaks
+(although the user sets an absolute minimum threshold for candidate peaks).
+Peaks are then only accepted if their signal to noise level over the local
+background is sufficiently high. Peaks can include multiple pixels and the user
+can reject a peak if it includes too many or too few. The distance of a peak
+from the center of the detector can also be used as a filtering criterion. Note
+that the peakfinder8 will not report more than 2048 peaks for each panel: any
+additional peak is ignored.
+
+If you instead use **--peaks=peakfinder9**, indexamajig will use the
+"peakfinder9" peak finding algorithm described in the master thesis "Real-time
+image analysis and data compression in high throughput X-ray diffraction
+experiments" by Gevorkov. Other than peakFinder8, peakFinder9 uses local
+background estimation based on border pixels in a specified radius
+(**--local-bg-radius**). For being fast and precise, a hierarchy of
+conditions is used. First condition is only useful for speed consideration, it
+demands that a pixel that is the biggest pixel in a peak must be larger than
+every border pixel by a constant value (**--min-peak-over-neighbour**).
+Second condition ensures, that the pixel passing the previous condition is the
+highest pixel in the peak. It assumes, that peaks rise monotonically towards
+the biggest pixel. Third condition ensures, that the biggest pixel in the peak
+is significantly over the noise level (**--min-snr-biggest-pix**) by
+computing the local statistics from the border pixels in a specified radius.
+Fourth condition sums up all pixels belonging to the peak
+(**--min-snr-peak-pix**) and demands that the whole peak must be
+significantly over the noise level (**--min-snr**). Only if all conditions
+are passed, the peak is accepted.
+
+
+INDEXING METHODS
+================
+
+You can choose between a variety of indexing methods. You can choose more than
+one method, in which case each method will be tried in turn until one of them
+reports that the pattern has been successfully indexed. Choose from:
+
+**dirax**
+: Invoke DirAx. See Duisenberg, J. Applied Crystallography 25 (1992) p92,
+: https://doi.org/10.1107/S0021889891010634.
+
+**mosflm**
+: Invoke Mosflm. See Powell, Acta Crystallographica D55 (1999) p1690,
+: https://doi.org/10.1107/S0907444999009506.
+
+**asdf**
+: This is a implementation of the dirax algorithm, with some very small changes
+: such as using a 1D Fourier transform for finding the lattice repeats. This
+: algorithm is implemented natively within CrystFEL meaning that no external
+: software is required.
+
+**felix**
+: Invoke Felix, which will use your cell parameters to find multiple crystals in
+: each pattern.
+:
+: The Felix indexer has been developed by Soeren Schmidt <ssch@fysik.dtu.dk>. To
+: use this option, 'Felix' must be in your shell's search path. This can be a
+: link to the latest version of Felix. If you see the Felix version information
+: when you run Felix on the command line, things are set up correctly.
+
+**xds**
+: Invoke XDS, and use its REFIDX procedure to attempt to index the pattern.
+
+**taketwo**
+: Use the TakeTwo algorithm. See Ginn et al., Acta Crystallographica D72
+(2016), p956, https://doi.org/10.1107/S2059798316010706.
+
+**xgandalf**
+: Invoke XGANDALF - eXtended GrAdieNt Descent Algorithm for Lattice Finding.
+: See Gevorkov et al., Acta Crystallographica A75 (2019) p694,
+: https://doi.org/10.1107/S2053273319010593.
+
+**pinkIndexer**
+: Invoke pinkIndexer. See Gevorkov et al., Acta Crystallographica A76 (2020)
+: p121, https://doi.org/10.1107/S2053273319015559.
+
+Most of the indexing methods require some extra software to be installed,
+either at the time of compiling CrystFEL or afterwards. CrystFEL is
+distributed with a script (scripts/install-indexers) which can help you to
+quickly install all the required programs.
+
+You can add one or more of the following to the above indexing methods, to
+control what information should be provided to them. Note that indexamajig
+performs a series of checks on the indexing results, including checking that
+the result is consistent with the target unit cell parameters. To get
+completely "raw" indexing, you need to disable these checks (see below) and not
+provide prior information.
+
+**-latt**
+: Provide the Bravais lattice type (e.g. the knowledge that the lattice is
+: tetragonal primitive), as prior information to the indexing engine.
+
+**-nolatt**
+: The opposite of -latt: do not provide Bravais lattice type information to the
+: indexing engine.
+
+**-cell**
+: Provide your unit cell parameters as prior information to the indexing
+: engine.
+
+**-nocell**
+: The opposite of -cell: do not provide unit cell parameters as prior information
+: to the indexing engine.
+
+Example: **--indexing=mosflm-cell-latt** means to use Mosflm for indexing, and
+provide it with unit cell parameters and Bravais lattice type information.
+
+If you don't specify any indexing methods, indexamajig will try to
+automatically determine which indexing methods are available. You can also
+specify indexing method none, in which case no indexing will be done. This is
+useful if you just want to check that the peak detection is working properly.
+
+Usually, you do not need to explicitly specify anything more than the indexing
+method itself (e.g. mosflm or asdf). The default behaviour for all indexing
+methods is to make the maximum possible use of prior information such as the
+lattice type and cell parameters. If you do not provide this information, for
+example if you do not give any unit cell file or if the unit cell file does not
+contain cell parameters (only lattice type information), the indexing methods
+you give will be modified accordingly. If you only specify the indexing
+methods themselves, in most cases indexamajig will do what you want and
+intuitively expect! However, the options are available if you need finer
+control.
+
+The indexing results from the indexing engine will be put through a number of
+refinement and checking stages. See the options **--no-check-cell**,
+**--no-multi**, **--no-retry** and **--no-refine** below for more details.
+
+
+PEAK INTEGRATION
+================
+
+If the pattern could be successfully indexed, peaks will be predicted in the
+pattern and their intensities measured. You have a choice of integration
+methods, and you specify the method using **--integration**. Choose from:
+
+**rings**
+: Use three concentric rings to determine the peak, buffer and background
+: estimation regions. The radius of the smallest circle sets the peak region.
+: The radius of the middle and outer circles describe an annulus from which the
+: background will be estimated. You can set the radii of the rings using
+: **--int-radius** (see below). The default behaviour with rings is not to
+: center the peak boxes first. Use rings-cen if you want to use centering.
+
+**prof2d**
+: Integrate the peaks using 2D profile fitting with a planar background, close to
+: the method described by Rossmann (1979) J. Appl. Cryst. 12 p225. The default
+: behaviour with prof2d is to center the peak first - use prof2d-nocen to skip
+: this step.
+
+You can add one or more of the following to the above integration methods:
+
+**-cen**
+: Center the peak boxes iteratively on the actual peak locations. The opposite
+: is -nocen, which is the default.
+
+**-sat**
+: Normally, reflections which contain one or more pixels above max_adu (defined
+: in the detector geometry file) will not be integrated and written to the
+: stream. Using this option skips this check, and allows saturated reflections
+: to be passed to the later merging stages. The opposite is -nosat, which is the
+: default for all integration methods. However, note that the saturation check
+: will only be done if max_adu is set in the geometry file. Usually, it's better
+: to exclude saturated reflections at the merging stage. See the documentation
+: for max_adu in crystfel_geometry(5).
+
+**-grad**
+: Fit the background around the reflection using gradients in two dimensions.
+: This was the default until version 0.6.1. Without the option (or with its
+: opposite, -nograd, which is the default), the background will be considered to
+: have the same value across the entire integration box, which gives better
+: results in most cases.
+
+
+BASIC OPTIONS
+-------------
+
+**-i filename**, **--input=filename**
+: Read the list of images to process from filename. **--input=-** means to
+: read from stdin. There is no default.
+
+**-o filename**, **--output=filename**
+: Write the output data stream to filename.
+
+**-g filename**, **--geometry=filename**
+: Read the detector geometry description from _filename_. See **man
+: crystfel_geometry** for more information.
+
+: **--zmq-input=address**
+: Receive data over ZeroMQ from address. The options **--input** and
+: **--zmq-input** are mutually exclusive - you must specify exactly one of
+: them. Example: **--zmq-input=tcp://127.0.0.1:5002**.
+: If you use this option, you should also use either **--zmq-subscribe** to add
+: a ZeroMQ subscription, or **--zmq-request** to define how to request data.
+
+**--zmq-subscribe=tag**
+: Subscribe to ZeroMQ message type tag. You can use this option multiple times
+: to add multiple subscriptions. This option and **--zmq-request** are mutually
+: exclusive.
+
+**--zmq-request=msg**
+: Request new data over ZeroMQ by sending string msg. This will cause
+: indexamajig's ZeroMQ socket to use REQ mode instead of SUB. This option and
+: **--zmq-subscribe** are mutually exclusive.
+
+**--asapo-endpoint=endpoint**
+: Receive data via the specified ASAP::O endpoint. This option and **--zmq-input**
+: are mutually exclusive.
+
+**--asapo-token=token**
+: Authentication token for ASAP::O data.
+
+**--asapo-beamtime=beamtime**
+: Beamtime ID for ASAP::O data.
+
+**--asapo-source=source**
+: Data source for ASAP::O data.
+
+**--asapo-group=group**
+: Consumer group name for ASAP::O data. Concurrent **indexamajig** processes
+: working on the same data should use the same value for this, to have the
+: data shared between them.
+
+**--asapo-stream=stream**
+: Stream name for ASAP::O data.
+
+**--asapo-output-stream=stream**
+: Send an output stream via ASAP::O. For non-hits, a small placeholder will be
+: sent.
+
+**--asapo-wait-for-stream**
+: If the ASAP::O stream does not exist, wait for it to be appear. Without this
+: option, indexamajig will exit immediately if the stream is not found.
+
+**--data-format=format**
+: Specify the data format for data received over ZeroMQ or ASAP::O. Possible
+: values in this version are msgpack, hdf5 and seedee.
+
+**--basename**
+: Remove the directory parts of the filenames taken from the input file. If
+: **--prefix** or -x is also given, the directory parts of the filename will be
+: removed before adding the prefix.
+
+**-x prefix**, **--prefix=prefix**
+: Prefix the filenames from the input file with prefix. If **--basename** is also
+: given, the filenames will be prefixed after removing the directory parts of the
+: filenames.
+
+**-j n**
+: Run n analyses in parallel. Default: 1. See also **--max-indexer-threads.**
+: Tip: use -j `nproc` (note the backticks) to use as many processes as there
+: are available CPUs.
+
+**--cpu-pin**
+: Pin worker processes to CPUs. Usually this is not needed or desirable, but in
+: some cases it dramatically improves performance.
+
+**--no-check-prefix**
+: Don't attempt to correct the prefix (see **--prefix**) if it doesn't look correct.
+
+**--highres=n**
+: Mark all pixels on the detector higher than n Angstroms as bad. This might be
+: useful when you have noisy patterns and don't expect any signal above a certain
+: resolution.
+
+**--profile**
+: Display timing data for performance monitoring.
+
+**--temp-dir=path**
+: Put the temporary folder under path.
+
+**--wait-for-file=n**
+: Wait at most n seconds for each image file in the input list to be created
+: before trying to process it. This is useful for some automated processing
+: pipelines. It obviously only really works for single-frame files. If a file
+: exists but is not readable when this option is set non-zero, a second attempt
+: will be made after ten seconds. This is to allow for incompletely written
+: files. A value of -1 means to wait forever. The default value is
+: **--wait-for-file=0**.
+
+**--no-image-data**
+: Do not load the actual image data (or bad pixel masks), only the metadata.
+: This allows you to check if patterns can be indexed, without high data
+: bandwidth requirements. Obviously, any feature requiring the image data,
+: especially peak search procedures and integration, cannot be used in this case.
+: Therefore, you'll need to get the peaks from somewhere else (see
+: **--peaks=msgpack** or **--peaks=hdf5**).
+
+
+PEAK SEARCH OPTIONS
+-------------------
+
+**--peaks=method**
+: Find peaks in the images using method. See the second titled PEAK DETECTION
+: (above) for more information.
+
+**--peak-radius=inner,middle,outer**
+: Set the inner, middle and outer radii for three-ring integration during the
+: peak search. See the section about PEAK INTEGRATION, above, for details of how
+: to determine
+: these. The default is to use the same values as for **--int-radius**.
+
+**--min-peaks=n**
+: Do not try to index frames with fewer than n peaks. These frames will still be
+: described in the output stream. To exclude them, use **--no-non-hits-in-stream**.
+: The default is **--min-peaks=0**, which means that all frames will be considered
+: hits, even if they have no peaks at all.
+
+**--median-filter=n**
+: Apply a median filter with box "radius" n to the image. The median of the
+: values from a (n+1)x(n+1) square centered on the pixel will be subtracted from
+: each pixel. This might help with peak detection if the background is high
+: and/or noisy. The unfiltered image will be used for the final integration of
+: the peaks. If you also use **--noise-filter**, the median filter will be applied
+: first.
+
+**--filter-noise**
+: Apply a noise filter to the image with checks 3x3 squares of pixels and sets
+: all of them to zero if any of the nine pixels have a negative value. This
+: filter may help with peak detection under certain circumstances. The
+: unfiltered image will be used for the final integration of the peaks, because
+: the filter is destroys a lot of information from the pattern. If you also use
+: **--median-filter**, the median filter will be applied first.
+
+**--threshold=thres**
+: Set the overall threshold for peak detection using **--peaks=zaef** or
+: **--peaks=peakfinder8** to thres, which has the same units as the detector data.
+: The default is **--threshold=800**.
+
+**--min-squared-gradient=grad**
+: Set the square of the gradient threshold for peak detection using **--peaks=zaef**
+: to grad, which has units of "squared detector units per pixel". The default is
+: **--min-squared-gradient=100000**. **--min-sq-gradient** and **--min-gradient** are
+: synonyms for this option, however the latter should not be used to avoid
+: confusion.
+
+**--min-snr=snr**
+: Set the minimum I/sigma(I) for peak detection when using **--peaks=zaef**,
+: **--peaks=peakfinder8** or **--peaks=peakfinder9.** The default is **--min-snr=5**.
+
+**--min-snr-biggest-pix=<n>**
+: (peakFinder9 only) min snr of the biggest pixel in the peak, given as a factor
+: of the standard deviation. Default is 7.0.
+
+**--min-snr-peak-pix=<n>**
+: (peakFinder9 only) min snr of a peak pixel, given as a factor of the standard
+: deviation. Should be smaller or equal to sig_fac_biggest_pix. Default is 6.0.
+
+**--min-sig=<n>**
+: (peakFinder9 only) minimum standard deviation of the background. Prevents
+: finding of peaks in erroneous or highly shadowed unmasked regions. Default is
+: 11.0.
+
+**--min-peak-over-neighbour=<n>**
+: (peakFinder9 only) just for speed. Biggest pixel must be n higher than the
+: pixels in window_radius distance to be a candidate for the biggest pixel in a
+: peak. Should be chosen as a small positive number, a few times smaller than the
+: weakest expected peak. The default is -INFINITY, which turns off the speedup
+: and searches with maximum precision.
+
+**--min-pix-count=cnt**
+: Accepts peaks only if they include more than cnt pixels, when using
+: --peaks=peakfinder8. The default is **--min-pix-count=2**.
+
+**--max-pix-count=cnt**
+: Accepts peaks only if they include less than cnt pixels, when using
+: **--peaks=peakfinder8**. The default is **--max-pix-count=200**.
+
+**--local-bg-radius=r**
+: Radius (in pixels) used for the estimation of the local background when using
+: **--peaks=peakfinder8** or **--peaks=peakfinder9**. The default is
+: **--local-bg-radius=3**.
+
+**--min-res=px**
+: Only accept peaks if they lay at more than px pixels from the center of the
+: detector when using **--peaks=peakfinder8**. The default is **--min-res=0**.
+
+**--max-res=px**
+: Only accept peaks if they lay at less than px pixels from the center of the
+: detector when using **--peaks=peakfinder8**. The default is **--max-res=1200**.
+
+**--no-use-saturated**
+: Normally, peaks which contain one or more pixels above max_adu (defined in the
+: detector geometry file) will be used for indexing (but not used in the final
+: integration - see the section on peak integration above). Using this option
+: causes saturated peaks to be ignored completely. The opposite is
+: **--use-saturated**, which is the default.
+
+**--no-revalidate**
+: When using **--peaks=hdf5**, **--peaks=cxi** or **--peaks=msgpack**, the peaks will be put
+: through some of the same checks as if you were using **--peaks=zaef**. These
+: checks reject peaks which are too close to panel edges, are saturated (unless
+: you use **--use-saturated**), have other nearby peaks (closer than twice the inner
+: integration radius, see **--int-radius**), or have any part in a bad region. Using
+: this option skips this validation step, and uses the peaks directly.
+
+**--no-half-pixel-shift**
+: CrystFEL considers all peak locations to be distances from the corner of the
+: detector panel, in pixel units, consistent with its description of detector
+: geometry (see 'man crystfel_geometry'). The software which generates the image
+: data files, including Cheetah, may instead consider the peak locations to be
+: pixel indices in the data array. Therefore, the peak coordinates from
+: **--peaks=cxi** or **--peaks=hdf5** will by default have 0.5 added to them. This
+: option disables this half-pixel offset.
+
+**--check-hdf5-snr**
+: With this option with **--peaks=hdf5** (or cxi or msgpack), the peaks will
+: additionally be checked to see that they satisfy the minimum SNR specified with
+: **--min-snr**.
+
+**--peakfinder8-fast**
+: (peakfinder8 only) Increase speed by pre-calculating some coordinate tables.
+
+
+INDEXING OPTIONS
+----------------
+
+**--indexing=method**
+: Index the patterns using method. See the section titled INDEXING METHODS
+: (above) for more information. The default is to automatically detect which
+: indexing methods to use.
+
+**-p unitcell.cell**, **-p unitcell.pdb**, **--pdb=unitcell.pdb**
+: Specify the name of the file containing unit cell information, in PDB or
+: CrystFEL format.
+
+**--tolerance=tol**
+: Set the tolerances for unit cell comparison. tol takes the form a,b,c,ang. a,
+: b and c are the tolerances, in percent, for the respective reciprocal space
+: axes, and ang is the tolerance in degrees for the reciprocal space angles. If
+: the unit cell is centered, the tolerances are applied to the corresponding
+: primitive unit cell. The default is **--tolerance=5,5,5,1.5**.
+
+**--no-check-cell**
+: Do not check the cell parameters against the reference unit cell (given with
+: -p). If you've used older versions of CrystFEL, this replaces putting "-raw"
+: in the indexing method.
+
+**--no-check-peaks**
+: Do not check that most of the peaks can be accounted for by the indexing
+: solution. The thresholds for a successful result are influenced by option
+: --multi.
+
+**--multi**
+: Enable the "subtract and retry" method, where after a successful indexing
+: attempt the spots accounted for by the indexing solution are removed before
+: trying to index again in the hope of finding a second lattice. This doesn't
+: have anything to do with the multi-lattice indexing algorithms such as Felix.
+: This option also adjusts the thresholds for identifying successful indexing
+: results (see **--no-check-peaks**).
+
+**--no-retry**
+: Disable retry indexing. After an unsuccessful indexing attempt, indexamajig
+: would normally remove the 10% weakest peaks and try again. This option
+: disables that, which makes things much faster but decreases the indexing
+: success rate.
+
+**--no-refine**
+: Skip the prediction refinement step. Usually this will decrease the quality of
+: the results and allow false solutions to get through, but occasionally it might
+: be necessary.
+
+**--wavelength-estimate=m** **--camera-length-estimate=m**
+: Some indexing algorithms need to know the camera length or the wavelength of
+: the incident radiation in advance, e.g. to prepare an internal look-up table.
+: However, if these values are taken from image headers, then they are not
+: available at start-up. In this case, you will be prompted to add one of these
+: options to give approximate values (in metres). A warning will be generated if
+: the actual value differs from this value by more than 10%.
+
+**--max-indexer-threads=n**
+: Some indexing algorithms (e.g. pinkIndexer) can use multiple threads for faster
+: calculations. This is in addition to the frame-based parallelism already
+: available in indexamajig (see -j). This option sets the maximum number of
+: threads that each indexing engine is allowed to use. Default: 1.
+
+**--taketwo-member-threshold=n**
+: Minimum number of vectors in the network before the pattern is considered
+: indexed. Default 20.
+
+**--taketwo-len-tolerance=n**
+: The length tolerance in reciprocal Angstroms. Default 0.001.
+
+**--taketwo-angle-tolerance=n**
+: The angle tolerance in degrees. Default 0.6.
+
+**--taketwo-trace-tolerance=n**
+: The rotation matrix trace tolerance in degrees. Default 3.
+
+**--felix-domega=n**
+: Low-level parameter for the Felix indexing algorithm.
+
+**--felix-fraction-max-visits=n**
+: Low-level parameter for the Felix indexing algorithm.
+
+**--felix-max-internal-angle=n**
+: Low-level parameter for the Felix indexing algorithm.
+
+**--felix-max-uniqueness=n**
+: Low-level parameter for the Felix indexing algorithm.
+
+**--felix-min-completeness=n**
+: Low-level parameter for the Felix indexing algorithm.
+
+**--felix-min-visits=n**
+: Low-level parameter for the Felix indexing algorithm.
+
+**--felix-num-voxels=n**
+: Low-level parameter for the Felix indexing algorithm.
+
+**--felix-sigma=n**
+: Low-level parameter for the Felix indexing algorithm.
+
+**--felix-tthrange-max=n**
+: Low-level parameter for the Felix indexing algorithm.
+
+**--felix-tthrange-min=n**
+: Low-level parameter for the Felix indexing algorithm.
+
+**--xgandalf-sampling-pitch=n**
+: Selects how dense the reciprocal space is sampled. [0-4]: extremelyLoose to
+: extremelyDense. [5-7]: standardWithSeondaryMillerIndices to
+: extremelyDenseWithSeondaryMillerIndices. Default is 6
+: (denseWithSeondaryMillerIndices).
+
+**--xgandalf-grad-desc-iterations**
+: Selects how many gradient descent iterations are performed. [0-5]: veryFew to
+: extremelyMany. Default is 4 (manyMany).
+
+**--xgandalf-tolerance**
+: relative tolerance of the lattice vectors. Default is 0.02.
+
+**--xgandalf-no-deviation-from-provided-cell**
+: If a prior unit cell was provided, and this flag is set, the found unit cell
+: will have exactly the same size as the provided one.
+
+**--xgandalf-min-lattice-vector-length** **--xgandalf-min-lattice-vector-length**
+: Minimum and maximum possible lattice vector lengths (unit is A). Used for
+: fitting without prior lattice as starting point for gradient descent, so the
+: final minimum lattice vector length can be smaller/highier as min/max. Note:
+: This is valid for the uncentered cell, i.e. the P-cell! Default is 30A and 250A
+: respectively.
+
+**--xgandalf-max-peaks**
+: Maximum number of peaks used for indexing. For refinement all peaks are used.
+: Peaks are selected by increasing radius. Limits the maximum execution time for
+: Patterns with a huge amount of peaks - either real ones or false positives.
+: Default is 250.
+
+**--xgandalf-fast-execution**
+: Shortcut to set **--xgandalf-sampling-pitch=2 --xgandalf-grad-desc-iterations=3**.
+
+**--pinkIndexer-considered-peaks-count**
+: Selects how many peaks are considered for indexing. [0-4] (veryFew to
+: manyMany). Default is 4 (manyMany).
+
+**--pinkIndexer-angle-resolution**
+: Selects how dense the orientation angles of the sample lattice are sampled.
+: [0-4] (extremelyLoose to extremelyDense). Default is 2 (normal).
+
+**--pinkIndexer-refinement-type**
+: Selects the refinement type. 0 = none, 1 = fixedLatticeParameters, 2 =
+: variableLatticeParameters, 3 = firstFixedThenVariableLatticeParameters, 4 =
+: firstFixedThenVariableLatticeParametersMultiSeed, 5 =
+: firstFixedThenVariableLatticeParametersCenterAdjustmentMultiSeed.
+
+**--pinkIndexer-tolerance**
+: Selects the tolerance of the pinkIndexer (relative tolerance of the lattice
+: vectors). Default is 0.06. For bad geometrys or cell parameters use a high
+: tolerance. For a well known geometry and cell use a small tolerance. Only
+: important for refinement and indexed/not indexed identificaton. Too small
+: tolerance will lead to refining to only a fraction of the peaks and possibly
+: discarding of correctly indexed images. Too high tolerance will lead to bad
+: Fitting in presence of multiples or noise and can mark wrongly-indexed patterns
+: as indexed.
+
+**--pinkIndexer-reflection-radius**
+: Sets radius of the reflections in reciprocal space in 1/A. Default is 2%% of a*
+: (which works quiet well for X-rays). Should be chosen much bigger for electrons
+: (~0.002).
+
+**--pinkIndexer-max-resolution-for-indexing**
+: Sets the maximum resolution in 1/A used for indexing. Peaks at high resolution
+: Don't add much information, but they add a lot of computation time. Default is
+: infinity. Does not influence the refinement.
+
+**--pinkIndexer-max-refinement-disbalance**
+: Indexing solutions are dismissed if the refinement refined very well to one
+: side of the detector and very badly to the other side. Allowed values range
+: from 0 (no disbalance) to 2 (extreme disbalance), default 0.4. Disbalance after
+: Refinement usually appears for bad geometries or bad prior unit cell
+: parameters.
+
+**--asdf-fast**
+: This enables a faster mode of operation for asdf indexing, which is around 3
+: times faster but only about 7% less successful.
+
+
+INTEGRATION OPTIONS
+-------------------
+
+**--integration=method**
+: Integrate the reflections using method. See the section titled PEAK
+: INTEGRATION (above) for more information. The default is
+: **--integration=rings-nocen**.
+
+**--fix-profile-radius=n**, **--fix-divergence=n**
+: Fix the beam and crystal paramters to the given values. The profile radius is
+: given in m^-1 and the divergence in radians (full angle). The default is to
+: set the divergence to zero, and then to automatically determine the profile
+: radius.
+: You do not have to use all three of these options together. For example, if
+: the automatic profile radius determination is not working well for your data
+: set, you could fix that alone and continue using the default values for the
+: other parameters (which might be automatically determined in future versions of
+: CrystFEL, but are not currently).
+
+**--int-radius=inner,middle,outer**
+: Set the inner, middle and outer radii for three-ring integration. See the
+: section about PEAK INTEGRATION, above, for details of how to determine
+: these. The defaults are probably not appropriate for your situation.
+: The default is **--int-radius=4,5,7**.
+
+**--int-diag=condition**
+: Show detailed information about reflection integration when condition is met.
+: The condition can be all, none, a set of Miller indices separated by commas,
+: random, implausible or negative. random means to show information about a
+: random 1% of the peaks. negative means to show peaks with intensities which
+: are negative by more than 3 sigma. implausible means to show peaks with
+: intensities which are negative by more than 5 sigma. strong means to show
+: peaks with intensities which are positive by more than 3 sigma The default is
+: **--int-diag=none**.
+
+**--push-res=n**
+: Integrate n nm^-1 higher than the apparent resolution limit of each individual
+: crystal. n can be negative to integrate lower than the apparent resolution
+: limit. The default is --push-res=infinity, which means that no cutoff is
+: applied. Note that you can also apply this cutoff at the merging stage using
+: **process_hkl/partialator --push-res**, which is usually better: reflections
+: which are thrown away at the integration stage cannot be brought back later.
+: However, applying a resolution cutoff during integration will make the stream
+: file significantly smaller and faster to merge.
+
+**--overpredict**
+: Over-predict reflections. This is needed to provide a buffer zone when using
+: post-refinement, but makes it difficult to judge the accuracy of the
+: predictions because there are so many reflections. It will also reduce the
+: quality of the merged data if you merge without partiality estimation.
+
+**--cell-parameters-only**
+: Do not predict reflections at all. Use this option if you're not at all
+: interested in the integrated reflection intensities or even the positions of
+: the reflections. You will still get unit cell parameters, and the process will
+: be much faster, especially for large unit cells.
+
+OUTPUT OPTIONS
+--------------
+
+**--no-non-hits-in-stream**
+: Completely exclude 'non-hit' frames in the stream. When this option is given,
+: frames with fewer than the number of peaks given to **--min-peaks** will not
+: have chunks written to the stream at all. Note that the default value for
+: **--min-peaks** is zero, which means all frames will be written to the stream,
+: even if they have no peaks at all.
+
+**--copy-header=header**
+: Copy the information from header in the image file into the output stream. For
+: HDF5 files, header is interpreted as a path within the file. This option is
+: sometimes useful to allow data to be separated after indexing according to some
+: condition such the presence of an optical pump pulse. You can give this option
+: as many times as you need to copy multiple bits of information.
+: The old option **--copy-hdf5-field** is a synonym for this option.
+
+**--no-peaks-in-stream**
+: Do not record peak search results in the stream. You won't be able to check
+: that the peak detection was any good, but the stream will be around 30%
+: smaller.
+
+**--no-refls-in-stream**
+: Do not record integrated reflections in the stream. The resulting output won't
+: be usable for merging, but will be a lot smaller. This option might be useful
+: if you're only interested in things like unit cell parameters and orientations.
+
+**--serial-offset=n**
+: Start the serial numbers in the stream at n instead of 1. Use this if you are
+: splitting an indexing job up into several smaller ones, so that the streams can
+: be concatenated into a single one with consistent numbering. This is important
+: if you use **whirligig**.
+
+**--harvest-file=fn**
+: Write a list of parameters to fn, in JSON format. This is intended to be used
+: for harvesting data into a database system. This option has no effect if
+: --serial-offset is set to a number larger than 1, to avoid the file being
+: overwritten multiple times in a batch system.
+
+
+HISTORICAL OPTIONS
+------------------
+
+**--no-sat-corr**
+: This option is here for historical purposes only, to disable a correction which
+: is done if certain extra information is included in the image data file.
+
+
+IDENTIFYING SINGLE PATTERNS IN THE INPUT FILE
+=============================================
+
+By default indexamajig processes all diffraction patterns ("events") in each of
+the data files listed in the input list. It is however, possible, to only
+process single events in a multi-event file, by adding in the list an event
+description string after the data filename. The event description always
+includes a first section with alphanumeric strings separated by forward slashes
+("/") and a second section with integer numbers also separated by forward
+slashes. The two sections are in turn separated by a double forward slash
+('//'). Any of the two sections can be empty, but the double forward slash
+separator must always be present. Indexamajig matches the strings and the
+numbers in the event description with the event placeholders ('%') present
+respectively in the 'data' and 'dim' properties defined in the geometry file,
+and tries to retrieve the full HDF path to the event data and the the its
+location in a multi-dimensional data space. Consider the following examples:
+
+### Example 1
+
+The 'data' and 'dim' properties have been defined like this in the geometry file:
+
+ data = /data/%/rawdata
+ dim0 = ss
+ dim1 = fs
+
+The event list contains the following line:
+
+ filename.h5 event1//
+
+This identifies an event in the 2-dimensional data block located at
+/data/event1/rawdata in the HDF5 file called filename.h5.
+
+### Example 2
+
+The 'data' and 'dim' properties have been defined like this in the geometry
+file:
+
+ data = /data/rawdata
+ dim0 = %
+ dim1 = ss
+ dim2 = fs
+
+The event list contains the following line:
+
+ filename.h5 //3
+
+This identifies an event in the 3-dimensional data block located at
+/data/rawdata in the HDF5 file called filename.h5, specifically the
+2-dimensional data slice defined by the value 3 of the first axis of the data
+space.
+
+Indexamajig tries to match the alphanumerical strings to the placeholders in
+the 'dim' property defined in the geometry file. The first string is matched to
+the first placeholder, the second to the second placeholder, and so on. A
+similar strategy is followed to match integer numbers to the placeholders in
+the 'dim' property defined in the geometry file. For a full explanation of how
+the internal layout of the data file can be described in the geometry file,
+please see **man crystfel_geometry**.
+
+You can use **list_events** to prepare a list of each event in one or more
+input files. Note that you only need to do this if you need to perform some
+sorting or filtering on this list. If you want to process every event in a
+file, simply specify the filename in the input file.
+
+
+AUTHOR
+=======
+
+This page was written by Thomas White, Yaroslav Gevorkov and Valerio Mariani.
+
+
+REPORTING BUGS
+==============
+
+Report bugs to <taw@physics.org>, or visit <http://www.desy.de/~twhite/crystfel>.
+
+
+COPYRIGHT AND DISCLAIMER
+========================
+
+Copyright © 2012-2023 Deutsches Elektronen-Synchrotron DESY, a research centre
+of the Helmholtz Association.
+
+indexamajig, and this manual, are part of CrystFEL.
+
+CrystFEL is free software: you can redistribute it and/or modify it under the
+terms of the GNU General Public License as published by the Free Software
+Foundation, either version 3 of the License, or (at your option) any later
+version.
+
+CrystFEL is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+CrystFEL. If not, see <http://www.gnu.org/licenses/>.
+
+
+SEE ALSO
+========
+
+**crystfel**(7), **crystfel_geometry**(5), **cell_explorer**(1),
+**process_hkl**(1), **partialator**(1), **list_events**(1), **whirligig**(1)