2.3. 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. 2.4)


Fig. 2.4 Local folder to store configuration files

2.3.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.

2.3.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 2.1 Default Configuration file of PyMoDAQ that will be copied on the local folder where the user can modify it
    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"

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

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

        username = "pymodaq_user"
        pwd = "pymodaq"

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

    ip = ""
    port = 6341

default_preset_for_scan = "preset_default"
default_preset_for_logger = "preset_default"

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

    wait_time = 0
    wait_time_between = 0
    timeout = 10000  # in millisecond

    type = "Linear" # either "Linear", "Adaptive", "Linear back to start", "Random" see pymodaq.utils.scanner.py
    start = 1.0
    stop = 2.0
    step = 0.01

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

    type = "Linear" #either "Linear", "Adaptive" see pymodaq.utils.scanner.py
    curvilinear = 0.1