nabu demo 25/08/2020

This is a (hopefully) short hands-on introduction to nabu.
A more formal training will be held later in the year.

Presenter Notes

Outline

  1. Getting started
  2. Using nabu: principle
  3. Preparing the dataset
  4. Creating a configuration file
  5. Running a reconstruction
  6. Links

Presenter Notes

1. Getting started

For this demo, we will use the lbs191 machine.
First connect to it:

ssh -XC opid19@lbs191

Go to the following directory:

cd /nobackup/lbs191tmp1/nabu_demo_25_aug

Activate the "environment" we will use:

source activate_env.sh

(make sure to use source activate_env.sh and not just ./activate_env.sh)

Check that nabu is installed:

nabu -V

Presenter Notes

2. Using nabu: principle

Nabu is used in the same spirit as PyHST2:

  • Create/edit a configuration file
  • Run nabu nabu.conf (as in pyhst2 input.par)

Currently, two additional steps are involved:

  • Convert BLISS scan to a Nexus format
  • Generate final darks and flats

Presenter Notes

3. Preparing the dataset

We start from a HDF5 dataset produced by BLISS:

silx view /lbsram/data/nabu_test/bamboo/bamboo.h5

This is the "BLISS HDF5 master file" containing many information, and link to the actual data. On our side, we have to do the following:

  • Convert the dataset to a "standard" Nexus format
  • Generate the final darks and flats

These two steps are done with the script generate_darks_refs.py:

python generate_darks_refs.py --entry 1.1 /lbsram/data/nabu_test/bamboo/bamboo.h5

NB This is a temporary solution. The dedicated tool nxtomomill takes care of the first step, and the second will be handled by Nabu in a future version.

After exexcuting this script, two new files bamboo.bx and tomwer_processes.h5 are created:

ls -tclrh /lbsram/data/nabu_test/bamboo/

Presenter Notes

4. Creating the configuration file

Now we have a dataset in HDF5-Nexus format, along with a tomwer_processes.h5 file containing the final darks and refs.

We now create a configuration file from scratch:

nabu-config --bootstrap

it generates a template configuration file named nabu.conf (see nabu-config --help for more options).

Now we have to edit the configuration file to reconstruct the dataset. At the very least, the location option in [dataset] section has to be filled in.

Other usual options at ID19:

  • method = paganin (in section [phase])
  • delta_beta, unsharp_coeff and unsharp_sigma (in section [phase])
  • rotation_axis_position (in section [reconstruction])
  • padding_type = edges (in section [reconstruction])
  • enable_halftomo = 1 (in section [reconstruction])

Presenter Notes

5. Running a reconstruction

Nabu can reconstruct individual slices, sub-volume or whole volume by tuning the start_z and end_z in the configuration file (section [reconstruction]).

We can also specify start_z and end_z directly with the application, ex:

nabu nabu.conf --slice 0-99

See the documentation: www.silx.org/pub/nabu/doc/nabu_cli.html

Presenter Notes