Tomo-tools training - Part 3: flat-field normalization¶

Flat-field normalization of the radios is usually the fist step of the processing chain.

Flat-field normalization¶

The normalized intensity at index $k$, $I_n (k)$ is given by

$$ I_n (k) = \displaystyle\dfrac { I (k) - D } { F (k) - D } $$

where $I (k)$ is the raw projection number $k$, $F (k)$ is the flat corresponding to radio $k$, and $D$ is the detector dark-current.

Usually there is not as many flats as radios, so $F (k)$ is obtained by (linear) interpolation:

     F(k1)    I(k)    F(k2)
------|--------|-------|------ ...

$$ F(k) = \dfrac{k_2 - k}{k_2 - k_1} F_{k_1} + \dfrac{k - k_1}{k_2 - k_1} F_{k_2} $$

"Reduced" flats and darks¶

When doing a scan, several series of flats/darks are acquired.

Example sequence:

  • Acquire 50 darks
  • Acquire 100 flats
  • Acquire 10 000 projections
  • Acquire 100 flats

image.png

In the NXTomo convention:

  • 2 = dark
  • 1 = flat
  • 0 = projection

Each series of flats/darks is reduced to obtain one image (per sequence).
In the previous example:

  • 50 darks ------> mean (gives darkend.edf)
  • 100 flats -----> median (gives refHST0000.edf)
  • 10 000 projs
  • 100 flats -----> median (gives refHST10000.edf)

In the previous acquisition/processing system (octave-fasttomo), the resulting files were called dark0000.edf, refHST<num>.edf

In nabu/tomwer, the reduced flats/darks are called <dataset_prefix>_darks.h5 and <dataset_prefix>_flats.h5

These final frames are used for flat-field normalization.

Before computing the mean/median of darks/flats, nabu/tomwer will first attempt to load them (to avoid re-computations).

Nabu will

  • Try to load from darks_flats_dir (in [preproc] of the configuration file), if specified
  • Try to load the <dataset>_darks.h5 and <dataset>_flats.h5 files if they are alongside the dataset
  • Try to load them from the output reconstruction directory

Possible flat-field modes with nabu¶

In the configuration file (section [preproc]), the paramter flatfield can have these possible values:

  • 1 or True (default): do flat-field normalization with the frames from the dataset
  • 0 or False: no flat-field normalization
  • force-load: perform flatfield regardless of the dataset by attempting to load darks/flats
  • force-compute: perform flatfield, ignore all .h5 files containing already computed darks/flats

Synchrotron current normalization¶

When information on synchrotron current (SRCurrent) is available, it's possible to normalize each with this current:

$$ P' = \dfrac{P - D}{s/s_{Max}} + D $$

where $s$ is the synchrotron current for the current frame, $s_{Max}$ is the max current, and $D$ is the dark frame.

In nabu, the current normalization is done during flat-field:

$$ \dfrac{P' - D}{F' - D} = \dfrac{(P - D)/s_P}{(F - D)/s_F} $$

The relevant configuration key is normalize_srcurrent = 0 in [preproc]