Generate noise signal based on PSD measurement and analyze the output
Project description
Propoptics
propoptics is a small Python library aimed at providing tools to generate pulse train based on measured noise power spectral densities (PSDs), as done in [1]. Moreover, it provides a limited number of analysis tools:
- Tooling for spectral filtering and integration, allowing users to quickly convert a series of optical spectra into a sequence of values (energy or timing delay).
- A wrapper around
scipy.signal.welchto make power spectral density estimations easier.
Supported diagnostics are:
| Time series data | Frequency data |
|---|---|
| energy | relative intensity noise |
| timing delay | timing jitter, directly related to phase noise |
Installation
Run using uv tool
The easiest way to use the command-line interface (CLI) is to install uv
You can use propoptics in your own project by simply installing the package from PyPI.
pip install propoptics
The minimum supported Python version is 3.11.
You can also install from source, in which case you must install the development dependencies and have a Rust compiler installed. rustc 1.86.0 is the only version tested.
pip install -r requirements_dev.txt
maturin develop
# run tests
cargo test
pytest
Quick start
Generate a pulse train:
import propoptics
import numpy as np
freq, rin_psd = np.load("path/to/measurement")
rin_obj = propoptics.NoiseMeasurement(freq, rin_psd)
t, signal = rin_obj.time_series(nt=32, rng=123456789)
Complete example in ./examples/simple_pulse_train.py.
Welch method
The total number of points must account for 50% overlap when using the Welch method
Each · corresponds to one pulse:
time -->
0 nt/2 nt
┃·······┃·······┃·······┃·······┃
┆ ┃·······┃·······┃·······┃
┆ ┆ ┆ ┆
┆ ┆ >┆ ┆< = nperseg
>┆ ┆< = nperseg // 2
Reference
[1] CAMENZIND, Sandro L., SIERRO, Benoît, WILLENBERG, Benjamin, et al. Ultra-low noise spectral broadening of two combs in a single ANDi fiber. APL Photonics, 2025, vol. 10, no 3.
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 Distributions
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 propoptics-0.1.2.tar.gz.
File metadata
- Download URL: propoptics-0.1.2.tar.gz
- Upload date:
- Size: 136.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71d3ea32eaff956819a16e25cb25aeaa7564d496eede77e5f400df3fd69908d5
|
|
| MD5 |
428470b1e06f0fd1167089f5eb03611f
|
|
| BLAKE2b-256 |
790935dfb07597889359fa2d90380a2158768be7f5974d0416a92c2834d55b8d
|
File details
Details for the file propoptics-0.1.2-cp311-abi3-win_amd64.whl.
File metadata
- Download URL: propoptics-0.1.2-cp311-abi3-win_amd64.whl
- Upload date:
- Size: 548.0 kB
- Tags: CPython 3.11+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d5c9ebe9da5d507c048e61b3693483b1098ca8a0bcd9db4f654dd157c100f59
|
|
| MD5 |
336e247bdf887c937ef666f2ab9f11a9
|
|
| BLAKE2b-256 |
f40492857834689812cbe745d66310559de9b4d21a6583022645af39b8633164
|
File details
Details for the file propoptics-0.1.2-cp311-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: propoptics-0.1.2-cp311-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 756.7 kB
- Tags: CPython 3.11+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d75e8d77954657b845462e15a9a3cf0e84c7dd7f976369d67bb6bda41e2dd67a
|
|
| MD5 |
828b41c787900a462660bd606f813b1d
|
|
| BLAKE2b-256 |
d8390ae1a38b9fc1331f3cfd9cc37b4a9d638db0d605976afa889943c94ff947
|
File details
Details for the file propoptics-0.1.2-cp311-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: propoptics-0.1.2-cp311-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 596.2 kB
- Tags: CPython 3.11+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92db42c649a6c72b3f37dc99a0bfb97c08eaca4968e42ee4564b4839bee6db9e
|
|
| MD5 |
5fa2dba8984f5509850d42ebdeef2b40
|
|
| BLAKE2b-256 |
a91991cc2c1826b69be7912b0b677da6603e1a451985dea11feca93517549ba6
|
File details
Details for the file propoptics-0.1.2-cp311-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: propoptics-0.1.2-cp311-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 707.2 kB
- Tags: CPython 3.11+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
740953db9f3031e6378f96f271b1f273c1ec249f863ba3c04f40596e0616fd00
|
|
| MD5 |
0a638606ab688847996a22a92e9ef195
|
|
| BLAKE2b-256 |
bfaacfc1d1d94ce32911119ce1dd0cb173fc80e14edcd76109fa0f766fbda4fa
|