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.1.tar.gz (15.4 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.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: oasis_api-3.0.1.tar.gz
  • Upload date:
  • Size: 15.4 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.1.tar.gz
Algorithm Hash digest
SHA256 c2ba82d19392306aa494be4e5161d1ecc5934db14daa502727ea93e76dbe7cf9
MD5 318befbd6e121a5b517e987902d5abd1
BLAKE2b-256 e43b184286fbcb529184130cd6c8d1c333ce318eb28e94d56837731721278608

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oasis_api-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d18695de32f6ec5eaadfcbc3302031fb8e0f97401e2fd68acf4494014af48457
MD5 1f454fa69d0b36128eb066161a19d384
BLAKE2b-256 05523e35ba6ee03648581019553c82778c40e50ee599609586e473180fa69291

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