Application to read MTS PRC3 files
Project description
rpc_reader
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 hashes)
Built Distribution
rpc_reader-0.9-py3-none-any.whl
(21.1 kB
view hashes)