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

Uploaded Python 3

File details

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

File metadata

  • Download URL: oasis_api-3.0.0.tar.gz
  • Upload date:
  • Size: 15.2 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.0.tar.gz
Algorithm Hash digest
SHA256 3719a792c37dd57c0e00845395b4d4b16e2ee28dac05102c5beded60b8c4d28c
MD5 49bcf74037a8c214f9a503edbf016a55
BLAKE2b-256 681b8a966d49810bd6ca85b93020f33ee1b9e343fe3b3517d8bde9eca7b45d4c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oasis_api-3.0.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5ac0d5fc2800ee637223055c83142a6d30acf078872625f7fc568ec3ddbcc7a7
MD5 7cdba2658efaed6242710ba9cd393ef3
BLAKE2b-256 8fe017f046bb64257e906c7b709eb2bd10f51cdee626d35ace6901fd7e95d4b6

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