Skip to content

Set Up Sensor GUI

A Graphical User Interface (GUI) script has been written to allow for easy pixel sensor registration for both sensor wafers and sensor die/tiles into the production database (PDB).

Pre-requisites

The GUI scripts only work with Python 3.

The GUI scripts have been tested on these operating systems: CentOS 7, Alma 9 and Ubuntu 22.04.

We recommend to use a virtual python environment.

Virtual Python Environment

Python virtual environment only needs to be created once. After its creation, whenever you run the scripts, please make sure that you work within the virtual environment. It has to be activated every time a new shell is opened unless the environment is set by default e.g. in ~/.bashrc.

The python virtual environment uses the python version available on the operating system.

1
2
$ python3 -m venv <venv>
$ source <venv>/bin/activate

<venv> can be substituted with any descriptive name, e.g. sensor. For future use, activate the virtual environment like instructed below, or add this line to your ~/.bashrc:

1
$ source <venv>/bin/activate

Installing and setting up the GUIs

The production database scripts can be found here: (https://gitlab.cern.ch/atlas-itk/sw/db/production_database_scripts)

(i) Cloning the python scripts from gitlab

Please execute the following commands in your shell to clone the production database scripts and move to the working directory:

1
2
3
4
$ cd <YOUR_WORK DIRECTRY>
$ git clone https://gitlab.cern.ch/atlas-itk/sw/db/production_database_scripts.git
$ git checkout sensor_production_gui
$ cd pixels/sensors_production

(ii) Installing the requirements

Requirements are listed in requirements.txt folder and must be installed before running the GUI scripts:

1
$ python -m pip install --upgrade -r requirements.txt

(iii) Setting up authentication for your user

We can register sensors into the production database after signing up a PDB user.

If you don't have an account for the production DB. Please sign up following the link below.

Tutorial page for ITk production DB (https://gitlab.cern.ch/jpearkes/itkpd_tutorial/blob/master/README.md)

Tips: This is also a tutorial for the Unicorn PDB WebApp, which is used for viewing components and data in PDB, but can also be used for registering and uploading test information (NB: The GUI is still the recommended way for uploading data into the PDB).

If you already have a production DB user or just finished registration a user, you should copy these lines into your .bashrc file for automatic authentication:

1
2
$ export ITKDB_ACCESS_CODE1="Your itkdb password1"
$ export ITKDB_ACCESS_CODE2="Your itkdb password2"

Now type itkdb authenticate in the terminal. You should get a response that you are authenticated as you and NOT as anonymous. If you experience being logged in as anonymous try to remove the .auth file via rm .auth and try again.