OpticalChannel¶
- class OpticalChannel(channel_id, channel_type, direction, input_power, center_freq, num_of_modes=2, frequency_bandwidth=array([0.]), mode=None, overlaps=None, gain=array([0]), absorption=array([0]), loss=array([0]), reflection_target_id=None, reflectance=0, peak_power_func=<function OpticalChannel.<lambda>>)¶
The OpticalChannel class represents in single one-way power signal propagating in the fiber. It contains both user-supplied and pre-computed values required by the simulation model.
- classmethod from_mode(channel_id, channel_type: str, direction: int, fiber, input_power: float, wl: float, mode, num_of_modes=2, wl_bandwidth=0, loss=None, reflection_target_id=None, reflection_coeff=0, peak_power_func=<function OpticalChannel.<lambda>>)¶
Create an OpticalChannel based on a defined fiber mode. This is the highest-level method for channel creation. The mode shape is used to compute its overlap with the core and then gain and absorption in the fiber.
- Parameters
channel_id (str or int) – Identifier for the channel, used for defining reflections and accessing the channel later
channel_type – The kind of channel (‘signal’, ‘pump’, ‘ase’ or ‘raman’) is used for generating an initial guess for the steady state algorithm. It is also used for grouping channels for plotting.
direction – Either +1 = forward or -1 = backward
fiber – The fiber used in the simulation (subclass of FiberBase)
input_power – Channel power at the input.
wl – Wavelength of the channel
mode – Fiber mode representing the channel (subclass of ModeBase)
num_of_modes – Only relevant for ASE generation, normally = 2 for two polarization modes.
wl_bandwidth – Wavelength bandwidth of the channel. Only relevant for ASE generation. Large bandwidths should be divided into multiple channels.
loss – Background loss of the channel in 1/m.
reflection_target_id – If this channel reflects to a another channel, give that channel’s id here.
reflection_coeff – Reflectance to that other channel.
peak_power_func – Function mapping average power to peak power for pulsed signals. Only relevant for Raman.
- Returns
OpticalChannel
- classmethod from_overlaps(channel_id, channel_type, direction, fiber, input_power, wl, overlaps, num_of_modes=2, wl_bandwidth=0, loss=None, reflection_target_id=None, reflection_coeff=0, peak_power_func=<function OpticalChannel.<lambda>>, mode=None)¶
Create an OpticalChannel based on pre-computed overlap(s) with the ion populations in the fiber core. This is the second highest-level method for channel creation. The overlap(s) are used to calculate gain and absorption in the fiber.
- Parameters
channel_id (str or int) – Identifier for the channel, used for defining reflections and accessing the channel later
channel_type – The kind of channel (‘signal’, ‘pump’, ‘ase’ or ‘raman’) is used for generating an initial guess for the steady state algorithm. It is also used for grouping channels for plotting.
direction – Either +1 = forward or -1 = backward
fiber – The fiber used in the simulation (subclass of FiberBase)
input_power – Channel power at the input.
wl – Wavelength of the channel
overlaps – Numpy array of the channel’s overlaps with each ion population in the fiber’s core. Refer to DopingProfile for the definition of these ion populations.
num_of_modes – Only relevant for ASE generation, normally = 2 for two polarization modes.
wl_bandwidth – Wavelength bandwidth of the channel. Only relevant for ASE generation. Large bandwidths should be divided into multiple channels.
loss – Background loss of the channel in 1/m.
reflection_target_id – If this channel reflects to a another channel, give that channel’s id here.
reflection_coeff – Reflectance to that other channel.
peak_power_func – Function mapping average power to peak power for pulsed signals. Only relevant for Raman.
- Returns
OpticalChannel
- classmethod from_gain_and_absorption(channel_id, channel_type, direction, input_power, wl, gain, absorption, loss, num_of_modes=2, wl_bandwidth=0, reflection_target_id=None, reflection_coeff=0, peak_power_func=<function OpticalChannel.<lambda>>, mode=None, overlaps=None)¶
Create an OpticalChannel based on pre-computed gain and absorption values. This is the third highest-level method for channel creation.
- Parameters
channel_id (str or int) – Identifier for the channel, used for defining reflections and accessing the channel later
channel_type – The kind of channel (‘signal’, ‘pump’, ‘ase’ or ‘raman’) is used for generating an initial guess for the steady state algorithm. It is also used for grouping channels for plotting.
direction – Either +1 = forward or -1 = backward
fiber – The fiber used in the simulation (subclass of FiberBase)
input_power – Channel power at the input.
wl – Wavelength of the channel
gain – Numpy array of the channel’s gain from each ion population in the fiber’s core.
absorption – Numpy array of the channel’s absorption from each ion population in the fiber’s core.
num_of_modes – Only relevant for ASE generation, normally = 2 for two polarization modes.
wl_bandwidth – Wavelength bandwidth of the channel. Only relevant for ASE generation. Large bandwidths should be divided into multiple channels.
loss – Background loss of the channel in 1/m.
reflection_target_id – If this channel reflects to a another channel, give that channel’s id here.
reflection_coeff – Reflectance to that other channel.
peak_power_func – Function mapping average power to peak power for pulsed signals. Only relevant for Raman.
- Returns
OpticalChannel
- __init__(channel_id, channel_type, direction, input_power, center_freq, num_of_modes=2, frequency_bandwidth=array([0.]), mode=None, overlaps=None, gain=array([0]), absorption=array([0]), loss=array([0]), reflection_target_id=None, reflectance=0, peak_power_func=<function OpticalChannel.<lambda>>)¶