File: dxfile2nx.rst

package info (click to toggle)
python-nxtomomill 2.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,340 kB
  • sloc: python: 17,207; makefile: 15; sh: 3
file content (53 lines) | stat: -rw-r--r-- 1,955 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
.. _dxfile2nxtutorial:

dxfile2nx tutorial
==================

.. article-info::
    :read-time: 10 min read
    :class-container: sd-p-2 sd-outline-muted sd-rounded-1

the `dxfile2nx` application is used to convert an acquisition stored with the `dxfile format <https://dxfile.readthedocs.io/en/latest/>`_ to the `NXTomo <https://manual.nexusformat.org/classes/applications/NXtomo.html>`_ format.

To call this application you can call directly

.. code-block:: bash

   nxtomomill dxfile2nx [input_file] [output_file] [[options]]

You can access help by calling

.. program-output:: nxtomomill dxfile2nx --help


Here is an example on how to convert a dxfile.
For it we downloaded the `tomo_00068 dataset <https://tomobank.readthedocs.io/en/latest/source/data/docs.data.phasecontrast.html#wet-sample>`_

To convert it we simply go for

.. code-block:: bash

    nxtomomill dxfile2nx tomo_00068.h5 tomo_00068.nx

Here the conversion will set default values to parameters that are not recorded in the dxfile but that tomography software mights need. Such as beam energy ...
Here is an example of providing more information to the converter and requesting the converter to overwrite the output NXtomo entry if it exists

.. code-block:: bash

    nxtomomill dxfile2nx tomo_00068.h5 tomo_00068.nx --scan-range 0,180 --distance 0.15 --energy 14 --overwrite

Here is an example of the NXTomo entry generated:

.. image:: img/tomo_00068_nxtomo_entry.png
   :width: 600 px
   :align: center

From it you can use several tomography tool like `nabu <https://gitlab.esrf.fr/tomotools/nabu>`_ and / or `tomwer <https://gitlab.esrf.fr/tomotools/tomwer>`_.

.. warning:: to have a complete usage of tomwer you will also have to provide the field of view of the detector (Full or Half)

Example of the reconstruction of the middle slice using `nabu <https://gitlab.esrf.fr/tomotools/nabu>`_:

.. image:: img/tomo_00068_nabu_rec.png
   :width: 600 px
   :align: center