diff --git a/doc/api_reference.rst b/doc/api_reference.rst index c00bbb0..a4930a1 100644 --- a/doc/api_reference.rst +++ b/doc/api_reference.rst @@ -5,16 +5,6 @@ API Reference This page provides an auto-generated reference of all DAMARIS classes, functions, and modules. It is built from docstrings using Sphinx autodoc and autosummary. -.. toctree:: - :maxdepth: 1 - :caption: Modules: - - damaris/data - damaris/experiments - damaris/gui - damaris/tools - - Data Module =========== diff --git a/doc/conf.py b/doc/conf.py index c66ff43..0bdac1f 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -33,7 +33,7 @@ bibtex_bibstyles = ['numeric'] bibtex_citestyle = 'numeric' templates_path = ['_templates'] -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'damaris/**'] language = 'en' @@ -42,4 +42,4 @@ language = 'en' #html_theme = 'alabaster' html_theme = 'sphinx_rtd_theme' -html_static_path = ['_static'] +html_static_path = [] diff --git a/doc/manual.rst b/doc/manual.rst index a76ae76..1660f76 100644 --- a/doc/manual.rst +++ b/doc/manual.rst @@ -395,7 +395,7 @@ All four are commonly used in NMR spectroscopy. The line broadening factor LB is .. math:: f(x)=exp(-tp \cdot LB - GM \cdot tp^2) -- :meth:`damaris.data.DamarisFFT.DamarisFFT.traf_window`(line_broadening=10 ) +- :meth:`damaris.data.DamarisFFT.DamarisFFT.traf_window` (line_broadening=10) This sets a TRAF window :cite:p:`Traficante:1987fk` over the data: .. math:: diff --git a/src/damaris/data/DataPool.py b/src/damaris/data/DataPool.py index 70c978c..8548df9 100644 --- a/src/damaris/data/DataPool.py +++ b/src/damaris/data/DataPool.py @@ -15,7 +15,7 @@ class DataPool(collections.abc.MutableMapping): # supports translation from dictionary keys to pytables hdf node names # taken from: Python Ref Manual Section 2.3: Identifiers and keywords - # things are always prefixed by "dir_" or "dict_" + # things are always prefixed by ``dir_`` or ``dict_`` """ translation_table="" for i in range(256): @@ -118,44 +118,28 @@ class DataPool(collections.abc.MutableMapping): This method serializes the entire content of the data pool into an HDF5 file, creating appropriate groups and arrays based on the keys and values stored in the data pool. Nested storage paths are supported, and group or array names are - converted into valid HDF5 names. Paths are prepended with "dir_", results with "dict_". - If duplicate names arise, extensions (like `_001`, `_002`) + converted into valid HDF5 names. Paths are prepended with ``dir_``, results with ``dict_``. + If duplicate names arise, extensions (like ``_001``, ``_002``) are appended to ensure uniqueness. - Parameters: - hdffile : str | bytes | tables.File - Path to the HDF5 file or an already open `tables.File` object where the - data should be written. Strings or bytes are interpreted as file paths. + :param hdffile: HDF5 file path or an open ``tables.File`` object. + :type hdffile: str, bytes, or tables.File + :param where: Root HDF5 group path under which data is stored. + :type where: str + :param name: Name of the root HDF5 group. Defaults to ``data_pool``. + :type name: str + :param complib: Compression library; ``None`` disables compression. + :type complib: str or None + :param complevel: Compression level; unused when ``complib`` is ``None``. + :type complevel: int or None + :param incremental: If true, write only keys changed since the last write. + :type incremental: bool + :param write_interval: Time interval in seconds between periodic writes. + :type write_interval: int + :raises Exception: If ``hdffile`` is neither a string nor a ``tables.File`` object. - where : str, optional - The root HDF5 group path under which the data pool will be stored. - Defaults to "/". - - name : str, optional - The name of the root HDF5 group under which the data pool is saved. - Defaults to "data_pool". - - complib : str, optional - Compression library to be used when creating HDF5 arrays. Optional, defaults - to None, meaning no compression is applied. - - complevel : int, optional - Compression level to use when applying compression. Has no effect if `complib` - is set to None. - - incremental : bool, optional - If True, only write keys that have been modified since the last write (dirty keys). - If False, write all keys. Defaults to False. - - write_interval : int, optional - Time interval in seconds between periodic writes. - Defaults to 0. - - Raises: - Exception - If `hdffile` is neither a string nor a valid `tables.File` object. - - Notes: + Notes + ----- - This method assumes that the content of the data pool does not change during the write operation. - Keys in the data pool starting with "__" (double underscores) are skipped. diff --git a/src/damaris/gui/logging_utils.py b/src/damaris/gui/logging_utils.py index 2a25fb6..b18dd59 100644 --- a/src/damaris/gui/logging_utils.py +++ b/src/damaris/gui/logging_utils.py @@ -2,7 +2,8 @@ """ Unified logging for DAMARIS. -Provides: +Provides these components: + - FileTailerHandler: reads new lines from the backend log file and emits them as logging records into the damaris.backend logger. - LogDispatcher: a logging.Handler that dispatches records to both a GTK