Python wrapper to interface with LocalDB and Production DB for common tasks for pixel modules.
Project description
Module QC Database Tools v2.2.0
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
Python virtual environment only needs to be created once and used throughout all module QC tools.
Creating a 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 either install python 3.8 following these
instructions (needs sudo
),
or use anaconda or
miniconda (see below).
After installing python 3.8, create the virtual environment outside any git
repo. <venv>
can be substituted with any descriptive name:
$ python3 -m venv <venv>
$ source <venv>/bin/activate
For future use, activate the virtual environment like instructed below, or add
this line to your ~/.bashrc
:
$ source <venv>/bin/activate
Anaconda or Miniconda
Alternatively, anaconda or miniconda also provides a higher python version and do not require python installation on the Linux system. They can also be installed following the instructions in the links.
For future use, activate the virtual environment like instructed below, or add
this line to your ~/.bashrc
:
$ 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, path to output directory config folder will be placed in. If not supplied, the config files will be pushed into mongoDB if connection is set up.
-f, --fast, fast generation of configs files without any linebreaks.
--noeos, Do not use eos token.
--reverse, Use reversed order of chip ID, e.g. for old L0 linear triplets.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file module_qc_database_tools-2.2.0.tar.gz
.
File metadata
- Download URL: module_qc_database_tools-2.2.0.tar.gz
- Upload date:
- Size: 19.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | af74f7960d9583afe620111718c9e343dd5d518f9e01bc5af5ec118e73724936 |
|
MD5 | b0d2baf71815ce90e12883b6a46ae62e |
|
BLAKE2b-256 | 8edb3c21f16f1c9375eed31bacb54422925de3c30f52302831c714409008847f |
File details
Details for the file module_qc_database_tools-2.2.0-py3-none-any.whl
.
File metadata
- Download URL: module_qc_database_tools-2.2.0-py3-none-any.whl
- Upload date:
- Size: 17.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a4d811ff4a5e6a6b029aece1899df4872efe3d3027c64574e77f3b38a3f0946 |
|
MD5 | d500c1614af23fcb31cd4ee606d17aad |
|
BLAKE2b-256 | cd962e367a258a61f98a7b489330689326a4a477b7a3729f74f383694406b553 |