comnum.Edfa#

class comnum.Edfa(*, gain_db=Ellipsis, nf_db=Ellipsis, fc_hz=Ellipsis)#

An ideal erbium-doped fibre amplifier: flat gain and white ASE.

The spontaneous-emission factor is n_sp = (G·NF - 1)/(2(G - 1)) and the ASE adds complex Gaussian noise of variance (G - 1) n_sp h f_c f_s per sample at the sampling rate f_s (OptiCommPy edfa). The defaults are those of OptiCommPy.

Parameters:
  • gain_db (float) – gain (dB, positive).

  • nf_db (float) – noise figure (dB, at least 3 dB).

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

apply(x, fs, rng)#

Amplify a field and add the ASE.

Parameters:
  • x (array_like) – the field (√W).

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

  • rng (Rng) – the generator of the ASE.

Returns:

the amplified field (complex128).

Return type:

numpy.ndarray

Raises:

ValueError – for a gain that is not positive or a noise figure below 3 dB.

noise_variance(fs)#

Variance of the ASE per sample.

Parameters:

fs (float) – sampling rate (Hz).

Returns:

the variance E|w|² (W).

Return type:

float

ase_psd#

ASE power spectral density (G - 1) n_sp h f_c (W/Hz).

Type:

float

fc_hz#

Carrier frequency (Hz) (read and write).

Type:

float

gain_db#

Gain (dB) (read and write).

Type:

float

n_sp#

Spontaneous-emission factor n_sp.

Type:

float

nf_db#

Noise figure (dB) (read and write).

Type:

float