Last revision (Sept. 2026)
LaueTools information on BM32 beamline website:
https://www.esrf.fr/UsersAndScience/Experiments/CRG/BM32/Microdiffraction
1- Download LaueTools code
-
It is highly recommended to create a conda (or pip) environment. See INSTALL.readme
-
the very last version of the code running with python3 is now on github (you are also welcome to fork this project):
-
last (or older releases) with repository on pypi
https://pypi.org/project/LaueTools/
if pip is installed:
pip install lauetools -
optional features need extra packages, installed by adding their name in brackets:
pip install "lauetools[daxm]" depth-resolved Laue analysis (DAXM, daxmgui): numba, photutils, pypubsub pip install "lauetools[hdf5]" .hdf5 summary files (buildsummary), EIGER stacked hdf5 images: tables pip install "lauetools[all]" all optional featuresWithout them, LaueTools works normally; only these features are disabled (a message tells which package is missing).
-
install from a local clone (editable install:
git pullorgit switchtake effect at the next launch, no reinstall needed except when pyproject.toml changes or the clone folder is moved):git clone https://github.com/BM32ESRF/lauetools.git cd lauetools pip install -r requirements-gui.txt pip install -e . -
macOS: the wxPython GUIs need a "framework" build of Python, i.e. one allowed to open windows (otherwise: "This program needs access to the screen"). Python from python.org or Homebrew is a framework build:
# install Python 3.12 from https://www.python.org/downloads/macos/ , then create and activate a venv with it /Library/Frameworks/Python.framework/Versions/3.12/bin/python3 -m venv ~/venvs/lauetools source ~/venvs/lauetools/bin/activate # (Homebrew: $(brew --prefix python@3.12)/bin/python3.12 -m venv ~/venvs/lauetools) # check: prints "Python" for a framework build (an empty line otherwise) python -c "import sysconfig; print(sysconfig.get_config_var('PYTHONFRAMEWORK'))" # then install from the local clone as above, and launch: lauetoolsWith conda, a plain environment is not a framework build: run "conda install python.app" in it and start the GUI with: pythonw -m LaueTools.LaueToolsGUI Avoid Apple's /usr/bin/python3 (old version, managed by the system).
-
launch in a single command, without activating the venv: the venv's own commands use its Python
~/venvs/lauetools/bin/lauetoolsshorter: add an alias to ~/.zshrc (then open a new terminal), and type lauetools from anywhere
alias lauetools='~/venvs/lauetools/bin/lauetools'or, for a double-click launcher (Finder, Dock), create ~/Desktop/LaueTools.command containing
#!/bin/zsh exec ~/venvs/lauetools/bin/lauetoolsthen make it executable: chmod +x ~/Desktop/LaueTools.command (error messages show in its Terminal window)
to give it the LaueTools icon: open conda/icon.png in Preview, copy it (cmd-A, cmd-C), select LaueTools.command in Finder, Get Info (cmd-I), click the small icon at the top left of the Info window and paste (cmd-V)
2a- Launch Graphical User Interfaces of LaueTools
- start Lauetools GUIs from command line :
Normally, in a command window (if environment variables are well set) several GUIs can be launched:
> lauetools for the main GUI, simulation, complex Laue pattern calibration, teaching the concepts
> peaksearch for batch Laue pattern peak search processing
> indexrefine for batch Laue pattern indexing and unit cell (strain) refinement
> buildsummary to compile all results from indexrefine analysis
> plotmap to plot 2D map of structural quantities from file built previously
> plotmeshgui to plot 2D map from counters values in (spec) logfile
> daxmgui for depth-resolved Laue analysis with wire scans (needs: pip install "lauetools[daxm]")
2b- Use LaueTools module as a library
With pip installation, LaueTools package will be included to python packages. Therefore any module will be callable as the following:
-In [1] : import LaueTools.readmccd as rmccd
-In [2] : rmccd.readCCDimage(‘myimage.tif’)
The notebooks are installed with LaueTools. To copy them (with their YAML configuration files, the tutorials notebooks and the scripts) to a folder of your choice:
lauetools-copy -d my_folder (default folder: ./lauetools_examples)
lauetools-copy-gui (choose the folder in a dialog, no terminal needed)
lauetools-copy -d my_folder -w notebooks (only the quickstart, peaksearch and indexation notebooks)
lauetools-copy -d my_folder --download (also download the example images from GitHub to my_folder/LaueImages)
Files already present in the folder are not overwritten (option --force to overwrite them). Then start with jupyter lab my_folder/notebooks/quickstart/laue_maps_quickstart.ipynb.
-
PixelMonitoring.ipynb: Mosaic plot (map of 2D ROI centered on user-defined Laue spot) and GrainImaging plots (maps of scattering signal derived from ROI quantities). PixelMonitoring.html
-
PeakSearch_Multiprocessing.ipynb: Peak search and write
.datand.corfiles. -
Indexing_Multiprocessing.ipynb: Index Laue pattern (find UB and refine lattice parameters or strain) and write
.fitfile.