Commit f6ba8189 authored by payno's avatar payno
Browse files

[doc] add an example for modifying flat field from scratch

parent c62447f6
Pipeline #37054 failed with stages
in 8 minutes
......@@ -83,3 +83,49 @@ Those are some examples of usage:
* modify frame to `dark` type if any
* modify frame to `invalid` if any
Concrete example of modifying flat field on an .nx file
-------------------------------------------------------
In this example flat field frames at from acquisition A has been mess up.
NXTomo file is name original_acquiA.nx. Entry name is entry000A
And we want to replace them by flat field from acquisition B (master file is acquiB.nx). Entry name is entry000B
This is one way to proceed to replace flat field frames:
1. go to acquisition A folder containing the acquiA.nx file
.. code-block:: bash
cd [path_to_acquisitionA_folder]/acquisitionA
2. copy the original .nx file. Modification are in place. This is safer to copy the file.
.. code-block:: bash
cp original_acquiA.nx acquiA.nx
3. invalidate the flat field frames made at start. In the case let say that we want to invalid frames from 20 to 40 included:
.. code-block:: bash
nxtomomill patch-nx set83_tomo_black_drum_LPJ01_6p5p_20N_0001_0000_patch.nx entry0000 --invalid-frames 20:41
4. check that the invalidation of frames worked properly using silx view for example
5. get the silx url you want to link as the new flat field. Syntax is `silx://[file_path]?path=[data_path]&slice=[slices]`
for example here we want to link frames 2000 to 2021 from acquiB.nx
So the url looks like: silx://[folder_to_acquiB]/acquiB.nx?path=/entry000B/instrument/detector/data&slices=2000:2021
6. then patch flat from patch-nx command and the 'flats-at-start' option:
.. code-block:: bash
nxtomomill patch-nx acquiA.nx entry000A --flats-at-start "silx://[folder_to_acquiB]/acquiB.nx?path=/entry000B/instrument/detector/data&slices=2000:2021"
.. warning::
when you provide the url make sure you use `"` or `'` characters. Otherwise in this case the command will be executed as a background task and slices will be ignored.
It will also try to link it with the full dataset at `/entry000B/instrument/detector/data`
7. check that your dataset is complete (using silx view for example)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment