In this part, we see how to
The tomo-tools denote a collection of tomography software developed at ESRF:
Nabu is a versatile tool for tomography processing.
It consists in a collection of command-line tools:
nabu
: full-field tomography processing pipelinenabu-helical
: helical tomography processing pipelinenabu-histogram
nabu-cast
and a Python API of invidivual processing steps.
The documentation can be found at https://www.silx.org/pub/nabu/doc/
tomwer offers tools to automate acquisition and define processing workflows for Tomography.
Main interface to define processing workflows can be access from the tomwer canvas
.
Most of the processing step can be access as standalone from CLI like:
tomwer axis
tomwer nxtomo-editor
tomwer --help
note: use the help to get more information about CLI
All processing can also be accesses through a python API (using ewoks tasks).
In this part, we use the command line (nabu + nxtomomill) to perform a basic reconstruction.
There are roughly three steps:
nxtomomill
nabu-config
nabu
ESRF is deploying the Bliss acquisition system on all beamlines.
This new acquisition system is producing HDF5 files.
There are a few drawbacks:
On the other hand, nabu/tomwer need a stable and standard file format.
For this first part, we will be using the dataset: /scisoft/tomo_training/part1_basic_reco/bambou_hercules_0001.h5
(scan of a Bamboo stick, courtesy Ludovic Broche, ID19)
Use the command line nxtomomill
to convert between (Bliss) HDF5 and NX layout.
nxtomomill h52nx /scisoft/tomo_training/part1_basic_reco/bambou_hercules_0001.h5 bambou_hercules_0001.nx
Some beamlines do not use Bliss yet.
The reconstruction software (nabu/tomwer) natively handles EDF datasets, but the ESRF GPFS configuration makes it very slow.
It is therefore advised to first convert the EDF dataset to NX. By default this duplicates the data.
We will use the dataset /scisoft/tomo_training/part1_basic_reco/gut_ctrl_7_mid_ovw1_150nm_1_/
(courtesy Alexandra Pacureanu, ID16A)
Use the command nxtomomill
to convert thre EDF dataset to Nexus:
nxtomomill edf2nx /scisoft/tomo_training/part1_basic_reco/gut_ctrl_7_mid_ovw1_150nm_1_ gut_ctrl_7_mid_ovw1_150nm_1_.nx
To create a configuration file from scratch, the command-line tool nabu-config
can be used:
nabu-config
this creates a file (nabu.conf
by default) with pre-filled parameters.
To choose the file name:
nabu-config --output my_config.conf
By default, only a subset of the options are visible in the configuration file.
To see all the parameters:
nabu-config --level advanced
to retain only a handful of parameters:
nabu-config --level required
nabu-config --dataset <path to the NX file>
Let's run our first reconstruction, using the NX file produced by nxtomomill.
The syntax is nabu nabu.conf [parameters]
.
By default, nabu nabu.conf
will reconstruct all the volume (unless start_xyz
and end_xyz
are modified in the configuration file).
Usually, to quickly assess the reconstruction parameters, only one or several slices are reconstructed.
To reconstruct only the middle slice:
nabu nabu.conf --slice middle
To reconstruct the first and last slices:
nabu nabu.conf --slice first
nabu nabu.conf --slice last
See also: command-line interface
In this case:
sliding-window
works wellSometimes it's useful to save partially-processed data in the middle of the process, for debugging/visualization.
Nabu enables to
The relevant section in configuration file is [pipeline]
:
[pipeline]
# Example: dump data after phase retrieval and sinogram construction
save_steps = phase, sinogram
Note checkpoints can be saved in a custom file with the steps_file
parameter.
The parameter name is resume_from_step
.
You can save any number of step (flatfield
, phase
, sinogram
, ...), but the processing can be resumed from only one checkpoint.
[pipeline]
save_steps = sinogram
resume_from_step = sinogram
This particular configuration is useful for manually finding the center of rotation (many trial-and-error reconstructions needed).
save_steps = sinogram
and resume_from_step = sinogram
nabu nabu.conf --slice middle
nabu nabu.conf --slice last
nabu nabu.conf --slice last