CalibDBReader


NameCalibDBReader JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
SummaryReader for the calibration database
upload_time2024-09-19 18:07:15
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseGNU GPL ver3
keywords space mission bepicolombo simbio_sys calibration database juice janus
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Calibration Database Reader
![Version 0.2.0](https://img.shields.io/badge/version-0.2.0-blue?style=plastic)
![Language Python 3.12](https://img.shields.io/badge/python-3.12-orange?style=plastic&logo=python)
![BepiColombo SIMBIO-SYS](https://img.shields.io/badge/BepiColombo-SIMBIO--SYS-blue?style=plastic)
![JUICE JANUS](https://img.shields.io/badge/JUICE-JANUS-blue?style=plastic)
[![DOI](https://zenodo.org/badge/820492051.svg)](https://zenodo.org/doi/10.5281/zenodo.12634122)

This software is able to read the calibration database in a standard format.

The database consists of three elements:
- The `version.yml` file, which contains the version number of the database
- The `calib_db.csv` file, which contains information about the calibration data and their scope of applicability (see the specific [section](#database-fields) for details)
- The `data` folder, which contains the calibration matrices

## Installation

### via GitHub

To install the code you can use the syntax:

```console
$ python3 -m pip install -U pip
$ pip install git+https://github.com/RomoloPoliti-INAF/Calib_DB_Reader.git
```

## Usage

> CalibDB(folder: str, remote: str)

where:

- **folder (str)** is the the folder that host the database
- **remote (str, optional)** is the git repository that host the db

If the folder does not exist, the software will clone the remote repository. If it is not present, an error will occur.

### Example

```python
from CalibDBReader import CalibDB
db=CalibDB(folder = "../../JANUS/Software/janus_cal_db",
            remote = "git@github.com:JANUS-JUICE/janus_cal_db.git")
```

## Methods list

### get_calib

Returns information about the calibration data and the calibration data that meets the specified conditions.

> CalibDBReader.get_calib(calibration_step: str, date: datetime, channel: str = None, filter: int = None, read_data: bool = False) -> dict

- **calibration_step (str):** name of the calibration module
- **date (datetime):** acquisition date of the product to calibrate
- **channel (str, optional):** channel to calibrate. Defaults to None.
- **filter (int, optional):** filter to calibrate. Defaults to None.
- **read_data (bool, optional):** read the calibration file and add it to the returned dictionary. Defaults to False.

## Database Fields

- **Description** Description of the step (used for messaging and log)
- **Channel** the channel to calibrate
- **Calibration_Step** name of the step will use the matrix
- **Size** size of the matrix (used for load the data)
- **Mask** value used to mask the pixel. If the value is 0 the mask will not applied.
- **Type** Is the data type of the values in the matrix.
- **Func** is the type of function will be used for the calibration. The function must be implemened in the code.
- **Filter** is the filter number
- **Start** is the start date of validity of the matrix
- **End** is the end date of validity of the matrix. If the value is "*Now*" means that there is no end of validity.
- **File** is the path and the the name of the file containing the matrix.
- **Arrays** is the name of the matrices in the npz file. If the field is not present the software will try to extract one matrix named *data*

The Supported file format are:

- **binary file** 2D or 3D binary matryx
- **numpy compressed file** nmz file, in this case the *Size* and *Type* fields have only descriptive aim.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "CalibDBReader",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "Space Mission, BepiColombo, SIMBIO_SYS, Calibration Database, JUICE, JANUS",
    "author": null,
    "author_email": "Romolo Politi <Romolo.Politi@inaf.it>",
    "download_url": "https://files.pythonhosted.org/packages/c4/b6/ac1642db508f60cb0a7f66b2a2ca72baab795e0ba84b72981b1683f372c0/calibdbreader-0.2.0.tar.gz",
    "platform": null,
    "description": "# Calibration Database Reader\n![Version 0.2.0](https://img.shields.io/badge/version-0.2.0-blue?style=plastic)\n![Language Python 3.12](https://img.shields.io/badge/python-3.12-orange?style=plastic&logo=python)\n![BepiColombo SIMBIO-SYS](https://img.shields.io/badge/BepiColombo-SIMBIO--SYS-blue?style=plastic)\n![JUICE JANUS](https://img.shields.io/badge/JUICE-JANUS-blue?style=plastic)\n[![DOI](https://zenodo.org/badge/820492051.svg)](https://zenodo.org/doi/10.5281/zenodo.12634122)\n\nThis software is able to read the calibration database in a standard format.\n\nThe database consists of three elements:\n- The `version.yml` file, which contains the version number of the database\n- The `calib_db.csv` file, which contains information about the calibration data and their scope of applicability (see the specific [section](#database-fields) for details)\n- The `data` folder, which contains the calibration matrices\n\n## Installation\n\n### via GitHub\n\nTo install the code you can use the syntax:\n\n```console\n$ python3 -m pip install -U pip\n$ pip install git+https://github.com/RomoloPoliti-INAF/Calib_DB_Reader.git\n```\n\n## Usage\n\n> CalibDB(folder: str, remote: str)\n\nwhere:\n\n- **folder (str)** is the the folder that host the database\n- **remote (str, optional)** is the git repository that host the db\n\nIf the folder does not exist, the software will clone the remote repository. If it is not present, an error will occur.\n\n### Example\n\n```python\nfrom CalibDBReader import CalibDB\ndb=CalibDB(folder = \"../../JANUS/Software/janus_cal_db\",\n            remote = \"git@github.com:JANUS-JUICE/janus_cal_db.git\")\n```\n\n## Methods list\n\n### get_calib\n\nReturns information about the calibration data and the calibration data that meets the specified conditions.\n\n> CalibDBReader.get_calib(calibration_step: str, date: datetime, channel: str = None, filter: int = None, read_data: bool = False) -> dict\n\n- **calibration_step (str):** name of the calibration module\n- **date (datetime):** acquisition date of the product to calibrate\n- **channel (str, optional):** channel to calibrate. Defaults to None.\n- **filter (int, optional):** filter to calibrate. Defaults to None.\n- **read_data (bool, optional):** read the calibration file and add it to the returned dictionary. Defaults to False.\n\n## Database Fields\n\n- **Description** Description of the step (used for messaging and log)\n- **Channel** the channel to calibrate\n- **Calibration_Step** name of the step will use the matrix\n- **Size** size of the matrix (used for load the data)\n- **Mask** value used to mask the pixel. If the value is 0 the mask will not applied.\n- **Type** Is the data type of the values in the matrix.\n- **Func** is the type of function will be used for the calibration. The function must be implemened in the code.\n- **Filter** is the filter number\n- **Start** is the start date of validity of the matrix\n- **End** is the end date of validity of the matrix. If the value is \"*Now*\" means that there is no end of validity.\n- **File** is the path and the the name of the file containing the matrix.\n- **Arrays** is the name of the matrices in the npz file. If the field is not present the software will try to extract one matrix named *data*\n\nThe Supported file format are:\n\n- **binary file** 2D or 3D binary matryx\n- **numpy compressed file** nmz file, in this case the *Size* and *Type* fields have only descriptive aim.\n",
    "bugtrack_url": null,
    "license": "GNU GPL ver3",
    "summary": "Reader for the calibration database",
    "version": "0.2.0",
    "project_urls": {
        "Changelog": "https://github.com/RomoloPoliti-INAF/Calib_DB_Reader/CHANGELOG.md",
        "Repository": "https://github.com/RomoloPoliti-INAF/Calib_DB_Reader"
    },
    "split_keywords": [
        "space mission",
        " bepicolombo",
        " simbio_sys",
        " calibration database",
        " juice",
        " janus"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f6ab1ddf598aae7ae7c020bc734b78d991fb76eb3397247b1b2e2ce08c09b86a",
                "md5": "d6f8e3cfc4a9855a62707965c0b9688e",
                "sha256": "d3cf55c149af92e46370a0a9064a070665c9fbc369242b887a13d1aa7fc42384"
            },
            "downloads": -1,
            "filename": "CalibDBReader-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d6f8e3cfc4a9855a62707965c0b9688e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 16326,
            "upload_time": "2024-09-19T18:07:14",
            "upload_time_iso_8601": "2024-09-19T18:07:14.634498Z",
            "url": "https://files.pythonhosted.org/packages/f6/ab/1ddf598aae7ae7c020bc734b78d991fb76eb3397247b1b2e2ce08c09b86a/CalibDBReader-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c4b6ac1642db508f60cb0a7f66b2a2ca72baab795e0ba84b72981b1683f372c0",
                "md5": "9072305197cb546524dd1eb46e5ce2fb",
                "sha256": "085b6264313df5859225c73b9f06ea659c9ef0eeff3bbcb0de946e78264e40cb"
            },
            "downloads": -1,
            "filename": "calibdbreader-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9072305197cb546524dd1eb46e5ce2fb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 16454,
            "upload_time": "2024-09-19T18:07:15",
            "upload_time_iso_8601": "2024-09-19T18:07:15.799337Z",
            "url": "https://files.pythonhosted.org/packages/c4/b6/ac1642db508f60cb0a7f66b2a2ca72baab795e0ba84b72981b1683f372c0/calibdbreader-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-19 18:07:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "RomoloPoliti-INAF",
    "github_project": "Calib_DB_Reader",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "calibdbreader"
}
        
Elapsed time: 0.43129s