Skip to main content

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.welch to 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

propoptics-0.1.1.tar.gz (136.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

propoptics-0.1.1-cp311-abi3-win_amd64.whl (548.0 kB view details)

Uploaded CPython 3.11+Windows x86-64

propoptics-0.1.1-cp311-abi3-manylinux_2_34_x86_64.whl (756.8 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.34+ x86-64

propoptics-0.1.1-cp311-abi3-macosx_11_0_arm64.whl (596.7 kB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

propoptics-0.1.1-cp311-abi3-macosx_10_12_x86_64.whl (709.0 kB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

Details for the file propoptics-0.1.1.tar.gz.

File metadata

  • Download URL: propoptics-0.1.1.tar.gz
  • Upload date:
  • Size: 136.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.3

File hashes

Hashes for propoptics-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f4ebbc3bc52c7237ba9f7fb86d7f3ddbae421980a2f7865eb41d23e90720bd90
MD5 a39626e5a6adc4c6e1457c18eb5c87d4
BLAKE2b-256 e82a0cdbd10c7a542b321f1efdf19a302056620e469187f953489f59d5358858

See more details on using hashes here.

File details

Details for the file propoptics-0.1.1-cp311-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for propoptics-0.1.1-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 9e398e8b233877a7269821a70458285caba5b3fa4b788ee94f13e712e35a9ad3
MD5 ee54aabe80dc411f432dc08b7478994e
BLAKE2b-256 1293e339460f3afa08bb275b5de4eefb996d35b763dd12409d1e51e16a85bafa

See more details on using hashes here.

File details

Details for the file propoptics-0.1.1-cp311-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for propoptics-0.1.1-cp311-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 5cfb4301d439a697e5444e768ff9a963cba4cbe772df7cd02eeca2540211a57e
MD5 0222b76a60904c729ff2390cc128cc46
BLAKE2b-256 24603b7dc0ed7cbca4a06fdf80d8a799a1d5a0499734784cce9849d28c41137c

See more details on using hashes here.

File details

Details for the file propoptics-0.1.1-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for propoptics-0.1.1-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d344d01687a040cfabba363b6fae7c0e0de8c1faa05ecae3b0821f1278a2a009
MD5 bcaeeedab06dbc2cb1ce837548769676
BLAKE2b-256 adfb50b5313cdded60f614165d52ed667a3d84f481fed387188bb3783fb86c3a

See more details on using hashes here.

File details

Details for the file propoptics-0.1.1-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for propoptics-0.1.1-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9efadb3404e508024e0f44f23d82c0dd971382d35a5b11ac95f39c0b8217897b
MD5 320ef01f15e94c325c4864613f604c09
BLAKE2b-256 911b1e1c9ffbcdb80eec6282f7f62b8a0f02ba2d541c601bf1baf96d9d6823cf

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