DIFF_TOMO(1)
π DIFF_TOMO β bestie edition π
okay so this is the manual page for diff_tomo, a user command from pyFAI (the version string lives down at the bottom, don't worry, we'll get there π«Ά), and the page itself is dated February 2023. sit down, grab a strawberry π, and let's get into it.
β¨ NAME β¨
diff_tomo β the CLI interface for diffraction tomography data reduction. that's it, that's the whole name section, she's brief and she's iconic π
πΈ SYNOPSIS πΈ
usage: diff_tomo [options] -p ponifile imagefiles*
π¦ DESCRIPTION π¦
so, azimuthal integration for diffraction tomography. but like, what is diffraction tomography bestie? it's an experiment where 2D diffraction patterns get recorded while you do a 2D scan: one direction (the slowest) is rotation around the sample center, and the other (the fastest) is a translation through the sample. two scans, one sample, so much drama. π
diff_tomo is a script β based on pyFAI and h5py β that lets you reduce this 4D dataset down into a 3D dataset. and what's in that 3D dataset? the rotation angle (hundreds), the translation step (hundreds), and the many diffraction angles (thousands). literally thousands. she's got range.
the resulting dataset can be opened using the PyMca ROItool, where the 1d dataset has to be selected as the last dimension. iykyk. also, the output file aims at being NeXus compliant β¨ so that's cute of it.
and plot twist β this tool can be used for mapping experiments, if you consider the slow scan direction as the rotation. but the diff_map tool provides in addition a graphical user interface. so if you want buttons, go there. no cap.
π positional arguments π
FILEβ the list of files to calibrate. yes, you gotta hand her the files, she's not a mind reader π
π options π
-h,--helpβ shows this help message and exits. the classic. the main character of every CLI.-V,--versionβ shows the program's version number and exits. flex your version, periodt.-o FILE,--output FILEβ the HDF5 file where the processed sinogram gets saved. by default it'sdiff_tomo.h5.-v,--verboseβ switch to verbose/debug mode. default: quiet π€«-P FILE,--prefix FILEβ prefix, or common base, for all files.-e EXTENSION,--extension EXTENSIONβ process all files with this extension.-t NTRANS,--nTrans NTRANSβ number of points in translation. mandatory, bestie, you cannot skip this one.-r NROT,--nRot NROTβ number of points in rotation. also mandatory π-c NDIFF,--nDiff NDIFFβ number of points in the diffraction powder pattern. mandatory too. all three, no excuses.-d FILE,--dark FILEβ list of dark images to average and subtract.-f FILE,--flat FILEβ list of flat images to average and divide.-m FILE,--mask FILEβ file containing the mask. no mask by default.-p FILE,--poni FILEβ file containing the diffraction parameter (the poni-file). mandatory β and hey, remember she's the-pin the synopsis up there π-O OFFSET,--offset OFFSETβ do not process the first files. skipping the intro, love that for you.-g,--gpuβ process using OpenCL on GPU. zoom zoom π₯-S,--statsβ show statistics at the end. numbers, but make it a finale β
β οΈ heads up bestie: if the number of files is too large, use double quotes "*.edf" β she said it, not me, and she's right.
π SEE ALSO π
no SEE ALSO section on this page, but the description does shout out diff_map for the GUI girlies π§ and the whole thing rides on pyFAI and h5py.
and that's the whole page, bestie!! π diff_tomo comes from pyFAI (version string is just ..., she's mysterious like that β¨) and the page is dated February 2023. go reduce a 4D dataset into 3D, you absolute icon ππ¦π
π¦ where this page comes from
- debian bookworm: pyfai 0.21.3+dfsg1-4 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms