pyLaserPulse.abstract_bases¶
Created on Tue Jul 12 10:26:17 2022
@author: james feehan
Module of abstract base classes for optical components.
Classes
|
Abstract type for active fibres. |
|
Abstract type for components. |
Class for coupling loss between components. |
|
|
Abstract type for passive fibres. |
Abstract type for loss spectra that can be applied with a single-step propagator (e.g., components, but not fibres). |
- class pyLaserPulse.abstract_bases.fibre_base(g, length, loss_file, Raman_file, beat_length, n2, fR, tol, verbose=False)¶
Abstract type for passive fibres.
Contains all methods and members required to simulate single-mode pulse propagation in passive optical fibre.
self.get_signal_propagation_parameters will be specific to the structure of the fibre being simulated (e.g., PCF vs SMF) and is left as a ‘blank’ abstractmethod which needs to be overloaded by all derived classes.
- __init__(g, length, loss_file, Raman_file, beat_length, n2, fR, tol, verbose=False)¶
- Parameters:
g (grid.) – pyLaserPulse.grid.grid object.
length (float.) – Fibre length in m.
loss_file (string.) – Absolute path to file containing fibre loss data. See pyLaserPulse.data.paths.materials.loss_spectra
Raman_file (string.) – Absoltue path to file containing Raman response data. Recommend pyLaserPulse.data.paths.materials.Raman_profiles
beat_length (float.) – Polarization beat length in m.
n2 (float.) – Nonlinear index in m^2 / W.
fR (float.) – Fraction contribution of delayed (Raman) effects to the nonlinear material response (e.g., fR = 0.18 for fused silica).
tol (float.) – Propagation error tolerance for the conservation quantity error method propagation step sizing algorithm.
verbose (bool) – Print information to terminal if True
- make_verbose()¶
Change self.verbose to True Called by optical_assemblies. If the optical assembly verbosity is True, all component verbosities are also set to True.
- make_silent()¶
Change self.verbose to False Called by optical_assemblies. If the optical assembly verbosity is False, all component verbosities are also set to False.
- abstractmethod get_propagation_parameters()¶
Specific to each derived class. Must calculate the following: signal_ref_index, V, beta_2, D, effective_MFD, signal_mode_area
Other ‘nice to haves’, e.g., NA, can also be added.
- static Petermann_II(V)¶
Petermann II method for ratio of mode and core diameters from V.
- Parameters:
V (numpy array.) – V-number as a function of frequency.
- Returns:
Ratio of mode and core diameters as a function of frequency.
- Return type:
numpy array.
- override_dispersion_using_Taylor_coefficients(Taylor_coefficients)¶
Redefine the linear operator using Taylor coefficients for the dispersion instead of models based on the fibre geometry.
- Parameters:
Taylor_coefficients (list of floats) – Taylor coefficients [beta_2, beta_3, … beta_n] describing the fibre dispersion curve.
- get_GNLSE_and_birefringence_parameters()¶
Define self.effective_MFD, self.signal_mode_area, self.gamma, and call self._get_birefringence, self._get_polarization_group_velocity_mismatch self._make_linear_operator, and self._make_self_steepening_term.
Can only be called after get_signal_propagation_parameters.
- propagate(pulse)¶
Apply passive linear and nonlinear operators iteratively over the fibre length and use the conservation quantity error method (photon counting) for adaptive step sizing.
- Parameters:
pulse (pulse class.) – Object of type pyLaserPulse.pulse.pulse.
- Returns:
Object of type pyLaserPulse.pulse.pulse.
- Return type:
- class pyLaserPulse.abstract_bases.active_fibre_base(g, N_ions, cross_section_file, seed_rep_rate, pump_points, pump_wl_lims, Sellmeier_file, lifetime, cladding_pumping, time_domain_gain, boundary_conditions, verbose=True)¶
Abstract type for active fibres.
Contains all methods and members required to transform a passive fibre into an active fibre, which can be done using multiple inheritance as long as the method resolution order is:
<class ‘pyLaserPulse.abstract_bases.active_fibre_base’> followed by inheritance of type <class ‘pyLaserPulse.abstract_bases.fibre_base’>, which can be from the base_components module, such as: <class ‘pyLaserPulse.base_components.step_index_passive_fibre’> or <class ‘pyLaserPulse.base_components.photonic_crystal_passive_fibre’>.
- __init__(g, N_ions, cross_section_file, seed_rep_rate, pump_points, pump_wl_lims, Sellmeier_file, lifetime, cladding_pumping, time_domain_gain, boundary_conditions, verbose=True)¶
- Parameters:
g (grid.) – pyLaserPulse.grid.grid object.
N_ions (float) – Rare-earth ion number density in m^-3
cross_section_file (string.) – Absolute path to file containing emission and absorption cross section data. See paths.fibres.cross_sections
seed_rep_rate (float) – Repetition rate of the seed laser. See pulse.repetition_rate.
pump_points (int) – Number of points in the pump/ASE spectrum window.
pump_wl_lims (list) – [min_wavelength, max_wavelength] for the pump/ASE wavelength window in m.
Sellmeier_file (string.) – Absolute path to file containing Sellmeier coefficients for the fibre material. See pyLaserPulse.data.paths.materials.Sellmeier_coefficients.
lifetime (float) – Upper-state lifetime of the rare-earth dopant in s.
cladding_pumping (bool) – True if cladding pumping, False if core pumping.
time_domain_gain (bool) – True if mixed-domain gain operator (i.e., both frequency- and time-domain gain) is to be used. If False, only frequency- domain gain is simulated.
boundary_conditions (dict) –
Set the boundary conditions for resolving the evolution of the pump, signal, and ASE light in both directions through the fibre. The type of simulation – i.e., single-pass or full boundary value solver – is determined by this dictionary. Valid dictionary keys:
- co_pump_powerfloat
Power of the co-propagating pump in W
- co_pump_wavelengthfloat
Central wavelength of the co-propagating pump in m
- co_pump_bandwidthfloat
Bandwidth of the co-propagating pump in m
- counter_pump_powerfloat
Power of the counter-propagating pump in W
- counter_pump_wavelengthfloat
Central wavelength of the counter-propagating pump in m
- counter_pump_bandwidthfloat
Bandwidth of the counter-propagating pump in m
verbose (bool) – Print information to terminal if True
Notes
If no counter-pump values are specified, then the propagation is completed in a single step and no effort is made to resolve counter- propagating signals (i.e., the boundary value problem is not solved). This allows for co-pumping only. Example:
- boundary_conditions = {
‘co_pump_power’: 1, ‘co_pump_wavelength’: 976e-9, ‘co_pump_bandwidth’: 1e-9}
The boundary value problem is solved whenever dictionary key ‘counter_pump_power’ is present, but it is not necessary to specify the wavelength or bandwidth of either the co- or counter-propagating pump if the power is zero. Here are a few examples of valid boundary_conditions dictionaries:
- Co-pumping with full boundary value solver:
- boundary_conditions = {
‘co_pump_power’: 1, ‘co_pump_wavelength’: 976e-9, ‘co_pump_bandwidth’: 1e-9, ‘counter_pump_power’: 0}
- Bidirectional pumping with full boundary value solver:
- boundary_conditions = {
‘co_pump_power’: 1, ‘co_pump_wavelength’: 976e-9, ‘co_pump_bandwidth’: 1e-9, ‘counter_pump_power’: 1, ‘counter_pump_wavelength’: 976e-9, ‘counter_pump_bandwidth’: 1e-9}
- Counter-pumping with full boundary value solver:
- boundary_conditions = {
‘co_pump_power’: 0, ‘counter_pump_power’: 1, ‘counter_pump_wavelength’: 976e-9, ‘counter_pump_bandwidth’: 1e-9}
- make_verbose()¶
Change self.verbose to True Called by optical_assemblies. If the optical assembly verbosity is True, all component verbosities are also set to True.
- make_silent()¶
Change self.verbose to False Called by optical_assemblies. If the optical assembly verbosity is False, all component verbosities are also set to False.
- abstractmethod get_pump_refractive_index()¶
Specific to each derived class. Must determine the pump refractive index.
abstractmethod because this can be different for different fibre types and pumping geometries.
- abstractmethod static get_pump_and_ASE_propagation_parameters()¶
Specific to each derived class. Must calculate the following parameters for the pump and ASE light:
V, effective_MFD, mode_area.
These parameters should be returned (staticmethod) so that this function can be used for the core ASE/pump and cladding ASE/pump.
- get_overlaps_core_light(points, lambda_window, MFD)¶
Calculate the overlap integrals for pump, ASE, or signal with the doped core. Assumes infinite rotational symmetry.
- Parameters:
points (int) – Number of grid points.
lambda_window (numpy array) – Wavelength window in m. Recommend using grid.lambda_window.
MFD (numpy array) – Mode field diameter as a function of lambda_window
- Returns:
Overlap integral as a function of lambda_window.
- Return type:
numpy array
- add_pump(wavelength, bandwidth, power, repetition_rate, direction)¶
Add another pump source.
This method permits multiple pump wavelengths with a common propagation direction. Co- and counter-pump light can be defined independently at instantiation using the boundary conditions, but if two co- OR counter- pump wavelengths are required, the second must be added using this method after instantiation. The second pump source is added to the pump spectrum which propagates in the same direction, i.e., self.pump.spectrum if direction == ‘co’, or self.counter_pump.spectrum if direction == ‘counter’.
- Parameters:
wavelength (float) – Pump wavelength, nm
bandwidth (float) – Pump bandwidth, nm
power (float) – Pump power, W
repetition_rate (float) – Laser repetition rate, Hz
direction (str) – Pumping direction (either with, ‘co’, or against, ‘counter’, the signal light). Possible values: ‘co’, ‘counter’
Notes
wavelength must be within the existing pump and ASE wavelength grid. If cladding pumping, all new pumps will be added to the cladding too. If cladding pumping, all pump propagation parameters are assumed to be the same as those calculated using the pump source passed when instantiating the active fibre.
- propagate(pulse)¶
Apply passive linear and nonlinear operators and gain over iteratively over the fibre length.
- Parameters:
pulse (pyLaserPulse.pulse.pulse)
- Return type:
- Raises:
Exception – Full boundary value solver not yet supported for oscillator simulations (amplifier only)
Notes
oscillator=True: False if amplifier only (ie., single-pass).
- class pyLaserPulse.abstract_bases.loss_spectrum_base¶
Abstract type for loss spectra that can be applied with a single-step propagator (e.g., components, but not fibres).
- __init__()¶
- class pyLaserPulse.abstract_bases.component_base(loss, transmission_bandwidth, lambda_c, epsilon, theta, beamsplitting, g, crosstalk, order=2, output_coupler=False, coupler_type='polarization', beta_list=None, gdm=0)¶
Abstract type for components.
Contains all methods and members required to simulate time-frequency domain propagation effects of many standard optical components.
- __init__(loss, transmission_bandwidth, lambda_c, epsilon, theta, beamsplitting, g, crosstalk, order=2, output_coupler=False, coupler_type='polarization', beta_list=None, gdm=0)¶
- Parameters:
loss (float) – Insertion loss at the signal wavelength.
transmission_bandwidth (float) – Transmission bandwidth. Can also be interpreted as reflection bandwidth for reflective optics.
lambda_c (float) – Central wavelength of transmission window.
epsilon (complex) –
Defines type of component (polarizer or retarder). Defined for field. For example:
epsilon = 0 + 1j for a quarter wave plate, epsilon = -1 for a half wave plate, epsilon = 0.1 for 20 dB polarization extinction.
theta (float) – Angle subtended by component optical axis and x-axis.
beamsplitting (float) – Intensity fraction remaining in pulse.field if output coupler and coupler_type=”beamsplitter”
g (pyLaserPulse.grid.grid object)
crosstalk (float) – Polarization degradation caused by the component.
order (int) – Steepness of the super-Gaussian transmission window edges.
output_coupler (boolean) – If True, the component is an output coupler and some of the main beam (pulse.field) is tapped off.
coupler_type (string) – “polarization” or “beamsplitter”. If the former, Jones matrix for polarization-based output coupler is used. If the latter, Jones matrix for polarization-independent beam splitting is used for the output coupler.
beta_list (list) – None by default. Contains Taylor coefficients [beta_2, beta_3, …, beta_n] which define the dispersion profile of the component.
gdm (float) – Polarization group delay mismatch. Units: s. Delay accumulated between polarization components after propagating through the component. If gdm > 0, x is the slow axis.
- make_verbose()¶
Change self.verbose to True Called by optical_assemblies. If the optical assembly verbosity is True, all component verbosities are also set to True.
Notes
Verbosity is not set in __init__ because there is little to report about standard component propagation. However, make_verbose is included as a method because some derived classes CAN make use of verbosty (e.g., grating compressors).
- make_silent()¶
Change self.verbose to False Called by optical_assemblies. If the optical assembly verbosity is False, all component verbosities are also set to False.
Notes
Verbosity is not set in __init__ because there is little to report about standard component propagation. However, make_silent is included as a method because some derived classes CAN make use of verbosty (e.g., grating compressors).
- make_transmission_spectrum()¶
Define the spectral transmission window of the component.
- make_birefringence()¶
Use the GDM to make the birefringence operator.
- make_dispersion()¶
Make the dispersion profile as a function of the grid omega_window.
- apply_transmission_spectrum(field, photon_spectrum)¶
Apply the spectral transmission window of the component to the field.
- Parameters:
field (numpy array) – Pulse field.
photon_spectrum (numpy array) – Number of photonc in each frequency bin of field.
- Returns:
Pulse field after the transmission spectrum has been applied.
- Return type:
numpy array
- apply_dispersion(field)¶
Apply component dispersion to the field.
- Parameters:
field (numpy array) – Pulse field.
- Returns:
Pulse field after the dispersion has been applied.
- Return type:
numpy array
- apply_birefringence(field)¶
Apply component birefringence to the field.
- Parameters:
field (numpy array) – Pulse field
- Returns:
Pulse field after the birefringence has been applied.
- Return type:
numpy array
- make_Jones_matrix()¶
Define the Jones matrix for the component. Handles pol.-dependent retardation and attenuation.
- apply_Jones_matrix(field)¶
Apply the Jones matrix to the field.
- Parameters:
field (numpy array) – Pulse field.
- Returns:
Pulse field after the Jones matrix has been applied.
- Return type:
numpy array
- classmethod propagator(func)¶
Field propagation decorator.
- Parameters:
func (propagate method of the derived class.)
Notes
All derived classes should propagate the pulse through this method. If no additional functionality is required by the method func in the derived class, use the following syntax:
@_component_base.propagator def propagate(self, pulse):
return pulse
If additional functionality is required, use the following syntax:
@_component_base.propagator def propagate(self, pulse):
self.another_method(pulse)
- classmethod ESD_propagator(func)¶
Energy spectral density propagation decorator.
- Parameters:
func (propagate method of the derived class)
Notes
All derived classes should propagate the ESD through this method. If no additional functionality is required by the method func in the derived class, use the following syntax:
@_component_base.ESD_propagator def propagate_spectrum(self, pulse):
pass
If additional functionality is required, use the following syntax:
@_component_base.ESD_propagator def propagate_spectrum(self, pulse):
self.another_method(pulse)
- class pyLaserPulse.abstract_bases.coupling_transmission_base(grid)¶
Class for coupling loss between components. Used in optical_assemblies.py when components are ‘assembled’ into the full structure (see, for example, sm_fibre_laser.__init__).
- __init__(grid)¶
- Parameters:
grid (pyLaserPulse.grid.grid object.)
- propagate(pulse)¶
Apply the coupling loss to the pulse spectrum.
- Parameters:
pulse (pyLaserPulse.pulse.pulse)
- Return type:
- propagate_spectrum(spectrum, omega_axis)¶
Apply the full coupling transmission operator to an input energy spectral density. This is useful for modelling the effect of, for example, a splice on ASE and pump light.
- Parameters:
spectrum (numpy array, dtype float64.) – shape(2, n_points). Energy spectrum of the light.
omega_axis (numpy array. dtype float64.) – Angular frequency grid corresponding to spectrum
- Returns:
Energy spectral density after the transmission spectrum has been applied.
- Return type:
numpy array
Notes
This is the coupling_transmission equivalent of base_components.component.propagate_spectrum.