ictdesigntools.optical.osnr¶
Optical signal-to-noise ratio (OSNR) along a chain of amplified spans.
Every optical amplifier adds amplified spontaneous emission (ASE). At an amplifier's input the
signal, per channel, meets noise of about NF · h·ν · B (NF its noise figure, h·ν the photon
energy, B the reference bandwidth), so the OSNR one amplifier leaves is
OSNR = P_in − NF − 10·log10(h·ν·B / 1 mW) (dB, P_in in dBm per channel)
which is the familiar 58 + P_in − NF at 1550 nm in 0.1 nm (12.5 GHz). Noise from a chain
adds in linear terms: 1/OSNR_total = Σ 1/OSNR_i (with a transmitter's own OSNR, when given,
as one more term). Each Stage is a span loss followed by an amplifier; by default the
amplifier's gain makes up that loss, so the channel power returns to the launch level.
>>> stages = [Stage(22, Amplifier(5.5))] * 4
>>> r = link_osnr(1.0, stages)
>>> round(r.osnr_db, 1)
25.4
>>> round(ase_reference_dbm(1550), 2)
-57.95
>>> r = check("400zr", 1.0, stages)
>>> r.passes, round(r.margin_db, 1)
(False, -0.6)
OsnrError ¶
Bases: ValueError
A stage or chain that cannot be worked out.
Amplifier
dataclass
¶
Amplifier(
nf_db: float,
gain_db: float | None = None,
max_output_dbm: float | None = None,
name: str = "",
)
An optical amplifier: its noise figure, and its gain (None: make up the span loss before
it). max_output_dbm is its total output power limit, if known.
Stage
dataclass
¶
loss_db of span (fibre, connections, any passive parts) and the amplifier after it.
ase_reference_dbm ¶
ase_reference_dbm(
wavelength_nm: float = 1550.0,
bandwidth_ghz: float = REFERENCE_BANDWIDTH_GHZ,
) -> float
10·log10(h·ν·B / 1 mW): the noise one photon per second per hertz of reference band carries, the constant in the OSNR equation.
Source code in src/ictdesigntools/optical/osnr.py
per_channel_dbm ¶
The power per channel when channels share total_dbm equally.
Source code in src/ictdesigntools/optical/osnr.py
link_osnr ¶
link_osnr(
launch_dbm: float,
stages,
wavelength_nm: float = 1550.0,
bandwidth_ghz: float = REFERENCE_BANDWIDTH_GHZ,
transmitter_osnr_db: float | None = None,
channels: int = 1,
) -> OsnrResult
The OSNR after a chain of stages, launching launch_dbm per channel. With
channels, an amplifier's max_output_dbm is checked against their total.
Source code in src/ictdesigntools/optical/osnr.py
check ¶
check(
iface: str | Interface,
launch_dbm: float,
stages,
margin_db: float = 0.0,
**kwargs,
) -> OsnrCheck
Whether the chain's OSNR meets an amplified interface's requirement plus margin_db
(for ageing, nonlinear effects and filtering, which this does not model).