comnum.wdm_grid#

comnum.wdm_grid(n, spacing_hz)#

The centre frequencies of n WDM channels, relative to the carrier: the grid of OptiCommPy’s simpleWDMTx.

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

  • spacing_hz (float) – channel spacing (Hz).

Returns:

the n frequencies (Hz, float64).

Return type:

numpy.ndarray

Raises:

ValueError – for a negative count.

Examples

>>> import comnum
>>> comnum.wdm_grid(3, 50e9).tolist()
[-50000000000.0, 0.0, 50000000000.0]