Darks and flats#

The standard loader supports dark and flat images that are:

  • stored with the projections;

  • stored in separate files or datasets;

  • absent; or

  • present but intentionally ignored.

Stored with the projections#

When projections, darks, and flats share one dataset, use image_key_path to identify their image types. This is the standard configuration shown in Standard tomography loader.

Separate datasets without image keys#

If a separate dataset contains only darks or only flats, specify its file and data_path:

 - method: standard_tomo
   module_path: httomo.data.hdf.loaders
   parameters:
     darks:
       file: path/to/darks.nxs
       data_path: /entry1/tomo_entry/data/data
     flats:
       file: path/to/flats.nxs
       data_path: /entry1/tomo_entry/data/data

Use input_data when the separate datasets are in the main input file:

 - method: standard_tomo
   module_path: httomo.data.hdf.loaders
   parameters:
     darks:
       file: input_data
       data_path: /exchange/darks
     flats:
       file: input_data
       data_path: /exchange/flats

Separate data with image keys#

If a specified dataset contains several image types, also provide its image_key_path:

 - method: standard_tomo
   module_path: httomo.data.hdf.loaders
   parameters:
     darks:
       file: path/to/darks.nxs
       data_path: /entry1/tomo_entry/data/data
       image_key_path: /entry1/tomo_entry/instrument/detector/image_key
     flats:
       file: path/to/flats.nxs
       data_path: /entry1/tomo_entry/data/data
       image_key_path: /entry1/tomo_entry/instrument/detector/image_key

Missing darks or flats#

No additional configuration is required when the data does not contain darks or flats. HTTomo handles their absence automatically.

Ignoring darks or flats#

Set either parameter to ignore to exclude images that are present in the dataset:

 - method: standard_tomo
   module_path: httomo.data.hdf.loaders
   parameters:
     darks: ignore
     flats: ignore