4. Configuration

All configuration files used by PyMoDAQ will be located within a folder named pymodaq_local saved by default on the user Home folder (see Fig. Fig. 4.1)

local_folder

Fig. 4.1 Local folder to store configuration files

4.1. Configs from Managers

Each folder contains dedicated files: the log as text file and all module configuration files as xml files. These files are generated by dedicated managers when the user is configuring one aspect of PyMoDAQ, for instance using the Preset manager for defining Actuators and Detectors in the Dashboard. Apart the log, a user should not interact directly with those but use their respective manager user interface to create and modify them.

4.2. Default configuration

The config.toml file is the only exception. It is there so that a particular user could enter specific personal information such as the name that will be used by default in the metadata, default preset file to load if executing directly the DAQ_Scan extension, default type of Scan and so on. The file can be directly modified or accessed within the Dashboard in the file menu.

Listing 4.1 Default Configuration file of PyMoDAQ that will be copied on the local folder where the user can modify it
[data_saving]
    [data_saving.h5file]
    save_path = "C:\\Data"  #base path where data are automatically saved
    compression_level = 5  # for hdf5 files between 0(min) and 9 (max)

    [data_saving.hsds] #hsds connection option (https://www.hdfgroup.org/solutions/highly-scalable-data-service-hsds/)
    #to save data in pymodaq using hpyd backend towards distant server or cloud (mimicking hdf5 files)
    root_url = "http://hsds.sebastienweber.fr"
    username = "pymodaq_user"
    pwd = "pymodaq"

[general]
debug_level = "DEBUG" #either "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"
debug_levels = ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"]
check_version = true  #automatically check version at startup

[user]
name = "User name"  # default name used as author in the hdf5 saving files

[network]
    [network.logging]
        [network.logging.user]
        username = "pymodaq_user"
        pwd = "pymodaq"

        [network.logging.sql] #location of the postgresql database server and options where the DAQ_Logger will log data
        ip = "10.47.3.22"
        port = 5432

    [network.tcp-server]
    ip = "10.47.0.39"
    port = 6341

[presets]
default_preset_for_scan = "preset_default"
default_preset_for_logger = "preset_default"

[scan]
    default = "Scan1D"
    Naverage = 1  # minimum is 1
    steps_limit = 1000  # the limit of the number of steps you can set in a given scan

    [scan.timeflow]
    wait_time = 0
    wait_time_between = 0
    timeout = 10000  # in millisecond

    [scan.scan1D]
    type = "Linear" # either "Linear", "Adaptive", "Linear back to start", "Random" see pymodaq.daq_utils.scanner.py
    start = 1.0
    stop = 2.0
    step = 0.01

    [scan.scan2D]
    type = "Spiral" # either "Spiral", "Linear", "Adaptive", "Back&Forth", "Random" see pymodaq.daq_utils.scanner.py
    start1 = -5
    start2 = -5
    stop1 = 5
    stop2 = 5
    step1 = 0.1
    step2 = 0.1
    npts = 10

    [scan.tabular]
    type = "Linear" #either "Linear", "Adaptive" see pymodaq.daq_utils.scanner.py
    curvilinear = 0.1