A domain in pyofss contains the temporal and spectral axis (arrays) which are used by the system modules during simulation. There are helper functions which convert between frequency, angular frequency, and wavelength.

- TB – total bits
- SPB – samples per bit
- BW – bit width

- TS – total samples (TS = TB x SPB)
- TW – time window (TW = TB x BW)

Using and , the temporal array corresponding to is generated from

The first and last elements of the temporal array will have the values:

For the spectral array there will be a fixed shift such that the middle of the array corresponds to a central frequency . Then the spectral array corresponding to is generated from

The first and last elements of the spectral array will have the values:

An angular frequency array and a wavelength array are also generated using the following two relations

The field in pyofss represents the complex valued slowly varying envelope of the electric field that will be propagated through the optical fibre system. A fixed polarisation is used for the field. It is possible to use separate field arrays for each frequency/wavelength (channel) to be simulated.

A module in pyofss is a class that may be called with a domain and a field as parameters. The following modules may be generated:

The gaussian module will generate a (super-)Gaussian shaped pulse using the following parameters:

– Peak power (W)

– Chirp parameter (rad)

– pulse position (ps)

– pulse HWIeM width (ps) [

note: not FWHM]– Order paramater

– initial phase (rad)

– centre frequency (THz)

– offset frequency (THz)

Since the centre frequency is fixed by the domain, only the offset frequency is provided by the user.

The pulse position is given as a factor of the time window such that , and the user supplies the factor .

The sech module will generate a hyperbolic-Secant shaped pulse using the following parameters:

– Peak power (W)

– Chirp parameter (rad)

– pulse position (ps)

– pulse HWIeM width (ps) [

note: not FWHM]– initial phase (rad)

– centre frequency (THz)

– offset frequency (THz)

Since the centre frequency is fixed by the domain, only the offset frequency is provided by the user.

The pulse position is given as a factor of the time window such that , and the user supplies the factor .

A generator module can generate Gaussian or hyperbolic-secant (Sech) shaped pulses. The main difference to directly calling a Gaussian or Sech module is that the pulse position paramter is given as a factor of the bit width, and not as a factor of the time window. The user provides the factor where .

The fibre module propagates the input field incrementally using the generalised non-linear Schrödinger equation:

where is the complex field envelope of the pulse and is the dimension along the fibre length. The linear operator and non-linear operator are usually written:

The linear operator contains terms for attenuation and (second order and higher) dispersion. The nonlinear operator contains terms for self-phase modulation (SPM), self-steepening, and Raman scattering.

It is useful to apply the linear operator to the field in the frequency domain using the property :