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.2.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.2-cp311-abi3-win_amd64.whl (548.0 kB view details)

Uploaded CPython 3.11+Windows x86-64

propoptics-0.1.2-cp311-abi3-manylinux_2_34_x86_64.whl (756.7 kB view details)

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

propoptics-0.1.2-cp311-abi3-macosx_11_0_arm64.whl (596.2 kB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

propoptics-0.1.2-cp311-abi3-macosx_10_12_x86_64.whl (707.2 kB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

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

Hashes for propoptics-0.1.2.tar.gz
Algorithm Hash digest
SHA256 71d3ea32eaff956819a16e25cb25aeaa7564d496eede77e5f400df3fd69908d5
MD5 428470b1e06f0fd1167089f5eb03611f
BLAKE2b-256 790935dfb07597889359fa2d90380a2158768be7f5974d0416a92c2834d55b8d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for propoptics-0.1.2-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 0d5c9ebe9da5d507c048e61b3693483b1098ca8a0bcd9db4f654dd157c100f59
MD5 336e247bdf887c937ef666f2ab9f11a9
BLAKE2b-256 f40492857834689812cbe745d66310559de9b4d21a6583022645af39b8633164

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for propoptics-0.1.2-cp311-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d75e8d77954657b845462e15a9a3cf0e84c7dd7f976369d67bb6bda41e2dd67a
MD5 828b41c787900a462660bd606f813b1d
BLAKE2b-256 d8390ae1a38b9fc1331f3cfd9cc37b4a9d638db0d605976afa889943c94ff947

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for propoptics-0.1.2-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 92db42c649a6c72b3f37dc99a0bfb97c08eaca4968e42ee4564b4839bee6db9e
MD5 5fa2dba8984f5509850d42ebdeef2b40
BLAKE2b-256 a91991cc2c1826b69be7912b0b677da6603e1a451985dea11feca93517549ba6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for propoptics-0.1.2-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 740953db9f3031e6378f96f271b1f273c1ec249f863ba3c04f40596e0616fd00
MD5 0a638606ab688847996a22a92e9ef195
BLAKE2b-256 bfaacfc1d1d94ce32911119ce1dd0cb173fc80e14edcd76109fa0f766fbda4fa

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