Skip to content
Snippets Groups Projects
user avatar
Karim Ahmed authored
203d3750
History

Offline Calibration Reportservice

The Reportserivce is a service responsible for handling requests (manual or automatic triggers) for generating the DetectorCharacterization reports based on the requested configurations.

The Reportservice mainly consists of a service, clients and YAML configuration. The service keeps on listening to any ZMQ requests with a given configurations. Then based on these configurations, it produces slurm jobs (through xfel-calibrate command line) to generate *.png plots of calibration configurations over time.

Finally these generated plots are pushed on to DetectorCharacterization(DC) remote repository and displayed on the ReadTheDocs(RTD).

Configuration

It is important to know the machine name and the port, where the reportservice is running, for successful connection.

report_conf.yaml is the configuration file, which contains all the required information for operating and connecting to the reportservice.

The global information holds the path to the DetectorCharacterization main tool for displaying the plots. Also, the information over the server (reportservice.py) and the time for automatic triggers for updating DC plots.

    Global
        git:
            repo-local: "/gpfs/exfel/data/scratch/<username>/DetectorCharacterization/"
            figures-remote: "http://<username>:<git-access-tocken>@git.xfel.eu/gitlab/detectors/DetectorCharacterization.git"
            server-port: "tcp:<host-name>:<port-address>"

        report_service:
            report-service:
            port: <port-address>
            bind-to: tcp://*
            job-db: ./reportservice_jobs.sqlite
            job-update-interval: 30
            job-timeout: 12000

The YAML configuration file can be modified with all the available parameters, responsible for generating the required plots and DC report on RTD.

    <instrument>:
        <detector>:
            det-type:

            start-date:
            nconstants:
            end-date:

            constants:
                - "Noise"
                - "Offset"

            modules:

            bias-voltages:

            mem-cells:

            out-folder:
            cal-db-timeout: 180000
            cal-db-interface: "<cal-db-host-port>"

Starting the Service

The reportservice is a python script that can run through:

```bash
python reportservice.py
```

The available command line arguments are:

  • --report-conf : The path for the main report configuration yaml file
  • --log : The logging mode (INFO, DEBUG, ERROR)

Launching the service

The service can be launched through two processes:

Automatic Launch:

This is a similar script to reportservice.py that needs to be run using:

```bash
python automatic_run.py
```

Manual Launch:

This manual launch script is currently used for debugging purposes, only.