comnum.laser#

comnum.laser(n, fs, rng, *, power_dbm=Ellipsis, linewidth_hz=Ellipsis, rin_var=Ellipsis, freq_shift_hz=Ellipsis)#

The field of a laser: power, Wiener phase noise, relative intensity noise and frequency offset (OptiCommPy basicLaserModel).

Parameters:
  • n (int) – number of samples.

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

  • rng (Rng) – the generator.

  • power_dbm (float) – output power (dBm).

  • linewidth_hz (float) – linewidth (Hz).

  • rin_var (float) – variance of the relative intensity noise.

  • freq_shift_hz (float) – frequency offset (Hz).

Returns:

n samples of the field (√W, complex128).

Return type:

numpy.ndarray

Raises:

ValueError – for a negative count.