Python module for reading TRACE XTV graphics files
Project description
xtvreader
Python application for reading TRACE XTV graphics files.
This is the Python 3.x version of the application. References in documentation or examples to import xtvreader work out of the box when the package is installed.
Originally written by Josh Whitman.
Installation
We recommend installing xtvreader as a standard package.
1. From a Local Clone
To install the package in your active Python environment, navigate to the repository root and run:
pip install .
2. Editable/Development Mode
If you are developing or modifying the library, install it in editable mode:
pip install -e .
3. Directly from GitHub
You can install xtvreader directly from the repository using pip:
pip install git+https://github.com/NRC-Research/xtvReader.git
Dependencies
The package requires py-xdrlib>=1.0 as a dependency to ensure compatibility with Python 3.11+ and Python 3.13 (where xdrlib was removed from the standard library). This is handled automatically by pip during installation.
Virtual Environment Setup
To keep your system Python clean, we encourage using a virtual environment:
# Create a virtual environment
python3 -m venv .venv
# Activate it
source .venv/bin/activate # On macOS/Linux
# .venv\Scripts\activate # On Windows
# Install the package locally
pip install -e .
Usage
In a Python Script
You can import XtvFile directly from the package:
from xtvreader import XtvFile
# Open an XTV file
with open('path/to/file.xtv', 'rb') as f:
xtv = XtvFile(f)
# Retrieve a data channel value
data = xtv.getTimeVector('alpn-1A02')
print(data)
Command Line Tools
Two utility scripts are provided at the root of the repository:
xtv2csv.py: Convert XTV graphics files to CSV format.python xtv2csv.py file.xtv -var alpn-1A02
htstrTest.py: Read and extract peak cladding temperature (PCT) data from heat structures.python htstrTest.py
Original Module Details
xtvreader is a native Python module for retrieving values from a TRACE XTV file. It exposes the XtvFile class which reads header information and spawns component objects dynamically. The header information determines exactly which bytes must be read to extract a specific data point at any edit. If times or axial locations are requested between edits or mesh indices, values are interpolated linearly.
Limitations
It does not contain any of the batch command helper functions that AptPlot and PyPost batch languages provide.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xtvreader-1.0.1.tar.gz.
File metadata
- Download URL: xtvreader-1.0.1.tar.gz
- Upload date:
- Size: 35.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7eb379f0dbaca2d2715b95d2533aa75a988f94c9ad3e004e2966290d44bf11b
|
|
| MD5 |
a39c71fc229035f538ad9660d1119bdd
|
|
| BLAKE2b-256 |
a58140d1d7a53cc358a379e0678af11c31a4fa244f086f022fc251dd851bfae3
|
Provenance
The following attestation bundles were made for xtvreader-1.0.1.tar.gz:
Publisher:
pypi-publish.yml on NRC-Research/xtvReader
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xtvreader-1.0.1.tar.gz -
Subject digest:
b7eb379f0dbaca2d2715b95d2533aa75a988f94c9ad3e004e2966290d44bf11b - Sigstore transparency entry: 1778334371
- Sigstore integration time:
-
Permalink:
NRC-Research/xtvReader@f12ed84093f434d92071943e5d8890d157d6d2a6 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/NRC-Research
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@f12ed84093f434d92071943e5d8890d157d6d2a6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file xtvreader-1.0.1-py3-none-any.whl.
File metadata
- Download URL: xtvreader-1.0.1-py3-none-any.whl
- Upload date:
- Size: 35.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fef80b9a7b668c297f31e4c3bb64522da28716cf4009b101406c624cc88b82b4
|
|
| MD5 |
310ef95e06ef6a031a8af7ff75c2c94b
|
|
| BLAKE2b-256 |
38d861379ba05a8a4112af63c8ac31937e97fe77e56e44b238dcd0398ca1cd29
|
Provenance
The following attestation bundles were made for xtvreader-1.0.1-py3-none-any.whl:
Publisher:
pypi-publish.yml on NRC-Research/xtvReader
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xtvreader-1.0.1-py3-none-any.whl -
Subject digest:
fef80b9a7b668c297f31e4c3bb64522da28716cf4009b101406c624cc88b82b4 - Sigstore transparency entry: 1778335186
- Sigstore integration time:
-
Permalink:
NRC-Research/xtvReader@f12ed84093f434d92071943e5d8890d157d6d2a6 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/NRC-Research
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@f12ed84093f434d92071943e5d8890d157d6d2a6 -
Trigger Event:
push
-
Statement type: