comnum.FiberParams#

class comnum.FiberParams(*, alpha_db_km=Ellipsis, d_ps_nm_km=Ellipsis, gamma_w_km=Ellipsis, span_km=Ellipsis, n_spans=Ellipsis, fc_hz=Ellipsis, nf_db=Ellipsis, slope_ps_nm2_km=0.0)#

The parameters of a fibre link of identical spans, each followed by an amplifier.

Engineering units of OptiCommPy: attenuation in dB/km, dispersion parameter D in ps/(nm·km), nonlinear coefficient γ in 1/(W·km), lengths in km, carrier frequency in Hz, noise figure in dB. The defaults describe standard single-mode fibre at 193.1 THz with 80 km spans. Every attribute is readable and writable.

Parameters:
  • alpha_db_km (float) – attenuation (dB/km).

  • d_ps_nm_km (float) – dispersion parameter D (ps/(nm·km)).

  • gamma_w_km (float) – nonlinear coefficient γ (1/(W·km)).

  • span_km (float) – span length (km).

  • n_spans (int) – number of spans.

  • fc_hz (float) – carrier frequency (Hz).

  • nf_db (float) – noise figure of the amplifiers (dB).

Examples

>>> import comnum
>>> f = comnum.FiberParams(n_spans=10)
>>> f.total_km
800.0
>>> round(f.beta2_ps2_km, 2)
-21.75
dispersion_memory_samples(bandwidth_hz, fs)#

Dispersion memory of the link for a signal of bandwidth bandwidth_hz, 2π |β₂| L B fs.

Parameters:
  • bandwidth_hz (float) – bandwidth of the signal (Hz).

  • fs (float) – sampling rate (Hz).

Returns:

the memory (samples at fs).

Return type:

float

accumulated_dispersion_ps_nm#

Accumulated dispersion D·L_total (ps/nm).

Type:

float

alpha_db_km#

Attenuation (dB/km) (read and write).

Type:

float

alpha_np_km#

Power attenuation α (neper/km).

Type:

float

beta2_ps2_km#

Group-velocity dispersion β₂ (ps²/km).

Type:

float

beta2_s2_km#

Group-velocity dispersion β₂ = -Dλ²/(2πc) (s²/km).

Type:

float

d_ps_nm_km#

Dispersion parameter D (ps/(nm·km)) (read and write).

Type:

float

effective_length_km#

Effective length of a span (1 - e^{-αL})/α (km).

Type:

float

fc_hz#

Carrier frequency (Hz) (read and write).

Type:

float

gamma_w_km#

Nonlinear coefficient γ (1/(W·km)) (read and write).

Type:

float

n_spans#

Number of spans (read and write).

Type:

int

nf_db#

Noise figure of the amplifiers (dB) (read and write).

Type:

float

span_gain#

Linear power gain e^{αL} that compensates the loss of one span.

Type:

float

span_gain_db#

Span gain (dB).

Type:

float

span_km#

Span length (km) (read and write).

Type:

float

total_km#

Total length (km).

Type:

float

wavelength_m#

Wavelength c/f_c (m).

Type:

float