Skip to content

photonics-helper

A helper library for photonics, fiber optics and nonlinear-optics calculations in Python — unit-safe types, dispersion and propagation constants, pulse envelopes, the GNLSE, Raman modelling, χ⁽²⁾ mixing, DBR/TMM stacks, and literature reproductions.

Install

See Installation — the short version:

pip install photonics-helper

Quick start

from photonics_helper import Wavelength

wl = Wavelength(1550, "nm")
print(wl.to_freq().as_THz)  # 193.4 THz
print(wl.to_energy().as_eV)  # 0.8 eV

See the full quick start for a GNLSE run and the API Reference for the module map.

Where to go next

  • Install — extras (fftw, webapp, …) and FFT backends.
  • Foundation core — the stable primitives other projects build on.
  • Quick start — first pulses through the solvers.
  • API Reference — every public module, one page per module.
  • Reproductions — validated literature results.
  • The README has the full feature tour and runnable examples/.

Conventions

All internal math is SI (m, s, rad/s, W, J). Unit classes convert on construction and expose as_* accessors. The GNLSE uses the standard β_k in ps^k/m with Ω in rad/ps unless betas_unit="s^k/m" is passed.