Skip to main content

Python wrapper to interface with LocalDB and Production DB for common tasks for pixel modules.

Project description

Module QC Database Tools v0.0.1

The package to regisiter ITkPixV1.1 modules, and generate YARR configs from ITk production database using itkdb API.

Set-Up and First-time Installation

A minimum of python version 3.7+ is required.

Virtual Python Environment

Creating the python virtual environment the standard way used the python version available on the operating system. For CentOS 7 this is version 3.6. If using CentOS 7, you can install python 3.8 following these instructions.

After installing python 3.8, create the virtual environment:

$ python3 -m venv venv
$ source venv/bin/activate

For future use:

$ source venv/bin/activate

Alternatively, anaconda or miniconda can also be installed.

For future use:

$ conda activate

Install

$ python -m pip install module-qc-database-tools

Environment Variables

If not already set elsewhere (e.g. ~/.bashrc), copy .env.template to .env and update the values of the shell variables. Essentially, the following variables regarding the production database should be available, shown below as an example of environmental variables in ~/.bashrc:

export INSTITUTION="LBNL_PIXEL_MODULES"
export ITKDB_ACCESS_CODE1="accesscode1"
export ITKDB_ACCESS_CODE2="accesscode2"

Module registration

Under construction...

Generate YARR configuration

This script has been tested on python 3.7+.

To generate YARR configuration for a given module, run generateYARRConfig or mqdbt generate-yarr-config:

$ generateYARRConfig -sn [ATLAS SN] -o [outdir]
$ mqdbt generate-yarr-config -sn [ATLAS SN] -o [outdir]

Parameters:
-sn, --sn, required=True: ATLAS serial number of the module
-ch, --chipTemplate, default="configs/YARR/chip_template.json": provide the path of a chip config template to generate the new chip configs from
-o, --outdir, required=True: Path to output directory config folder will be placed in

For example, to generate the YARR configs for the module 20UPGR91301046 with all power configs:

$ generateYARRConfig -sn 20UPGR91301046 -o ~/module_data/.
$ mqdbt generate-yarr-config -sn 20UPGR91301046 -o ~/module_data/.

The time needed to generate warm and cold L2 configs for a quad module is about 4 seconds.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

module_qc_database_tools-0.0.1.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

module_qc_database_tools-0.0.1-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file module_qc_database_tools-0.0.1.tar.gz.

File metadata

File hashes

Hashes for module_qc_database_tools-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d2e273266647c97143af9a2e0295000aa33958ae0d4d903fa25cb149aa72a1e1
MD5 95a949867115ad8799d265d4c6ba846f
BLAKE2b-256 25fc46300a8b72a5c7aadec66f8654f1b23d89486a39d370f30277490b07c860

See more details on using hashes here.

File details

Details for the file module_qc_database_tools-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for module_qc_database_tools-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4ea4244bc57051b392b40fa3f97d89d2802bb9cadc69370569b6e77871ea30ca
MD5 0f4490453a06aa0535b0e6be696ea49a
BLAKE2b-256 52dabe085d85c89a09a43a124e0632944ff5e0ec77c31c59d80e1da3c0bbb8d8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page