Commit 4e940794 authored by Thomas Vincent's avatar Thomas Vincent

merge Merge page into loading project page + update it

parent 2fe23e55
.. _merge_kmap:
Merging KMAP data
=================
.. |merge_window| image:: img/merge_window.png
When using X-SOCS to merge data the following window is displayed:
+---------------+
| Merge window |
+===============+
| |merge_window||
+---------------+
Fill the :ref:`input parameters <input_parse>` then start the parsing by clicking on ``parse file``.
The time it takes depends on the size of the spec file. It can take more than
a minute if the file is very large.
.. warning::
At the moment X-SOCS will merge all scans found in the SPEC file that
have a matching EDF file. So you will have to make sure that ONLY the
images corresponding to the scans you want to merge are in that folder.
When the parsing is done the other parameter fields become enabled
(:ref:`parse results <spec_and_edf>`,
:ref:`acquisition parameters <merge_acq_params>`
and :ref:`output parameters <merge_output_params>`).
After filling in those fields, click on ``Merge`` at the bottom of the window.
You will be presented with q summary of the files that will created. Presse
``Merge`` again to start the merge.
.. note::
When the merge starts you should see the progress of some files change from
0 to 2%, and then not change for a while. This is because the merge process
is opening the EDF files, this can take a while, and there is at the
moment no way to get the progress until its done.
When all is done, click on ``Close`` to close the window.
....
Fields description
------------------
.. _input_parse:
+-------------------+--------------------------------------------------------+
| Input |
+===================+========================================================+
| ``Spec file`` | path to the log (usualy a \*.spec file) |
| | generated by the |
| | KMAP command. It contains all the scans defails. |
+-------------------+--------------------------------------------------------+
| ``Img dir`` | path to the folder containing the EDF files that |
| | must be merged into the HDF5 file. |
+-------------------+--------------------------------------------------------+
| ``Version`` | allows you to select predefined values for the nextNr |
| | padding and offset. For data acquired before March 2016|
| | you will probably want to set the version to 0, |
| | otherwise version 1 should be OK. |
+-------------------+--------------------------------------------------------+
| ``nextNr padding``| controls the padding applied to the nextNr value found |
| | in the spec file which is used to generated the EDF |
| | file name. This setting is only used for data acquired |
| | before mid 2016. |
+-------------------+--------------------------------------------------------+
| ``nextNr offset`` | controls the offset applied to the nextNr value. |
+-------------------+--------------------------------------------------------+
....
.. _spec_and_edf:
+-------------------+--------------------------------------------------------+
| Spec + EDF |
+===================+========================================================+
| ``Matched scans`` | scans found in the spec file which have |
| | a matching EDF file. |
+-------------------+--------------------------------------------------------+
| ``Other scans`` | scans found in the spec file which do NOT have |
| | a matching EDF file. |
+-------------------+--------------------------------------------------------+
....
.. _merge_acq_params:
+-------------------+--------------------------------------------------------+
| Acq. Parameters |
+===================+========================================================+
| ``Beam energy`` | energy of the beam, in eV |
+-------------------+--------------------------------------------------------+
| ``Direct beam`` | position of the direct beam on the detector (in pixels)|
+-------------------+--------------------------------------------------------+
| ``Ch. per deg.`` | channels per degree |
+-------------------+--------------------------------------------------------+
....
.. _merge_output_params:
+---------------------+--------------------------------------------------------+
| Output |
+=====================+========================================================+
| ``Prefix`` | a string that will be prepended to all the hdf5 file |
| | names. Default is the "prefix" value found in the |
| | spec file |
+---------------------+--------------------------------------------------------+
| ``Ouput directory`` | folder into which the merged files will be written |
+---------------------+--------------------------------------------------------+
......@@ -7,13 +7,17 @@ Once X-SOCS is started, you can either create a `New project`_ or open an `Exist
A project contains the information about a single K-map acquisition (scans and calibration) and stores data reduction results (conversion to QSpace and fit).
.. _create_project:
New project
-----------
+++++++++++
.. |create_icon| image:: ../../../xsocs/resources/gui/icons/create_project.png
To start the project creation wizard, click on the |create_icon| button in the toolbar or select the **Create project** item in the **File** menu.
Create project
--------------
The first page will ask you for the folder path into which the new project will be created.
.. warning::
......@@ -25,12 +29,136 @@ The next page gives you the choice between:
#. **Load X-Socs data (HDF5)** to import K-map data already in HDF5 format.
To load data that has already been merged, select the `master` file of the merged data (the file that contains links to all entries).
Once the project is created, the `Project summary`_ page is displayed.
#. **Import SPEC data** to import K-map data from SPEC and EDF files.
X-SOCS will merge the SPEC file and the EDF images into HDF5 files.
See :ref:`merging K-map SPEC and EDF data <merge_kmap>` for details.
See `Merge SPEC and EDF to HDF5`_ below.
Merge SPEC and EDF to HDF5
--------------------------
When using X-SOCS to merge data the following window is displayed:
.. _figure_merge_window:
.. figure:: img/merge_window.png
:align: center
Merge window
Fill the `Input Parameters`_ before starting the parsing by clicking on the **Parse file** button.
The time it takes depends on the size of the spec file.
It can take more than a minute if the file is very large.
.. warning::
At the moment X-SOCS merges all scans found in the SPEC file that have a matching EDF file.
So you will have to make sure that ONLY the images corresponding to the scans you want to merge are in the **Img. dir** folder.
Once SPEC parsing is done, the other parameter fields are enabled:
- `SPEC + EDF Parameters`_ for parsing results and scan/EDF file matching.
- `Image ROI Parameters`_ for only saving a region of interest from the input images.
- `Acq. Parameters`_ for calibration information.
In case this information is available in the SPEC file, those parameters are already set.
- `Output Parameters`_.
After filling those fields, click on the **Merge** button at the bottom of the window to start the file conversion.
.. note::
When the merge starts you should see the progress of some files changing from 0 to 2%, and then not change for a while.
This is because the merge process is opening the EDF files to get the number of frames and this can take a while.
Once the conversion to HDF5 is done, the `Project summary`_ page is displayed.
Input Parameters
................
.. list-table::
:widths: 1 4
:header-rows: 1
* - Parameter
- Description
* - ``Spec file``
- Path to the log (usually a \*.spec file) generated by the K-map command.
It contains the information of all the scans.
* - ``Img. dir``
- Path to the folder containing the EDF files that must be merged into the HDF5 file.
* - ``Version``
- Allows you to select predefined values for the nextNr padding and offset.
For data acquired before March 2016 you will probably want to set the version to 0, otherwise version 1 should be OK.
* - ``nextNr padding``
- Controls the padding applied to the nextNr value found in the spec file which is used to generated the EDF file name.
This setting is only used for data acquired before mid 2016.
* - ``nextNr offset``
- Controls the offset applied to the nextNr value.
SPEC + EDF Parameters
.....................
.. list-table::
:widths: 1 4
:header-rows: 1
* - Parameter
- Description
* - ``Matched scans``
- Scans found in the spec file which have a matching EDF file.
* - ``Other scans``
- Scans found in the spec file which do NOT have a matching EDF file.
Image ROI Parameters
....................
.. list-table::
:widths: 1 4
:header-rows: 1
* - Parameter
- Description
* - ``Offset``
- ``Row`` and ``Column`` in detector pixels coordinate of the ROI corner.
* - ``Size``
- ``Width`` and ``Height`` in pixels of the ROI.
Acq. Parameters
...............
.. list-table::
:widths: 1 4
:header-rows: 1
* - Parameter
- Description
* - ``Beam energy``
- Energy of the beam, in eV
* - ``Direct beam``
- Position in pixels of the direct beam on the detector
* - ``Ch. per deg.``
- Channels per degree
Output Parameters
.................
.. list-table::
:widths: 1 4
:header-rows: 1
* - Parameter
- Description
* - ``Prefix``
- String that will be prepended to all the hdf5 file names.
Default is the "prefix" value found in the SPEC file
* - ``Output directory``
- Folder into which the merged files will be written
Project summary
---------------
Once data has been imported, X-SOCS sums the intensity of all images.
This can take quite some time depending on the size of the acquired data.
......@@ -47,8 +175,9 @@ Click on **Finish** to display the newly created project in the :ref:`project tr
.. _load_project:
Existing project
----------------
++++++++++++++++
.. |open_icon| image:: img/open_icon.png
......
......@@ -22,4 +22,3 @@ How to use *X-SOCS* to reduce KMAP data, step by step.
:hidden:
usage/conversion.rst
usage/merge.rst
Markdown is supported
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