align_detector(1)
๐ align_detector โ refine detector geometry โจ
okay so bestie, this is align_detector(1) from the General Commands Manual and it's literally about making your detector geometry chef's kiss accurate, no cap. buckle up ๐
โจ NAME โจ
align_detector โ refine detector geometry ๐ฆ
๐ธ SYNOPSIS ๐ธ
align_detector -g input.geom -o output.geom -l level [--out-of-plane]
millepede-files
๐ DESCRIPTION ๐
okay so align_detector takes the calibration data that indexamajig wrote out and uses it to refine your detector geometry. and the way it does this is genuinely iconic: it accounts for all the inter-dependencies between crystal orientations, cell parameters and the panel positions โ like, as if one single giant minimisation had been run with every frame at once. main character energy fr ๐
but here's the slay part: the algorithm is nevertheless very fast โ and that's thanks to the Millepede-II algorithm. for more info, go look at https://www.desy.de/~kleinwrt/MP2/doc/html/index.html ๐
so how do you actually do it? three steps, bestie, let's go ๐ซถ
- first, make sure your geometry file includes hierarchy information. for this, see
man crystfel_geometry, section Detector hierarchy. - next, run
indexamajigas usual, but with option--mille. this produces an additional output file with default namemille-data.bin(use--mille-fileto set a different location). this file contains the calibration data that can be read byalign_detectorandshow_residualsโจ - finally, run
align_detector, giving it the input geometry file, the "Mille" files, a refinement level and a filename for the updated geometry file. โ ๏ธ the input geometry file must match the file used for theindexamajigrun โ don't be out here swapping files, that's not the vibe ๐
๐๏ธ refinement levels, iykyk
refinement level 0 allows only the overall detector position to vary. higher levels allow groups of panels to move according to the hierarchy. for example, for a CSPAD detector with hierarchy defined as in the example files:
- level
1refines the quadrant positions ๐ - level
2refines the 2-by-1 panel "dominoes" - level
3refines the individual (roughly square) ASICs
higher refinement levels will generally require more and higher-resolution diffraction data. no free lunch, bestie ๐ญ
also! you can use indexamajig option --max-mille-level to reduce the size of the calibration data files โ at the cost of limiting the maximum refinement level. trade-offs, amirite ๐
๐ in-plane vs out-of-plane
the default behaviour is to refine only the position components in the x-y plane, perpendicular to the beam. that's the safe, comfy vibe ๐
in favourable circumstances you can add option --out-of-plane to refine the panel translations out of this plane. but be aware โ this introduces additional cross-dependencies and is less stable. add option --out-of-plane-tilts to additionally refine the panel tilts out of the x-y plane, which is even less stable. ๐ฅ๐
๐ท the camera length situation
the overall detector z-position (camera length) is usually quite strongly correlated with the crystal cell parameters, making it difficult to refine. with high-resolution data, it can be possible, however. to refine the overall camera length, add --camera-length. ๐
without this option, the overall camera length will not be altered โ even with --out-of-plane. instead, only the z-positions of the panels relative to one another will be refined. periodt.
๐ง the pede dependency
align_detector relies on the program pede from the Millepede-II package. usually this will be installed as part of the CrystFEL installation procedure. if not, it can easily be installed from the Millepede-II repository at https://gitlab.desy.de/claus.kleinwort/millepede-ii โญ
๐ OPTIONS ๐
-g input.geom,--geometry=input.geomโ specify the input geometry filename. (yes, this is the one that has to match yourindexamajigrun ๐)-o output.geom,--output=output.geomโ specify the output geometry filename. โ ๏ธ note that the geometry file will be re-written, meaning that any formatting and comments will be lost. say goodbye to your cute comments, bestie ๐ญ-l level,--level=levelโ specify the refinement level.-l 0refines the overall detector position only. the maximum refinement level is determined by the hierarchy of the detector. ๐ช--out-of-planeโ additionally refine out-of-plane panel translations, relative to one another (see--camera-length). ๐ฆ--out-of-plane-tiltsโ additionally refine out-of-plane panel tilts. even more chaotic, see above ๐--panel-totalsโ display the total translation and rotation changes for each panel. this does not affect the refinement or the output geometry file in any way โ only the console output. purely a lil treat for your eyeballs ๐--min-measurements=nโ require at least n measurements contributing to a detector geometry parameter before updating that parameter. higher values give more stable refinement. note that there are two measurements per peak-reflection pair, because the position offsets are two dimensional. the default value is100, i.e. at least 50 pairs are needed for each parameter. math is mathing ๐งฎ--big-errorsโ tellpedeto be very tolerant of large residuals in the input data. add this option if an initial refinement fails due to too many "huge" rejects. ๐
๐ซถ AUTHOR ๐ซถ
this page was written by Thomas White. ๐
๐ REPORTING BUGS ๐
report bugs to taw@physics.org, or visit http://www.desy.de/~twhite/crystfel. we love a bug report, fr fr ๐
๐ COPYRIGHT AND DISCLAIMER ๐
copyright ยฉ 2023-2025 Deutsches Elektronen-Synchrotron DESY, a research centre of the Helmholtz Association.
align_detector, 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. (yes, that's the all-caps bit, it's serious ๐ซก)
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 ๐
okay that's the whole page bestie, go align that detector and slay ๐โจ this has been align_detector(1) from the General Commands Manual โ no version or date was listed on the page, so consider this your official cute sign-off ๐๐ฆ
๐ฆ where this page comes from
- nixpkgs unstable: crystfel 0.13.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms