config.rst 2.32 KB
Newer Older
Arnaud WATLET's avatar
Arnaud WATLET committed
.. _config:
Arnaud WATLET's avatar
Arnaud WATLET committed
Configuration
*************

Arnaud WATLET's avatar
Arnaud WATLET committed
The configuration file `config.py` defines how the OhmPi system is assembled and expected to behave. It tells the software how the hardware is set up, cabled and configured.
Arnaud WATLET's avatar
Arnaud WATLET committed
In certain cases, it also allows you to define hardware specifications, such as the maximum voltage that a specific MUX board can handle.
For general purpose, most specifications can be left on default values.
Arnaud WATLET's avatar
Arnaud WATLET committed
.. warning::
Arnaud WATLET's avatar
Arnaud WATLET committed
  Not to be confused with :ref:`settings`. One configuration specified in a config.py file can handle multiple combinations of acquisition settings.
Arnaud WATLET's avatar
Arnaud WATLET committed

Default configuration
---------------------
Arnaud WATLET's avatar
Arnaud WATLET committed
A default version of `config.py` is provided in the repository.
This file should be edited to customize the configuration following the user's needs and preferences.
A series of default configuration files are available in the configs folder. A simple helper command can help you select the appropriate configuration file depending on your version of the meausurement board and type of MUX boards.
The helper will ask you a few questions and will select the right configuration for your case. It can be called in via the terminal as
.. code-block:: bash

   $ python setup_config.py

Arnaud WATLET's avatar
Arnaud WATLET committed
Still, it is best practice to open the configuration file and check that the parameters are correctly configured.
Arnaud WATLET's avatar
Arnaud WATLET committed
Updating the configuration file manually is mandatory for custom systems combining different versions of the measurement and MUX boards.

Arnaud WATLET's avatar
Arnaud WATLET committed
Configuration file structure
----------------------------

Arnaud WATLET's avatar
Arnaud WATLET committed
The configuration is written in a python file structured in a series of dictionnaries related to:
Arnaud WATLET's avatar
Arnaud WATLET committed
#. OHMPI_CONFIG: the OhmPi instrument information (id of the instrument and default settings)
#. HARDWARE_CONFIG: the hardware system in which the five different modules 'ctl' (controller), 'tx' (transmitter), 'rx' (receiver), 'mux' (multiplexers), 'pwr' (power).
#. the logging dictionnaries divided in:
* EXEC_LOGGING_CONFIG
* DATA_LOGGING_CONFIG
*SOH_LOGGING_CONFIG
#. the MQTT dictionnaries divided in:
* MQTT_LOGGING_CONFIG
* MQTT_CONTROL_CONFIG
Arnaud WATLET's avatar
Arnaud WATLET committed

.. toctree::
   :maxdepth: 2
   :caption: Contents:

Arnaud WATLET's avatar
Arnaud WATLET committed
.. automodule:: configs.config_default
Arnaud WATLET's avatar
Arnaud WATLET committed
    :members:
    :undoc-members:
    :show-inheritance:


One should make sure to understand the parameters before altering them. It is also recommended to keep a copy of the default configuration.