Sine properties estimation
Estimating sine properties from 1D array of raw data
Let say you have a noisy record of a sine, and you want to know its properties.
Frequency estimation done by polynomial interpolation on fft values.
Estimating amp, phase and offset using least square on trigonometric sine identity.
Probably useful for DSP (signal processing) and spectral analysis.
usage example:
input:
import numpy as np
from sine_properties_estimation import calc_sine_properties
# sine with random noise
samples = 1000
seconds = 10
amp_mv = 340
phase_rad = 2.2
offset_mv = 60
freq_ghz = 1.834
t = np.linspace(0, seconds, samples)
signal = amp_mv * np.sin(2 * np.pi * freq_ghz * t + phase_rad) + offset_mv + np.random.normal(0, 50, samples)
estimation = calc_sine_properties(signal, seconds)
print(f'estimated freq is {estimation.est_freq} Hz')
print(f'estimated sine amp is {estimation.est_sine_amp}')
estimation.print_estimation()
output:
estimate freq is 1.8372033171227042 Hz
estimated sine amp is 338.5901422611014
samples : 1000
total_seocnds : 10
freq : 1.8372033171227042
sine_amp : 338.5901422611014
phase_rad : 2.0986036955592624
offset : 63.01041660377115
--------------------------------------------------
Metadata
Release files for sine-properties-estimation 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sine_properties_estimation-0.1.1.tar.gz | 5.1 kB | Without provenance | Details for sine_properties_estimation-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sine_properties_estimation-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for sine_properties_estimation-0.1.1-py3-none-any.whl |
Total release size: 10.9 kB
Release files / sine_properties_estimation-0.1.1.tar.gz
| Download URL | sine_properties_estimation-0.1.1.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2b4c50f12ddf0a4dd79c37dd1137cfdff75a907df679d010a4a949b0f485ae3a
|
|
BLAKE2b-256 checksum How to use checksums |
ddd91669dcda78809f69abfc61800251894e0c43f654c48faf0fb72592015511
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.62.2 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5
|
Release files / sine_properties_estimation-0.1.1-py3-none-any.whl
| Download URL | sine_properties_estimation-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c88ddbc8cb8025c5498ea940a864bb59587b873e6ce4cf52186b3a34be231760
|
|
BLAKE2b-256 checksum How to use checksums |
6c832cce777a792887a596aa28f201677cab86ba584ad6fbab2278ee462ecad4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.62.2 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5
|
Security for sine-properties-estimation 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.