-
Notifications
You must be signed in to change notification settings - Fork 0
Install and config
Before installing, ensure you have the following dependencies installed:
- Python 3.12 or later
- Git
- Virtualenv or Conda (recommended)
To install the project, clone the repository using:
git clone https://github.com/darderik/WASIC.git
cd WASIC
It is recommended to use a virtual environment to manage dependencies. You can set it up using either virtualenv
or conda
:
python3 -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate
pip install -r requirements.txt
conda create --name wasic_env python=3.8
conda activate wasic_env
pip install -r requirements.txt
The software relies on a config.json
file to define the main settings for instrument handling, data storage, and logging. Below is an explanation of each key present in the configuration file:
This key holds a list of alias keywords that are used to filter the instruments being added to the system. If an instrument’s identifier does not match any of the aliases, it will not be considered. This mechanism prevents unwanted or unknown instruments from being included in the system. Note that these aliases do not uniquely identify a device, nor do they control its connection parameters.
Example:
"instr_aliases": [
"Raspberry",
"Model 2000",
"Relay Matrix"
]
Defines the communication method used to interact with instruments. The system primarily supports pyvisa
, while serial
is available for backward compatibility. The pyvisa
mode has been extensively tested, while serial
has limited testing.
Allowed values:
-
pyvisa
(recommended, fully supported) -
serial
(legacy, limited testing)
Example:
"communication_mode": "pyvisa"
Specifies the file path where instrument connection data is stored. This file is dynamically updated by the user interface to persist instrument connections, avoiding the need to fetch and add all instruments again manually after restarting the application.
Example:
"instrument_connections_datapath": "data/instr/instruments.json"
Indicates the directory where chart data is stored. This path is static and cannot be modified at runtime. Graphs generated from instrument data are saved in this location.
Example:
"data_charts_path": "data/charts"
Sets the default timeout (in seconds) for serial and SCPI operations. This value determines the maximum waiting time before a communication attempt fails.
Example:
"default_timeout": 0.5
Defines the list of instrument classes that expose properties accessible through the web interface. If an instrument's type is included in this list, the web app will allow users to view and modify its properties. If a type is missing from this list, the instrument’s properties will not be displayed.
Example:
"init_properties_types": [
"NV34420",
"K2000",
"RaspberrySIM"
]
Specifies the logging level for the application. This setting follows standard Python logging levels and can be adjusted to control the verbosity of logs.
Allowed values:
DEBUG
INFO
WARNING
ERROR
CRITICAL
Example:
"log_level": "INFO"
By properly configuring the config.json
file, users can tailor the system’s behavior to match their needs, ensuring efficient instrument control, data persistence, and logging management.
Once installed, you can launch the application using:
python3 main.py
If using a virtual environment, make sure it is activated before running the command.