Skip to content

Commit

Permalink
tomato_Component
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterKraus committed Nov 20, 2024
1 parent 734f3df commit f8ee72f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 6 additions & 3 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,19 @@ Each *job* stores its data and logs in its own *job* folder, which is a subfolde
Note that a *pipeline* dashboard functionality is planned for a future version of ``tomato``.


Final job data
**************
Final job data and metadata
***************************
By default, all data in the *job* folder is processed to create a NetCDF file. The NetCDF files can be read using :func:`xaray.open_datatree`, returning a :class:`xarray.DataTree`.

In the root node of the :class:`~xarray.DataTree`, the :obj:`attrs` dictionary contains all **tomato**-relevant metadata. This currently includes:

- ``tomato_version`` which is the version of **tomato** used to create the NetCDF file,
- ``tomato_Job`` which is the *job* object serialised as a json :class:`str`, containing the full *payload*, sample information, as well as *job* submission/execution/completion time.

The child nodes of the :class:`~xarray.DataTree` contain the actual data from each *pipeline* *component*, unit-annotated using the CF Metadata Conventions. The node names correspond to the ``role`` that *component* fullfils in a *pipeline*. The :obj:`attrs` dictionary of each node contains a ``tomato_Component`` entry, which is the *component* object serialised as a json :class:`str`, containing information about the *device* address and channel defining the *component* as well as its capabilities.
The child nodes of the :class:`~xarray.DataTree` contain:

- the actual data from each *pipeline* *component*, unit-annotated using the CF Metadata Conventions. The node names correspond to the ``role`` that *component* fullfils in a *pipeline*.
- a ``tomato_Component`` entry in the :obj:`attrs` object, which is the *component* object serialised as a json :class:`str`, containing information about the *device* address and channel that define the *component*, the *driver* and *device* names, as well as the *component* capabilities.

.. note::

Expand Down
1 change: 0 additions & 1 deletion tests/test_99_example_counter.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ def test_counter_npoints_metadata(
assert "tomato_Component" in ds.attrs



@pytest.mark.parametrize(
"casename",
[
Expand Down

0 comments on commit f8ee72f

Please sign in to comment.