Scroll to navigation



calibration - CLI tool for determining the geometry of a detector using a reference sample.


usage: pyFAI-calib [options] -w 1 -D detector -c calibrant.D imagefile.edf

Calibrate the diffraction setup geometry based on Debye-Sherrer rings images without a priori knowledge of your setup. You will need to provide a calibrant or a "d-spacing" file containing the spacing of Miller plans in Angstrom (in decreasing order). Calibrants available: AgBh, Al, Au, C14H30O, CeO2, Cr2O3, CrOx, CuO, LaB6, LaB6_SRM660a, LaB6_SRM660b, LaB6_SRM660c, NaCl, Ni, PBBA, Pt, Si, Si_SRM640, Si_SRM640a, Si_SRM640b, Si_SRM640c, Si_SRM640d, Si_SRM640e, TiO2, ZnO, alpha_Al2O3, cristobaltite, mock, quartz or search in the American Mineralogist database: The --calibrant option is mandatory !

positional arguments:

List of files to calibrate

optional arguments:

show this help message and exit
show program's version number and exit
Filename where processed image is saved
switch to debug/verbose mode
Calibrant name or file containing d-spacing of the reference sample (MANDATORY, case sensitive !)
wavelength of the X-Ray beam in Angstrom. Mandatory
energy of the X-Ray beam in keV (hc=12.398419843320026keV.A).
polarization factor, from -1 (vertical) to +1 (horizontal), default is None (no correction), synchrotrons are around 0.95
file containing the diffraction parameter (poni-file). MANDATORY for pyFAI-recalib!
Automatic background subtraction if no value are provided
list of comma separated dark images to average and subtract
list of comma separated flat images to average and divide
spline file describing the detector distortion
Detector name (instead of pixel size+spline)
file containing the mask (for image reconstruction)
file with datapoints saved. Default: basename.npt
select the filter, either mean(default), max or median
sample-detector distance in millimeter. Default: 100mm
sample-detector distance in meter. Default: 0.1m
poni1 coordinate in meter. Default: center of detector
poni2 coordinate in meter. Default: center of detector
rot1 in radians. default: 0
rot2 in radians. default: 0
rot3 in radians. default: 0
fix the distance parameter
free the distance parameter. Default: Activated
fix the poni1 parameter
free the poni1 parameter. Default: Activated
fix the poni2 parameter
free the poni2 parameter. Default: Activated
fix the rot1 parameter
free the rot1 parameter. Default: Activated
fix the rot2 parameter
free the rot2 parameter. Default: Activated
fix the rot3 parameter
free the rot3 parameter. Default: Activated
fix the wavelength parameter. Default: Activated
free the wavelength parameter. Default: Deactivated
Allow initially detector tilt to be refined (rot1, rot2, rot3). Default: Activated
Deactivated tilt refinement and set all rotation to 0
consider all pixel>max*(1-saturation) as saturated and reconstruct them, default: 0 (deactivated)
weight fit by intensity, by default not.
Number of point in 1D integrated pattern, Default: 1024
Number of azimuthal sectors in 2D integrated images. Default: 360
Number of radial bins in 2D integrated images. Default: 400
Valid units for radial range: 2th_deg, 2th_rad, q_nm^-1, q_A^-1, r_mm. Default: 2th_deg
force the program to run without a Graphical interface
force the program to run and exit without prompting for refinements
Reconstruct image where data are masked or <0 (for Pilatus detectors or detectors with modules)
Size of the gaussian kernel. Size of the gap (in pixels) between two consecutive rings, by default 100 Increase the value if the arc is not complete; decrease the value if arcs are mixed together.
Use square kernel shape for neighbor search instead of diamond shape
size of the pixel in micron

The output of this program is a "PONI" file containing the detector description and the 6 refined parameters (distance, center, rotation) and wavelength. An 1D and 2D diffraction patterns are also produced. (.dat and .azim files)

November 2021 calibration from pyFAI version 0.20.0: 21/01/2021