Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 40 Next »


Summary


NxtomoLoader
Process categoryBrief description

Computational demand

for typical tomography data

(low, medium, high)

Comment(s)Reference(s)Common alternative process(es)
loaderTo specify the location of raw dataset(s) to be used as input.Low
  1. Implements lazy loading, i. e. no data is actually loaded until the first genuine access request is made by a subsequent process in the process list (as usual, the initial loading times depend on data chunking of source dataset(s)).
  2. Capable of handling the case of dark- and flat-field data being supplied in two individual NeXus datasets, one for the dark-field data and the other for the flat-field data (these two datasets are most often stored in two separate files, but it is also possible to have them stored as two separate datasets in a single file). No image-key information is required in this case to accompany either of the two datasets, and, if present (at the location specified by image_key_path), this information is ignored.
  3. Does not handle the case of the NXtomo entry pointing to a set of paths to individual TIFF files (as opposed to a single HDF5 dataset). 
  4. Specifying dark- and flat-field data in NxtomoLoader is not sufficient for the dark-and-flat-field correction to be applied (DarkFlatFieldCorrection needs to be explicitly included in every process list that seeks this correction).
  1. NeXus NXtomo application definition
  2. NeXus file format
  3. HDF5 data model & file format



Parameters


Brief description

Savu Configurator command
>>> disp -avv

-------------------------------------------------------------------------------------
 1) NxtomoLoader(savu.plugins.loaders.full_field_loaders.nxtomo_loader)              
  A class for loading standard tomography data in Nexus format.                      
    1)                preview : []
    A slice list of required frames.
    2)         image_key_path : entry1/tomo_entry/instrument/detector/image_key
    Path to the image key entry inside the nxs file.
    3)                   name : tomo
    The name assigned to the dataset.
    4)               3d_to_4d : False
    Set to true if this reshape is required.
    5)                   flat : [None, None, 1]
    Optional Path to the flat field data file, nxs path and scale value.
    6)              data_path : entry1/tomo_entry/data/data
    Path to the data inside the file.
    7)                   dark : [None, None, 1]
    Optional path to the dark field data file, nxs path and scale value.
    8)                 angles : None
    A python statement to be evaluated or a file.
    9)           ignore_flats : None
    List of batch numbers of flats (start at 1) to ignore.
-------------------------------------------------------------------------------------

>>>

Additional notes

ItemParameter nameParameter formatExample(s)Comment(s)
Parameter valueEffect
1preview[ind_0, ind_1,... ind_(n-1)]


[ ]To load the entire n-dimensional dataset, stored at location specified by the data_path parameter.Empty Python list, [ ], is the default value of the preview parameter.
[:, :, :]To load the entire 3d dataset, stored at location specified by the data_path parameter.
[:, s, :] To load from a given 3d dataset (stored at the data_path location) only a subset of data corresponding to the s-th sinogram.This particular interpretation applies if data are laid out in the (angle_enumeration, image_height, image_width) format.
[p, :, :]To load from a given 3d dataset (stored at data_path location) only a subset of data corresponding to the p-th projection.This particular interpretation applies if data are laid out in the (angle_enumeration, image_height, image_width) format.
[:, :, 123:-123]To load from a given 3d dataset (stored at the data_path location) only a subset of data generated by cropping the width of each projection by 123 pixels on either side.This particular interpretation applies if data are laid out in the (angle_enumeration, image_height, image_width) format.
[:, mid - 1:mid + 2, :]To load from a given 3d dataset (stored at the data_path location) only a subset of data corresponding to the middle 2 sinograms.mid is one of Savu keywords (with an obvious meaning).
[0:end:2, :, :]To load from a given 3d dataset (stored at the data_path location) only a subset of data corresponding to every other projection.end is one of Savu keywords (with an obvious meaning).
[:, 0:end:2, :]To load from a given 3d dataset (stored at the data_path location) only a subset of data corresponding to every other sinogram.
2

image_key_path




Mandatory dataset.
3

name





4

3d_to_4d





5

flat

[<path-to-NeXus-file>, <path-to-dataset>, <exposure-time-compensation-factor>][/dls/i13/data/2018/cm123-4/raw/5.nxs, entry1/instrument/detector/pco1/data, 1.25]To load all flats from the flats-only dataset found at entry1/instrument/detector/pco1/data inside a NeXus scan file, located on the file system at /dls/i13/data/2018/cm123-4/raw/5.nxs, and then to multiply their pixel values by 1.25 (to compensate for the flat-field exposure time being 0.8 times shorter than the sample-projection exposure time).
  1. Specify this parameter only if flats are not stored in the same dataset as sample projections.
  2. If <path-to-NeXus-file> is not None, then flats are loaded from a dataset found at <path-to-dataset> inside a NeXus file, located on the file-system at <path-to-NeXus-file>, and their pixel values are then multiplied by <exposure-time-compensation-factor>.
  3. No image-key information is required to accompany the flat dataset, and, if present (at the location specified by image_key_path), this information is ignored.
  4. Note that, if <exposure-time-compensation-factor> is different from 1, then multiplication by this factor changes the data type of the flat-field dataset from integer to floating point, which may be unsuitable as input for the immediately succeeding process, e.g. Dezinger.
6

data_path




Mandatory dataset.
7

dark

[<path-to-NeXus-file>, <path-to-dataset>, <exposure-time-compensation-factor>][/dls/i13/data/2018/cm123-4/raw/6.nxs, entry1/instrument/detector/pco1/data, 1]To load all darks from the darks-only dataset found at entry1/instrument/detector/pco1/data inside a NeXus scan file, located on the file system at /dls/i13/data/2018/cm123-4/raw/6.nxs, and then to multiply their pixel values by 1 (no change to intensities).
  1. Specify this parameter only if darks are not stored in the same dataset as sample projections.
  2. If <path-to-NeXus-file> is not None, then darks are loaded from a dataset found at <path-to-dataset> inside a NeXus file, located on the file-system at <path-to-NeXus-file>, and their pixel values are then multiplied by <exposure-time-compensation-factor>.
  3. No image-key information is required to accompany the dark dataset, and, if present (at the location specified by image_key_path), this information is ignored.
  4. Note that, if <exposure-time-compensation-factor> is different from 1, then multiplication by this factor changes the data type of the dark-field dataset from integer to floating point, which may be unsuitable as input for the immediately succeeding process, e.g. Dezinger.
8

angles




If the angles parameter is set to None, then this loader attempts to find them in a default dataset, located at entry1/tomo_entry/data/rotation_angle in the input NeXus scan file.
9

ignore_flats

[ind_1, ind_2,... ind_m][1, r]To ignore the initial and the r-th batch in a given series of batches of flats (each containing however many individual flat-field images), stored in the same dataset as darks and sample projections.
  1. Useful for excluding compromised flats for scans containing multiple batches of mid-scan flats.
  2. In the ignore_flats list, batch indexing starts from 1 (not 0).


Usage

How to load dark- and flat-field data from individual NeXus datasets?

Any standard tomography NeXus scan file, generated by GDA, stores all the images (i.e. sample projections as well as dark- and flat-field images) in a single dataset located at entry1/tomo_entry/data/data, which is accompanied by another dataset containing the corresponding image-key information, located at entry1/tomo_entry/instrument/detector/image_key in the same file. The default values of NxtomoLoader's parameters have been selected to reflect this scenario. However, NxtomoLoader can be used to load dark- and flat-field data from individual NeXus datasets, if required. This can be done by modifying the flat and dark parameters appropriately (see the table above for more details).





  • No labels