aboutsummaryrefslogtreecommitdiff
path: root/doc/man/indexamajig.1
blob: c3189f2245c18ea9ba82fdac02e049235d8d973d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
.\"
.\" indexamajig man page
.\"
.\" Copyright © 2012-2017 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 in HDF5 format 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 HDF5 filenames. The HDF5 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 HDF5 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.  Firstly, you can choose the peak detection method using \fB--peaks=\fR\fImethod\fR.  There are three possibilities for "method" here.  \fB--peaks=hdf5\fR will take the peak locations from the HDF5 file.  It expects a two dimensional array, by default at /processing/hitfinder/peakinfo, whose size in the first dimension equals the number of peaks and whose size in the second dimension is three.  The first two columns contain the fast scan and slow scan coordinates, the third contains the intensity.  However, the intensity will be ignored since the pattern will always be re-integrated using the unit cell provided by the indexer on the basis of the peaks.  You can tell indexamajig where to find this table inside each HDF5 file using \fB--hdf5-peaks=\fR\fIpath\fR.

\fB--peaks=cxi\fR works similarly to this, but expects four separate HDF5 datasets beneath \fIpath\fR, \fBnPeaks\fR, \fBpeakXPosRaw\fR, \fBpeakYPosRaw\fR and \fBpeakTotalIntensity\fR.  See the specification for the CXI file format at http://www.cxidb.org/ for more details.

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 HDF5 or CXI 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.  Use \fB--no-half-pixel-shift\fR if this isn't what you want.

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-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.

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.  To use this option, 'dirax' must be in your shell's search path.  If you see the DirAx version and copyright information when you run \fBdirax\fR on the command line, things are set up correctly.

.IP \fBmosflm\fR
.PD
Invoke Mosflm.  To use this option, 'ipmosflm' must be in your shell's search path.  If you see the MOSFLM version and copyright information when you run \fBipmosflm\fR on the command line, things are set up correctly.

.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.

.PP
You can add one or more of the following to the above indexing methods:

.IP \fB-raw\fR
.PD
Do not check the resulting unit cell for correspondence with the target cell.  This option is useful when you need to determine the unit cell ab initio.  See \fB-comb\fR and \fB-axes\fR.

.IP \fB-axes\fR
.PD
Check permutations of the axes for correspondence with your cell, but do not check linear combinations.  This is useful to avoid a potential problem when one of the unit cell axis lengths is close to a multiple of one of the others.  See \fB-raw\fR and \fB-comb\fR.

.IP \fB-comb\fR
.PD
Check linear combinations of the unit cell basis vectors to see if a cell can be produced which looks like your unit cell.  See \fB-raw\fR and \fB-axes\fR.

.IP \fB-retry\fR
.PD
If indexing fails, delete some of the weakest peaks and try again.  This increases the indexing yield, but decreases the speed.  The opposite is \fB-noretry\fR, which prevents indexing from being retried.  \fB-retry\fR is the default for all indexing methods.

