No project description provided
Project description
kestrelgrid
kestrelgrid is a Python package that provides functions for interacting with data from the Kestrel Grid (aka KGRID, https://kestrelgrid.com/) power system sensor network.
KGRID voltage data is archived in its native, .raw format. This package allows users to interact with the .raw data and export it to other standardized formats.
Installation
The package is available on PyPI and can be installed via pip:
pip install kestrelgrid
Use (Interacting with KGRID RawData objects)
Raw KGRID data is stored continuously and is broken into frames, each of which are most commonly 16000 samples.
Each Frame contains the raw waveform data (int16) and additional metadata.
- data (np.ndarray): The raw waveform data
- pmu_id (int): Unique identifier for the PMU
- n_samples (int): Number of samples in the packet
- sample_rate (int): Sample rate in kHz
- timestamp (float): Timestamp of the packet in seconds since epoch (UTC)
- scale_factor (float): Scale factor for the data
- fw_vers (int): Firmware version
- time_updated (int): Time updated in seconds since epoch
- boot_count (int): Boot count of the PMU
- gps_locked (bool): Whether the GPS is locked
A .raw file can be read using the raw_reader.read_raw() function, which returns a list of RawData objects, each of which represents a frame.
from kestrelgrid import raw_reader
data,c = raw_reader.read_raw(file_path)
License
MIT
Development
To develop locally, start by running
make init
to build the package environment.
The following commands are available to aid in development
make format # uses black for formatting
make lint-check # uses ruff to check linting
make type-check # uses mypy for type checking
make test # uses pytest to run unit tests
make precommit # runs all of the above
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kestrelgrid-0.1.0.tar.gz.
File metadata
- Download URL: kestrelgrid-0.1.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81d580c3082e165eea42b109542b309edfcf8fb189c10cfde955d7fb8d78b395
|
|
| MD5 |
c7df86ddf5f8f79b3df35d6c47eba4ae
|
|
| BLAKE2b-256 |
98089f0e5ee0ea1b1af7ce3a9ea82a3784729f383fa95e5feb33429a82768b47
|
File details
Details for the file kestrelgrid-0.1.0-py3-none-any.whl.
File metadata
- Download URL: kestrelgrid-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
238206529aab25035d498c1e36606df1ee7381524056cb3982e7d3a1c4bd59bc
|
|
| MD5 |
53b5d137ace9eace9dc7050bde8b0da1
|
|
| BLAKE2b-256 |
2eb1bef8df0d4295cf9d2cab4bc231fefe63a44bcd1276a4e7ae1d24b93dd0b9
|