Skip to main content

Application to read MTS PRC3 files

Project description

rpc_reader

PyPI version Build Status coverage report

A RPC III file is a data file conforming to the RPC III file specification developed by MTS corporation. This utility reads RPC format and store the data using Numpy arrays.

This reader does not have the capacity to read all variants specified in the documentation provided by MTS.

Installation

This program can be installed from PyPi or from Gitlab.com

# From PyPi
python -m pip install rpc-reader  

# From gitlab.com
python -m pip install git+https://gitlab.com/t8237/rpc_reader.git

Usage

Python module

import pathlib
import rpc_reader

# Set path to file
rpc_file_path = pathlib.Path('rpc_file_path.rpc')

# Instantiate reader object
rpc_object = rpc_reader.ReadRPC(rpc_file_path)

# Import data
rpc_object.import_rpc_data_from_file()

# Export data to numpy as compressed npz file
rpc_object.save_npy_data_to_file()

# Get headers
headers = rpc_object.get_headers()

# Get channels
channels = rpc_object.get_channels()

# Get measurement data as a numpy array
data = rpc_object.get_data()

Command line usage

The command line version will read the content of the rpc-file and export it as a Numpy compressed npz file.

# This will export source data to path_to_file.npz
rpc_reader path_to_file.rpc

# Add extra headers missing in the source data and export it to path_to_file.npz
rpc_reader path_to_file.rpc --extra-header MY_HEADER MY_HEADER_VALUE --extra-header ENGINEER_NAME BAT_MAN

Version history

0.9

  • Bug fixes for FLOATING_POINT DATA_TYPE
  • Type hints introduced

0.8

  • Added possibility to add extra headers from command line

0.7

  • Minor cleanup of code

0.6

  • Corrected header reading
  • Allow for reading of demultiplexed data

0.5

  • Allow for multiple data types from header DATA_TYPE
  • Contributed by: Zhang Xing Jing

0.4

  • First public version with working basic functionality

Contribution and bug reports

Please use this issue tracker in the on gitlab.com for issues and enhancements! rpc-reader issues

Contributors

Niklas Melin
Michal Galuszka
Zhang Xing Jing

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

rpc_reader-0.9.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

rpc_reader-0.9-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file rpc_reader-0.9.tar.gz.

File metadata

  • Download URL: rpc_reader-0.9.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.16

File hashes

Hashes for rpc_reader-0.9.tar.gz
Algorithm Hash digest
SHA256 c9465122c7c77fe21f5349cceaedea4eeae152776d6c81da20178ec2fe163437
MD5 72ff00c83dce722f9a011d06fe6f73a0
BLAKE2b-256 56299ae5ebac5a20d05dbbdc38485985c8b9a86fc529d08673115f50dd3ef3b1

See more details on using hashes here.

File details

Details for the file rpc_reader-0.9-py3-none-any.whl.

File metadata

  • Download URL: rpc_reader-0.9-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.16

File hashes

Hashes for rpc_reader-0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 a16e5d6a687f79c7d5842d0341c888898c062395d12e1ae3cf71cb1c204fb87b
MD5 57d1c21c8f2ecd153faba257ba55f656
BLAKE2b-256 0fe3b038d797606646e55f214987f63f6e6f97ecce0afdbfe70ee59026e3261d

See more details on using hashes here.

Supported by

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