tomoedf2nx.rst 2.35 KB
Newer Older
payno's avatar
payno committed
1
2
3
tomoedf2nx tutorial
===================

Christian Nemoz's avatar
Christian Nemoz committed
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

the `tomoedf2nx` application is used to convert acquisition from edf standard tomography scans to a nexus/hdf5 - NXtomo compliant format.
This format will also be stored in .h5 / .hdf5 / .nx file.
For comprehension we will use the nexus format (.nx) in this tutorial.

To call this application you can call directly

.. code-block:: bash

   nxtomomill tomoedf2nx [options]

if nxtomomill has been installed in the global scope.
Otherwise you can call


.. code-block:: bash

   python -m nxtomomill tomoedf2nx [options]


The first two parameters should be:

* input-file-directory: the root directory containing all the .edf frames and the .info file of the acquisition
* output-file: filename where the tomography scan will be stored

Sor for example to convert an edf-like tomography dataset '/data/idxx/inhouse/myname/sample1_' to 'sample1_.nx' you should call:


.. code-block:: bash

   python -m nxtomomill tomoedf2nx /data/idxx/inhouse/myname/sample1_  /data/idxx/inhouse/myname/sample1_.nx


Normally the resulting file should have more or less the same size than the initial directory.


You can also access the help of tomoedf2nx by calling:


.. code-block:: bash

   python -m nxtomomill tomoedf2nx --help


The result can be displayed using any hdf5 display or using silx:

.. code-block:: bash

   silx view /data/idxx/inhouse/myname/sample1_.nx

payno's avatar
payno committed
54
55
56
All the .edf files in the origin directory are considered except those having '_slice_' in their name.

The algorithm selects raw dark fields - darkendxxxx.edf - and raw flat fields refxxxx.edf. However, if processed darks (dark.edf) and refs (refHST) exist,
Christian Nemoz's avatar
Christian Nemoz committed
57
they are stored in the destination file instead of the raw files.
payno's avatar
payno committed
58
The names of the motors are hard-coded: 'srot' for the rotation, 'sx', 'sy' and 'sz' for the positioning motors.
59
60
61
62
63
64
65
66
67
68


.. note:: The conversion is based on a set of key value that are contained in the EDF file headers.
          Those values are set to a default value. Those values can be tune either by updating the nxtomomill.settings file
          or defined on the fly when calling tomoedf2nx. See tomoedf2nx --help to access the different keys.
          Example:

          .. code-block:: bash

              python -m nxtomomill tomoedf2nx /data/idxx/inhouse/myname/sample1_  /data/idxx/inhouse/myname/sample1_.nx --rot_angle_key=srot --ignore_file_containing=_slice_,test