Commit b27eb0e0 authored by Arnaud WATLET's avatar Arnaud WATLET
Browse files

update software doc

Showing with 44 additions and 51 deletions
+44 -51
......@@ -13,6 +13,5 @@ Contents:
Software architecture <architecture>
Getting started <installation>
Operation <operations/index>
Monitoring <monitoring>
Operating the system <operations/index>
API reference <api>
Operation
#########
This section details describes how to operate an OhmPi instrument.
.. toctree::
:maxdepth: 2
config
interfaces
loggers
......@@ -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 = {
......
Operation
#########
Operating the system
####################
This section details describes how to operate an OhmPi instrument.
......@@ -12,5 +12,6 @@ Contents:
interfaces
settings
loggers
monitoring
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
......
......@@ -5,7 +5,14 @@ This section details ways to automate measurement acquisition in order to set up
Repeated acquisition at fixed intervals
=======================================
Example run_multiple sequence script
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
===================================
......
.. _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
Supports Markdown
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