.IP \fB-multi\fR
.PD
If indexing succeeds, delete the peaks which are explained by the lattice and try again to see if another lattice can be found.  This allows the possibility of finding multiple crystals per pattern (above and beyond what is already found by multi-crystal indexing methods such as \fBfelix\fR.  The opposite is \fB-nomulti\fR, which prevents that further indexing attempts, and is the default for all indexing methods.

.IP \fB-bad\fR
.PD
Do not check that the cell accounts for the peaks found by the peak search.  This might be useful to debug initial indexing problems, but as its name suggests it is usually a bad idea.

.IP \fB-latt\fR
.PD
Use the lattice type information, e.g. the knowledge that the lattice (say) tetragonal primitive, to help guide the indexing.

.IP \fB-nolatt\fR
.PD
The opposite of \fB-latt\fR: do not use lattice type information to guide the indexing.

.IP \fB-cell\fR
.PD
Provide your unit cell parameters as prior information to the core indexing algorithm (not just for a filtering step after indexing as with \fBcomb\fR and \fBaxes\fR).

.IP \fB-nocell\fR
.PD
The opposite of \fB-cell\fR: do not use unit cell parameters as prior information for the core indexing algorithm.

.PP
The default indexing method is 'none', which means no indexing will be done.  This is useful if you just want to check that the peak detection is working properly.

.PP
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.

.PP
Your indexing methods will be checked for validity, incompatible flags removed, and warnings given about duplicates  For example, \fBmosflm\fR and \fBmosflm-comb-latt\fR represent the same indexing method, because \fB-comb\fR and \fB-latt\fR are the default behaviour for \fBmosflm\fR.  The 'long version' of each of your indexing methods will be listed in the output, and the stream will contain a record of which indexing method successfully indexed each pattern.

.PP
It's risky to use \fBmosflm-nolatt\fR in conjunction with either \fB-comb\fR or \fB-axes\fR when you have a rhombohedral cell.  This would be an odd thing to do anyway: why withhold the lattice information from MOSFLM if you know what it is, and want to use it to check the result?  It's risky because MOSFLM will by default return the "H centered" lattice for your rhombohedral cell, and it's not completely certain that MOSFLM consistently uses one or other of the two possible conventions for the relationship between the "H" and "R" cells.  It is, however, very likely that it does.

If you don't know what to give for this option, try \fB--indexing=asdf,dirax-axes,mosflm-axes-latt,mosflm-axes-nolatt,xds\fR.

.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.  This is not usually a good idea, but might be your only choice if there are many saturated reflections.  The opposite is \fB-nosat\fR, which is the default for all integration methods.

.IP \fB-rescut\fR
.PD
Normally, reflections are integrated all the way to the edge of the detector, even if the crystal diffracts to a lower resolution.  With this option, integration will be performed up to the apparent diffraction limit of the crystal.  You can use \fB--push-res\fR (see below) to integrate to a slightly higher or lower resolution.  The resolution limit is determined by comparing the peaks found by the peak search to the indexing results, so good peak detection is essential when using this option (as it is always).  The opposite is \fB-norescut\fR, which is the default.

.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.

.SH OPTIMISING THE INTEGRATION RADII
To determine appropriate values for the integration radii, index some patterns with the default values and view the results using \fBcheck-near-bragg\fR (in the scripts folder).  Set the binning in \fBhdfsee\fR to 1, and adjust the ring radius until none of the rings overlap for any of the patterns.  This ring radius is the outer radius to use. Then reduce the radius until the circles match the sizes of the peaks as closely as possible.  This value is the inner radius.  The middle radius should be between the two, ideally between two and three pixels smaller than the outer radius.
.PP
If it's difficult to do this without setting the middle radius to the
same value as the inner radius, then the peaks are too close together to be
accurately integrated.  Perhaps you got greedy with the resolution and put the
detector too close to the interaction region?

.SH 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--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--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 \fB--indexing=none\fR.

.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-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-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--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--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--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.

.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.

.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--hdf5-peaks=\fR\fIpath\fR
.PD
When using \fB--peaks=hdf5\fR or \fB--peaks=cxi\fR, read the peak positions from location \fIpath\fR.  The path can include placeholders, e.g. \fB--hdf5-peaks=/%/peaks\fR.  See \fBPEAK DETECTION\fR above.

.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--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--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 HDF5 file.

.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-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-gradient=100000\fR.  The reason it's 'gradient squared' instead of just 'gradient' is historical.

.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 or \fB--peaks=peakfinder8\fR.  The default is \fB--min-snr=5\fR.

.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\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--copy-hdf5-field=\fR\fIpath\fR
.PD
Copy the information from \fR\fIpath\fR in the HDF5 file into the output stream.  The information must be a single scalar value.  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.

.PD 0
.IP "\fB-j\fR \fIn\fR"
.PD
Run \fIn\fR analyses in parallel.  Default: 1.

.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--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 or \fB--peaks=cxi\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 HDF5 or CXI 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, the peaks will additionally be checked to see that they satisfy the minimum SNR specified with \fB--min-snr\fR.

.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--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
When \fBrescut\fR is in the integration method, integrate \fIn\fR nm^-1 higher than the apparent resolution limit of each individual crystal.  If \fBrescut\fR is not used, this option has no effect.  \fIn\fR can be negative to integrate \fIlower\fR than the apparent resolution limit.  The default is \fB--push-res=0\fR, but note that the default integration method does \fInot\fR include \fBrescut\fR, so no per-pattern resolution cutoff is used.  Note that you can also apply this cutoff at the merging stage using \fBprocess_hkl --push-res\fR.

.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--fix-profile-radius=\fIn\fR
.IP \fB--fix-bandwidth=\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, the bandwidth as a decimal fraction and the divergence in radians (full angle).  The default is to set the divergence to zero, the bandwidth to a very small value, 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--no-refine
.PD
Skip the prediction refinement step.

.PD 0
.IP \fB--profile
.PD
Display timing data for performance monitoring.

.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 matrix trace tolerance for considering rotation matrices as equal.

.PD 0
.IP \fB--felix-options\fR
.PD
Specify a comma-separated list of keyword arguments to change the default parameters passed to the felix indexer. For asthetics, this list can also be preceeded and followed by quotations - as in: \fB--felix-options="arg1=10,arg2=600"\fR. A list of parameters which can be modified through this option is detailed below.

.PD 0
.IP "\fBspacegroup=\fIn\fR"
.PD
Specify the spacegroup number of the crystal structure. For example: spacegroup=96 is P43212.

.PD 0
.IP "\fBn_voxels=\fIn\fR"
.PD
Specify the number of voxels used in the Rodrigues space search.
(Default: 100)

.PD 0
.IP "\fBtest_fraction=\fIfract\fR"
.PD
Specify the fraction of space to test.
(Default: 0.75)

.PD 0
.IP "\fBsigma_tth=\fIsig\fR"
.PD
Specify the sigma of the two-theta angle.
(Default: 0.15)

.PD 0
.IP "\fBsigma_eta=\fIsig\fR"
.PD
Specify the sigma of the eta angle.
(Default: 0.2)

.PD 0
.IP "\fBsigma_omega=\fIsig\fR"
.PD
Specify the sigma of the omega angle.
(Default: 0.2)

.PD 0
.IP "\fBn_sigmas=\fIn\fR"
.PD
Specify the number of sigmas to use.
(Default: 2)

.PD 0
.IP "\fBtthrange_min=\fImin\fR"
.PD
Specify the lower bound of the 2theta angle to consider when indexing (degrees).
(Default: 0.0)

.PD 0
.IP "\fBtthrange_max=\fImax\fR"
.PD
Specify the upper bound of the 2theta angle to consider when indexing (degrees).
(Default: 30.0)

.PD 0
.IP "\fBetarange_min=\fImin\fR"
.PD
Specify the lower bound of the eta angle to consider when indexing (degrees).
(Default: 0.0)

.PD 0
.IP "\fBetarange_max=\fImax\fR"
.PD
Specify the upper bound of the eta angle to consider when indexing (degrees).
(Default: 360.0)

.PD 0
.IP "\fBmin_measurements=\fIn\fR"
.PD
Specify a cutoff for how many Rodrigues lines cross in the first search.
(Default: 15)

.PD 0
.IP "\fBmin_completeness=\fIfract\fR"
.PD
Specify a cutoff for the fraction of projected spots which are found in the pattern.
(Default: 0.001)

.PD 0
.IP "\fBmin_uniqueness=\fIn\fR"
.PD
Specify a cutoff for the fraction of found spots which can belong to other crystallites.
(Default: 0.5)

.PD 0
.IP "\fBforce4frustums\fR"
.PD
Tell Felix to use four frustums.

.PD 0
.IP "\fBorispace_octa\fR"
.PD
Tell Felix to use octahedral orispace as opposed to frustum.
(Only possible with Felix.0.31)

.PD 0
.IP "\fBreadhkl=\fIfile\fR"
.PD
Specify a file from which to read in the ideal gvectors for the crystal.

.PD 0
.IP "\fBmaxtime=\fIn\fR"
.PD
Specify a maximum time which Felix is allowed to attempt to index the pattern (seconds)
(Default: 30 s)

.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.

.SH REPORTING BUGS
Report bugs to <taw@physics.org>, or visit <http://www.desy.de/~twhite/crystfel>.

.SH COPYRIGHT AND DISCLAIMER
Copyright © 2012-2015 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)