Skip to main content

GitHub release; latest by date GitHub Release Date Test Status Documentation Status Code coverage
PyPI - Version PyPI - Format PyPI - Downloads PyPI - Python Version
GitHub commits since latest release GitHub commit activity GitHub last commit
Number of GitHub open issues Number of GitHub closed issues Number of GitHub open pull requests Number of GitHub closed pull requests
GitHub License Number of GitHub stars GitHub forks

Introduction

vax is a set of routines for converting between NumPy floating point and complex scalars/arrays and VAX-format single- and double-precision floats.

vax is a product of the PDS Ring-Moon Systems Node.

Installation

The vax module is available via the rms-vax package on PyPI and can be installed with:

pip install rms-vax

Getting Started

The vax module provides two functions for converting from VAX-format floats:

  • from_vax32: Interpret a series of bytes or NumPy array as one or more VAX single-precision floats and convert them to a NumPy float or complex scalar or array.
  • from_vax64: Interpret a series of bytes NumPy array as one or more VAX double-precision floats and convert them to a NumPy float or complex scalar or array.

and two functions for converting to VAX-format floats::

  • to_vax32: Convert a NumPy float or complex scalar or array to a NumPy array containing the binary representation of VAX single-precision floats. Such an array can not be used for arithmetic operations since it is not in IEEE 754 format.
  • to_vax32_bytes: Convert a NumPy float or complex scalar or array to a Python bytes object containing the binary representation of VAX single-precision floats.

Note that there are no functions to convert a NumPy array to VAX double-precision format.

Details of each function are available in the module documentation.

Basic operation is as follows:

import vax
b = vax.to_vax32([1., 2., 3.])
print(f'b = {b!r}')
ba = vax.to_vax32_bytes([1., 2., 3.])
print(f'ba = {ba!r}')
v = vax.from_vax32(b)
print(f'v = {v!r}')
va = vax.from_vax32(ba)
print(f'va = {va!r}')

yields:

b = array([2.3138e-41, 2.3318e-41, 2.3407e-41], dtype=float32)
ba = b'\x80@\x00\x00\x00A\x00\x00@A\x00\x00'
v = array([1., 2., 3.], dtype=float32)
va = array([1., 2., 3.], dtype=float32)

As NASA data products stored as VAX-format floats are often provided in JPL's VICAR file format, you may also be interested in the rms-vicar package (documentation).

Contributing

Information on contributing to this package can be found in the Contributing Guide.

Links

Licensing

This code is licensed under the Apache License v2.0.

Metadata

Release files for rms-vax 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rms-vax 1.1.0
File Size Uploaded Provenance Actions
rms_vax-1.1.0.tar.gz 36.9 kB Without provenance Details for rms_vax-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rms-vax 1.1.0
File Interpreter ABI Platform Actions
rms_vax-1.1.0-py3-none-any.whl Python 3 none any Details for rms_vax-1.1.0-py3-none-any.whl

Total release size: 47.3 kB

Release files / rms_vax-1.1.0.tar.gz

Download URL rms_vax-1.1.0.tar.gz
Size 36.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5fc6a93081add9a07c26e9fe6739f1415886ed169978e35b657f75da3c7b51e4
BLAKE2b-256 checksum
How to use checksums
5dabc5707025c64a33db73b87a0f576fdd5a9d00b885e10e3b6c71c2c425c731
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / rms_vax-1.1.0-py3-none-any.whl

Download URL rms_vax-1.1.0-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a5f9780ca87ed113081e39a42f4bba34d34a53bf224c449d302d2d6489989cb2
BLAKE2b-256 checksum
How to use checksums
2cd78df7b1ef9cde3d798f1b1df01de83c89cd9b5f169423bff9c3cb542d7a81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for rms-vax 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page