Skip to main content

A package for manipulating the frbcatdb and its linking with the VOEvent backbone.

Project description

# frbcatdb
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Build Status](https://travis-ci.org/AA-ALERT/frbcatdb.svg?branch=master)](https://travis-ci.org/AA-ALERT/frbcatdb)[![codecov](https://codecov.io/gh/AA-ALERT/frbcatdb/branch/master/graph/badge.svg)](https://codecov.io/gh/AA-ALERT/frbcatdb)[![Codacy Badge](https://api.codacy.com/project/badge/Grade/de13488f778e4843a8922ee2417a3416)](https://www.codacy.com/app/omrubi/frbcatdb?utm_source=github.com&utm_medium=referral&utm_content=AA-ALERT/frbcatdb&utm_campaign=Badge_Grade)[![Readthedocs badge](https://media.readthedocs.org/static/projects/badges/passing.svg)](http://frbcatdb.readthedocs.io/en/latest/?badge=latest)[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1051040.svg)](https://doi.org/10.5281/zenodo.1051040)

The frbcatdb is a database to store a catalog of Fast Radio Bursts (FRBs).
The DB is intended to contain old FRB events as well as new FRBs detected by the
AA-ALERT FRB detection pipeline from Apertif observations and also possible follow-up observations or others FRBs detected by other telescopes.
The frbcatdb is attached to the VOEvent backbone and uses this infrastructure as its source.

The `db` folder contains scripts to create an empty frbcat DB (`create_db.csh`),
to import it from an existing dump file (`import_db.sh`) and
to dump an existing DB to a dump file (`dump_db.csh`).
It also contains the model (Entity-Relationship diagram) to be opened with mysql-workbench. ![frbcatdb ER diagram](db/relationships.real.compact.png)

The `pyfrbcatdb` is Python package for manipulating the frbcatdb and its linking
with the VOEvent backbone.

# pyfrbcatdb usage
A default configuration file is installed in /etc/pyfrbcatdb/dbase.config. In this file the FRBCat database configuration can be defined. Alternatively, a user may supply their own configuration file with a command line argument of the executable, or define the database configuration via argument switches, or, alternatively via environment variables.

For inserting a VOEvent XML file into the FRBCat database, the decode_VOEvent executable is used:
```
usage: decode_VOEvent [-h] [-c MY_CONFIG] --dbName DBNAME [--dbHost DBHOST]
[--dbPort DBPORT] --dbUser DBUSER
[--dbPassword DBPASSWORD] [--log LOG]
VOEvent [VOEvent ...]

Process VOEvent XML file and add it to FRB database Args that start with '--'
(eg. --dbName) can also be set in a config file
(/etc/pyfrbcatdb/dbase.config or specified via -c). Config
file syntax allows: key=value, flag=true, stuff=[a,b,c] (for details, see
syntax at https://goo.gl/R74nmi). If an arg is specified in more than one
place, then commandline values override environment variables which override
config file values which override defaults.

positional arguments:
VOEvent List of VOEvent XML files

optional arguments:
-h, --help show this help message and exit
-c MY_CONFIG, --my-config MY_CONFIG
config file path
--dbName DBNAME name postgres database [env var: dbNameFRBCat]
--dbHost DBHOST name postgres database [env var: dbHostFRBCat]
--dbPort DBPORT name postgres database [env var: dbPortFRBCat]
--dbUser DBUSER user postgres database [env var: dbUserFRBCat]
--dbPassword DBPASSWORD
user postgres database password [env var:
dbPasswordFRBCat]
--log LOG log file, default=[HOME]/pyfrbcatdb_decode.log
```
For extracting a VOEvent from the FRBCat database, the create_VOEvent executable is used. Note that some features might still be missing for the current release from this utility.
```
usage: create_VOEvent [-h] [-c MY_CONFIG] --dbName DBNAME [--dbHost DBHOST]
[--dbPort DBPORT] --dbUser DBUSER
[--dbPassword DBPASSWORD] [--log LOG]
frb_ids [frb_ids ...]

Create VOEvent XML file from FRB database Args that start with '--' (eg.
--dbName) can also be set in a config file
(/etc/pyfrbcatdb/dbase.config or specified via -c). Config
file syntax allows: key=value, flag=true, stuff=[a,b,c] (for details, see
syntax at https://goo.gl/R74nmi). If an arg is specified in more than one
place, then commandline values override environment variables which override
config file values which override defaults.

positional arguments:
frb_ids List of frbs ids

optional arguments:
-h, --help show this help message and exit
-c MY_CONFIG, --my-config MY_CONFIG
config file path
--dbName DBNAME name postgres database [env var: dbNameFRBCat]
--dbHost DBHOST name postgres database [env var: dbHostFRBCat]
--dbPort DBPORT name postgres database [env var: dbPortFRBCat]
--dbUser DBUSER user postgres database [env var: dbUserFRBCat]
--dbPassword DBPASSWORD
user postgres database password [env var:
dbPasswordFRBCat]
--log LOG log file, default=[HOME]/pyfrbcatdb_create.log
```


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

pyfrbcatdb-1.0.0.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

pyfrbcatdb-1.0.0-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file pyfrbcatdb-1.0.0.tar.gz.

File metadata

  • Download URL: pyfrbcatdb-1.0.0.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyfrbcatdb-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3f01f57dbabed8090e42e964e6a2721496fbfff925684e25f94bc3c24fa543e4
MD5 9614a9ddcc24d907904aa51b72c7b9bd
BLAKE2b-256 6c9e69872ed5255201d9b9218b86b75c142ffc95af399a7d22110c08f30d2565

See more details on using hashes here.

File details

Details for the file pyfrbcatdb-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pyfrbcatdb-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 069d15f8ddc7ebade41f0bae4426b7a37b93a81417e1e5800364d7f1c349ceb7
MD5 716944b8b45ebb7dc625845c15343d3d
BLAKE2b-256 4e56b664618fa54f2e162872eae00f4a502755146d5e0fccc40d245146055723

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