Skip to main content

Package to read and process BVA data from LF Motol

Project description

BVA reader

Python package which reads and parses xml data from LF in Motol.

Installation

The project is currently hosted on test PyPi and can be downloaded from such https://test.pypi.org/project/bvareader/

Use examples

Main use can be through the command line prompts, which doesn't require you to run your own preprocessing scripts. But if you prefer, you can preprocess and save the data in your own way.

from bvareader.reader import read_xml_bva
from bvareader.reader import read_xml_sync
from bvareader.reader import read_sync_file
from bvareader.reader import save_csv

from bvareader.preprocessing import preprocess_bva_data
from bvareader.preprocessing import add_rotation

pd_bva = read_xml_bva("example_data/example.xml")
pd_bva_clean = preprocess_bva_data(pd_bva)
pd_bva = add_rotation(pd_bva)

save_csv(pd_bva_clean, "bva.csv")
save_csv(pd_bva, "bva_full.csv")

bva_sync = read_xml_sync("example_data/example.xml")
save_csv(pd_sync, "bva_sync.csv")

pd_sync = read_sync_file("example_data/example.csv")
save_csv(pd_sync, "sync.csv")

Timestamp

Bva outputs real timestamp (date and time of each recording). This package converts this datetime number as the POSIX timestamp (number of seconds since 1.1.1970) as per datetime.timestamp() function described in here

Command line prompt

By installing the package from PyPI, you will get the python entry point which you can use in the command line. You can investigate each command with the --help tag. e.g. bva-preprocess-xmx --help. Mostly you will need only the bva-preprocess-xml and potentially bva-settings-to-csv commands

BVA xml output preprocessing

bva-preprocess-xml "path_to_xml" -o/--output "output-prefix"
bva-settings-to-csv "path_to_xml"-o/--output "output-prefix"
bva-phases-table "path_to_xml" -o/--output "output-prefix"
bva-measures-start-stop-table "path_to_xml" -o/--output "output-prefix"

FAQ

Q: The command line commands are not found.

A: If you are using conda or virtual envs, make sure you are in a correct environment

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

bvareader-0.2.0.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bvareader-0.2.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file bvareader-0.2.0.tar.gz.

File metadata

  • Download URL: bvareader-0.2.0.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for bvareader-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ff74834ef5bcfad06cf28919f20e904a94b8c62fdc7bcf31feda453508ddbf6b
MD5 46e79f0a6b668b2b1dee17610680e1a5
BLAKE2b-256 9fa0c22cc290a8c0f44edbcb9b1bfe18b2abf59f7b4b3a0ada5769a7fae15707

See more details on using hashes here.

File details

Details for the file bvareader-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: bvareader-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for bvareader-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 24c65a68580dee9a9feb2e4db4caf829d7b02defe861cf324b42cfa8f39cb386
MD5 3a47c9bcb9d2bb3c9d5435579db28159
BLAKE2b-256 3f04b312c9774b527cc2abfe17492e5bafe691c93d7b4114b706683e83238099

See more details on using hashes here.

Supported by

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