Skip to content

Library for calculating oscilloscope measurements based on graph data

License

Notifications You must be signed in to change notification settings

labsland/ll-oscilloscope-measurements

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ll-oscilloscope-measurements

CircleCI Supported Versions pypi

Library for calculating oscilloscope measurements based on graph data.

The goal is to provide transparency on how the LabsLand Hive ( https://labsland.com/web/hive ) takes measurements, but it can be used for other purposes.

Installation

$ pip install ll-oscilloscope-measurements

Usage

import numpy as np
import ll_oscilloscope_measurements as llom

sin_signal = np.sin(np.linspace(0, 500))
# ~0
llom.calculate_voltage_average(sin_signal)
# ~1
llom.calculate_voltage_max(sin_signal)
# ~0.69
llom.calculate_voltage_rms(sin_signal)

# etc.

See the code for all the functions.

Testing

In the tests/data folder there are a set of CSV, JSON, and images of different sets of samples (500 samples each).

In the tests/unit/test_ll_oscilloscope_measurements.py file, you will find tests using those samples and evaluating the code with them.

Feel free to add tests and run the following to test them:

pytest tests

About

Library for calculating oscilloscope measurements based on graph data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages