diff --git a/doc/source/source_rst/software/index.rst b/doc/source/source_rst/software/index.rst index 039f1fb5e7092fdd6049d75e731c8942d91fd485..76636de6cb6ce4897498c86ed5ced284db28e901 100644 --- a/doc/source/source_rst/software/index.rst +++ b/doc/source/source_rst/software/index.rst @@ -13,6 +13,5 @@ Contents: Software architecture <architecture> Getting started <installation> - Operation <operations/index> - Monitoring <monitoring> + Operating the system <operations/index> API reference <api> diff --git a/doc/source/source_rst/software/monitoring.rst b/doc/source/source_rst/software/monitoring.rst deleted file mode 100644 index 3d4d8c767f59c6faf799cf0d7daa930779f44883..0000000000000000000000000000000000000000 --- a/doc/source/source_rst/software/monitoring.rst +++ /dev/null @@ -1,16 +0,0 @@ -Monitoring application -********************** - -This section details ways to automate measurement acquisition in order to set up the OhmPi as a monitoring tool. - -Repeated acquisition at fixed intervals -======================================= -Example run_multiple sequence script - -Scheduled acquisition using crontab -=================================== -Example run_sequence script and crontab screenshot - -IoT acquisition and sensor trigger -================================== -Example node-red experiment \ No newline at end of file diff --git a/doc/source/source_rst/software/operations.rst b/doc/source/source_rst/software/operations.rst deleted file mode 100644 index 1cd3af85dbcad343a70ebc8e42eddd1f1a16e325..0000000000000000000000000000000000000000 --- a/doc/source/source_rst/software/operations.rst +++ /dev/null @@ -1,13 +0,0 @@ -Operation -######### - -This section details describes how to operate an OhmPi instrument. - -.. toctree:: - :maxdepth: 2 - - config - interfaces - loggers - - diff --git a/doc/source/source_rst/software/operations/config.rst b/doc/source/source_rst/software/operations/config.rst index 15d6b455d865e53b2eeccca45242d97046b2e48c..d4c49cfdd0db3d534697e5efde3e37616ae41bcd 100644 --- a/doc/source/source_rst/software/operations/config.rst +++ b/doc/source/source_rst/software/operations/config.rst @@ -63,7 +63,7 @@ The configuration is written in a python file structured in a series of dictionn #. HARDWARE_CONFIG: the hardware system in which the five different modules 'ctl' (controller), 'tx' (transmitter), 'rx' (receiver), 'mux' (multiplexers), 'pwr' (power). .. code-block:: python - :caption: Dictionnary containing the configuration of the hardware system. + :caption: Dictionary containing the configuration of the hardware system. r_shunt = 2. HARDWARE_CONFIG = { @@ -101,12 +101,10 @@ The configuration is written in a python file structured in a series of dictionn } } -#. the logging dictionnaries divided in: - - * EXEC_LOGGING_CONFIG +#. the logging dictionaries divided in: .. code-block:: python - :caption: Dictionnary containing the configuration of the hardware system. + :caption: EXEC_LOGGING_CONFIG # SET THE LOGGING LEVELS, MQTT BROKERS AND MQTT OPTIONS ACCORDING TO YOUR NEEDS # Execution logging configuration @@ -121,10 +119,10 @@ The configuration is written in a python file structured in a series of dictionn 'interval': 1 } - * DATA_LOGGING_CONFIG +* .. code-block:: python - :caption: Dictionnary containing the configuration of the hardware system. + :caption: DATA_LOGGING_CONFIG # Data logging configuration DATA_LOGGING_CONFIG = { @@ -140,7 +138,7 @@ The configuration is written in a python file structured in a series of dictionn * SOH_LOGGING_CONFIG .. code-block:: python - :caption: Dictionnary containing the configuration of the hardware system. + :caption: Dictionary containing the configuration of the hardware system. # State of Health logging configuration (For a future release) SOH_LOGGING_CONFIG = { 'logging_level': logging.INFO, @@ -154,13 +152,10 @@ The configuration is written in a python file structured in a series of dictionn } -#. the MQTT dictionnaries divided in: - - * MQTT_LOGGING_CONFIG +#. the MQTT dictionaries divided in: .. code-block:: python - :caption: Dictionnary containing the configuration of the hardware system. - + :caption: MQTT_LOGGING_CONFIG # MQTT logging configuration parameters MQTT_LOGGING_CONFIG = { @@ -184,10 +179,8 @@ The configuration is written in a python file structured in a series of dictionn } - * MQTT_CONTROL_CONFIG - .. code-block:: python - :caption: Dictionnary containing the configuration of the hardware system. + :caption: MQTT_CONTROL_CONFIG # MQTT control configuration parameters MQTT_CONTROL_CONFIG = { diff --git a/doc/source/source_rst/software/operations/index.rst b/doc/source/source_rst/software/operations/index.rst index e96ab18f1dbe9c9911ac8588cd37d825c7141391..dbed05b0a97d4127c7ad339d0b60ff9347015845 100644 --- a/doc/source/source_rst/software/operations/index.rst +++ b/doc/source/source_rst/software/operations/index.rst @@ -1,5 +1,5 @@ -Operation -######### +Operating the system +#################### This section details describes how to operate an OhmPi instrument. @@ -12,5 +12,6 @@ Contents: interfaces settings loggers + monitoring diff --git a/doc/source/source_rst/software/operations/interfaces.rst b/doc/source/source_rst/software/operations/interfaces.rst index 0328902858fefba2f3b07d4f7d975bc4cc274d72..910561a3612040e27c603af4e1298ef7f9e48c16 100644 --- a/doc/source/source_rst/software/operations/interfaces.rst +++ b/doc/source/source_rst/software/operations/interfaces.rst @@ -1,12 +1,10 @@ Interfaces ********** -Different interfaces can be used to interact with the OhmPi. - -Available interfaces are: -- `Web interface`_ (=HTTP interface): run in bash: `bash run_http_interface.sh` -- Python API: import the OhmPi class from Python script: `from ohmpi import OhmPi` (see `Python interface`_) -- MQTT: IoT messaging through a broker (see `MQTT interface`_) +Three interfaces can be used to interact with the OhmPi: +* a `Web interface`_: user friendly graphical interface to achieve basic operations for everyday use, such as running a sequence or repeated sequences. +* a `Python interface`_: based on the `api`_, the Python interface allows basic and more advanced operations such as custom acquisition strategies and automation. +* a `IoT interface`_: based on the MQTT messaging protocol used in IoT, it is a framework to incorporate the OhmPi system within complex experiments designs comprising other IoT sensors. Web interface @@ -83,12 +81,6 @@ To access the Python API, make sure that the PYTHONPATH has been correctly confi # time.sleep(2) # k.interrupt() # kill the asynchron sequence - ### Run multiple sequences at given time interval - k.settings['nb_meas'] = 3 # run sequence three times - k.settings['sequence_delay'] = 100 # every 100 s - k.run_multiple_sequences() # asynchron - # k.interrupt() # kill the asynchron sequence - ### Single measurement can also be taken with quadrupole = [1, 4, 2, 3] k.run_measurement(quadrupole) # use default acquisition parameters diff --git a/doc/source/source_rst/software/operations/monitoring.rst b/doc/source/source_rst/software/operations/monitoring.rst new file mode 100644 index 0000000000000000000000000000000000000000..198734ded34cc2f27a39bd1ef4efe7dd203134c0 --- /dev/null +++ b/doc/source/source_rst/software/operations/monitoring.rst @@ -0,0 +1,23 @@ +Monitoring application +********************** + +This section details ways to automate measurement acquisition in order to set up the OhmPi as a monitoring tool. + +Repeated acquisition at fixed intervals +======================================= +The easiest way to set up time-lapse acquisition is to perform repeated acquisition of a sequence at fixed intervals. +Repeated acquisition can be initiated from the three different `interfaces`_. + + ### Run multiple sequences at given time interval + k.settings['nb_meas'] = 3 # run sequence three times + k.settings['sequence_delay'] = 100 # every 100 s + k.run_multiple_sequences() # asynchron + # k.interrupt() # kill the asynchron sequence + +Scheduled acquisition using crontab +=================================== +Example run_sequence script and crontab screenshot + +IoT acquisition and sensor trigger +================================== +Example node-red experiment \ No newline at end of file diff --git a/doc/source/source_rst/software/operations/settings.rst b/doc/source/source_rst/software/operations/settings.rst index dee6448268dccec8215e07599b9be0d3bf2e261e..29a6e8d62f10f6906356b9317e0acb54f01fa34d 100644 --- a/doc/source/source_rst/software/operations/settings.rst +++ b/doc/source/source_rst/software/operations/settings.rst @@ -1,11 +1,10 @@ -.. _settings: Acquisition settings ******************** This section details the acquisition settings that can be specified for measurement on a quadrupole. -.. code-block:: json - :caption: Dictionnary containing the default settings contained in ´settings/default.json` +.. code-block:: python + :caption: json dictionary containing the default settings contained in ´settings/default.json` { "injection_duration": 0.2, # injection duration of one pulse within an injection cycl @@ -24,7 +23,7 @@ This section details the acquisition settings that can be specified for measurem For more information on these settings, see the API doc for :func:`ohmpi.ohmpi.OhmPi.run_measurement`, :func:`ohmpi.ohmpi.OhmPi.run_measurement` and :func:`ohmpi.ohmpi.OhmPi.run_measurement` In addition to these default settings, and for advanced users, additional settings related to the injection strategy "vmax" and "vmin" can also be specified in the json settings file as follows: -.. code-block:: json +.. code-block:: python :caption: Dictionnary containing the default settings contained in ´settings/default.json` { @@ -34,5 +33,4 @@ In addition to these default settings, and for advanced users, additional settin "vmn_min": null, # minimum V_mn (in mV) bounding the vmax injection strategy. Value is capped by vmn_min from hardware config. Default is None, which means vmax strategy bounded by hardware vmn_min from hardware config. } -For more information on these settings, see the API donc for :func:`ohmpi.ohmpi.OhmPi.run_measurement`. -:py:meth;`ohmpi.ohmpi.OhmPi.run_measurement`. +For more information on these settings, see the API donc for :func:`OhmPi.run_measurement`. \ No newline at end of file