Skip to main content

Python API for the Open Acquisition System for IEPE Sensors (OASIS)

Project description

OASIS Board Python Package

Used in the following packages:

  • oasis-gui
  • oasis-tui
                    +-------------------+
                    |     oasis-api     |
                    |  (Python library) |
                    +-------------------+
                             ^
         +-------------------+---------------------+
         |                   |                     |
  +----------------+   +----------------+   +----------------+
  |   oasis-cli    |   |   oasis-tui    |   |   oasis-gui    |
  | (flags & args) |   | (guided menus) |   | (desktop/web)  |
  +----------------+   +----------------+   +----------------+

HDF5 File Format for OASIS Measurements

Overview

Measurement data is stored in HDF5 files in a tidy data format, making it easy to analyze, visualize, and share.

Structure

  • The main dataset is stored at the root as /data.
  • The file contains attributes describing metadata and the measurement setup.

Data Table: /data

  • Shape: (N, ) where N = number of channels × number of time points

  • Each row represents a single observation:

    • channel: Integer (1–8), channel number
    • time: Float (seconds), timestamp of the sample
    • voltage: Float (volts), measured voltage value

Example (first few rows):

channel time voltage
1 0.00000 0.0324
1 0.00100 0.0451
... ... ...
8 9.99900 0.0078
  • Units:

    • The voltage column has the attribute unit = "V"

File Attributes (Metadata)

  • duration_s: Duration of acquisition (in seconds)
  • sampling_frequency_hz: Sampling frequency (in Hz)
  • voltage_ranges: Array of voltage ranges for each channel (in volts)
  • voltage_ranges_unit: "V"
  • channels: Number of channels (typically 8)
  • tidy_format: Description of the tidy layout

Why Tidy Data?

  • Each variable forms a column: channel, time, voltage
  • Each observation forms a row: one reading from one channel at one time
  • Each type of observational unit forms a table: all data is in /data
  • This format makes the data easy to filter, aggregate, and visualize in Python (Pandas), R, MATLAB, etc.

How to Read the File (Python Example)

import h5py
import numpy as np

with h5py.File("measurement.h5", "r") as f:
    data = f["data"][:]
    print("Fields:", data.dtype.names)  # ('channel', 'time', 'voltage')
    print("First row:", data[0])
    print("Sampling frequency:", f.attrs["sampling_frequency_hz"])
    print("Voltage ranges:", f.attrs["voltage_ranges"])

Viewing

  • Use HDFView or Vitables to inspect your data and metadata visually.

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

oasis_api-3.0.2.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

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

oasis_api-3.0.2-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file oasis_api-3.0.2.tar.gz.

File metadata

  • Download URL: oasis_api-3.0.2.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for oasis_api-3.0.2.tar.gz
Algorithm Hash digest
SHA256 de20dbbcb70149ea8e2069f54369271361cca6e50a41b63e76de3850a61edbf7
MD5 5d3b3085f4ad6a8366a5d64128d482b9
BLAKE2b-256 e76fcd1679d744e918825de955a2af3cbf4a94b73a231a2900f1bd4e20e0b252

See more details on using hashes here.

File details

Details for the file oasis_api-3.0.2-py3-none-any.whl.

File metadata

  • Download URL: oasis_api-3.0.2-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for oasis_api-3.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c50e04c563ccc31680dd8e9c8ed79a46bf3cb7c22184eb0ccd956d024e0477af
MD5 818f6b5b539553c6627385001249f64a
BLAKE2b-256 bba05aaa362bf58fca835112de063bc840e2b99d1100432b2af8d9323757b9ad

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