| 1 |
HDF5Converter |
| 2 |
''''''''''''' |
| 3 |
|
| 4 |
The more it goes the more use cases the hdf5 converter has to handle. |
| 5 |
Today it handles "classical" tomography acquisition, zseries and multi-tomo. |
| 6 |
|
| 7 |
Behavior of the HDF5Converter |
| 8 |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 9 |
|
| 10 |
The HDF5 is applying sequentially the following taks: |
| 11 |
|
| 12 |
1. preprocess raw data (During converter creation) |
| 13 |
|
| 14 |
browse raw data and collect information on Bliss scan sequence. |
| 15 |
|
| 16 |
During this step it will determine for each entry if the frame type are dark, flats, projections or alignment. |
| 17 |
|
| 18 |
Create an instance of Acquistion for each 'init' Bliss scan. |
| 19 |
|
| 20 |
2. HDF5Converter.convert function |
| 21 |
|
| 22 |
2.1 create for Acquisition instance one or several instances of :class:`NXtomo`. |
| 23 |
|
| 24 |
2.2 Optional split of NXtomo (use case of multi-tomo) in order to obtain the final NXtomo. |
| 25 |
|
| 26 |
2.3 save data to disk. |
| 27 |
|
| 28 |
|
| 29 |
Acquistion classes |
| 30 |
^^^^^^^^^^^^^^^^^^ |
| 31 |
|
| 32 |
To manage all the use cases it has evolved. Each acquisition has now it's own acquisition class. All based on the :class:`nxtomomill.converter.hdf5.acquisition.baseacquisition.BaseAcquisition` |
| 33 |
|
| 34 |
- :class:`.StandardAcquisition` default acquisition. |
| 35 |
- :class:`.ZSeriesBaseAcquisition` a serie of default acquisition with a set of z values. Create one NXTomo per different z |
| 36 |
|
| 37 |
|
| 38 |
The regular conversion sequence is: |
| 39 |
|
| 40 |
.. image:: img/hdf5_sequence_diagram.png |
| 41 |
:width: 600 px |
| 42 |
:align: center |
| 43 |
|
| 44 |
Actually we also have two configuration handler classes. Both inherit from :class:`nxtomomill.io.confighandler.BaseHDF5ConfigHandler`. |
| 45 |
|
| 46 |
The configuration handler is used to make the connection between applications options and configuration (:class:`nxtomomill.io.config.TomoHDF5Config`) |
| 47 |
|
| 48 |
- :class:`.TomoHDF5ConfigHandler`: used by *h52nx* application |
| 49 |
|
| 50 |
The configuration is used to make the conversion (defines input file, output file, entry titles, urls to be converted, source format...) |
| 51 |
|
| 52 |
Actually there is also two configuration classes. |
| 53 |
|
| 54 |
- :class:`.TomoHDF5Config`: define the configuration to generate a usual "NXTomo" |