pyLaserPulse.optical_assemblies¶
Created on Sat Mar 19 11:30:45 2022
@author: james feehan
Module containing classes of optical assemblies. These are to be inherited and used as templates for amplifiers, lasers, etc.
Classes
|
Class for use as a template for fibre assemblies. |
|
Class for use as a passive SM fibre assembly template. |
|
Class for use as a template for other SM fibre amplifiers. |
|
Class for use as a SM fibre laser template. |
- class pyLaserPulse.optical_assemblies.assembly(grid, components, name, wrap=False, high_res_sampling=None, plot=False, data_directory=None, verbose=True)¶
Class for use as a template for fibre assemblies. James Feehan, 19/3/2022. Revised ~5/2022 and 18/7/2022.
- __init__(grid, components, name, wrap=False, high_res_sampling=None, plot=False, data_directory=None, verbose=True)¶
- Parameters:
grid (pyLaserPulse grid object.)
components (list of component objects.)
name (str.) – String identifier for the assembly object.
wrap (bool. Include loss between first and last components (required,) – e.g., for a laser cavity).
high_res_sampling (Nonetype or int) –
- if samplingint
Number of samples to take along the propagation axis
if not sampling : None (default)
plot (bool.) – Create plot information.
data_directory (Nonetype or string) –
- if saving datastring
Directory to which data will be saved
if not saving data : None
verbose (bool) – Print information about the simulation at runtime
- make_full_components_list(comps, wrap)¶
Cycle through components and introduce coupling losses between them depending on their type and properties.
Python equivalent of building the oscillator from the components list (hence why this method is a member of the sm_fibre_laser class).
- Parameters:
comps (list) – List of component objects
wrap (bool. Include loss between first and last components (required,) – e.g., for a laser cavity).
Notes
Neglects bulk components because loss is defined using the transmission window member variable. Adds Fresnel losses to coupling between fibre and free space (and vice versa), and an additional loss for coupling from free space to fibre.
- update_pulse_class(pulse, field)¶
Called when returning simulate() method.
- Parameters:
pulse (pyLaserPulse.pulse.pulse object)
field (numpy array.) – Field to use for calculations and plots. This will generally either be pulse.field, or pulse.output.
- plot_pulse(pulse)¶
Plot the pulse time domain distributions.
- Parameters:
pulse (pyLaserPulse.pulse.pulse object)
- plot_B_integral(pulse)¶
Convert pulse.high_res_field_samples into the B-integral and plot.
- Parameters:
pulse (pyLaserPulse.pulse.pulse object)
- plot_energy_and_average_power(pulse)¶
Calculate the pulse energy and average power at each propagation step using pulse.high_res_field_samples.
- Parameters:
pulse (pyLaserPulse.pulse.pulse object)
- plot_pulse_samples(pulse)¶
plot pulse power spectral density and time-domain distribution as a function of propagation distance.
- Parameters:
pulse (pyLaserPulse.pulse.pulse object)
- plot_spectra(pulse)¶
Plot the pulse power spectral densities at the output of the assembly.
- Parameters:
pulse (pyLaserPulse.pulse.pulse object)
- classmethod saver(method)¶
Decorator for saving data.
- Parameters:
method (save method of any derived class)
Notes
This method saves the data belonging to the pulse object.
All derived classes should save dta using this decorated method. If no additional functionality is required by the method func in the derived class, use the following syntax:
@assembly.saver def save(self):
pass
If additional functionality is required, use the following syntax:
@assembly.saver def save(self):
self.another_method()
- class pyLaserPulse.optical_assemblies.passive_assembly(grid, components, name, wrap=False, high_res_sampling=None, plot=False, data_directory=None, verbose=True)¶
Class for use as a passive SM fibre assembly template.
- __init__(grid, components, name, wrap=False, high_res_sampling=None, plot=False, data_directory=None, verbose=True)¶
- Parameters:
grid (pyLaserPulse grid object.)
components (list of component objects.)
name (str.) – String identifier for the assembly object.
wrap (bool. Include loss between first and last components (required,) – e.g., for a laser cavity).
high_res_sampling (Nonetype or int) –
- if samplingint
Number of samples to take along the propagation axis
if not sampling : None (default)
plot (bool.) – Create plot information.
data_directory (Nonetype or string) –
- if saving datastring
Directory to which data will be saved
if not saving data : None
verbose (bool) – Print information about the simulation at runtime
- class pyLaserPulse.optical_assemblies.sm_fibre_laser(grid, components, round_trips, name, round_trip_output_samples=10, high_res_sampling=False, high_res_sampling_limits=[0, 1], high_res_sample_interval=0.1, plot=False, data_directory=None, verbose=True)¶
Class for use as a SM fibre laser template. James Feehan, 24/12/2020.
- __init__(grid, components, round_trips, name, round_trip_output_samples=10, high_res_sampling=False, high_res_sampling_limits=[0, 1], high_res_sample_interval=0.1, plot=False, data_directory=None, verbose=True)¶
- components_list: list of component objects. Must appear in order.
Recommended that components_list[0] is gain. Coupling losses between components are added automatically.
round_trips: int. Number of cavity round trips to simulate. round_trips: int. Number of round trips to simulate. name : str.
String identifier for the assembly object.
- round_trip_samples: int. Number of round trips in which the output
field is sampled. Sampling is done from roundtrip number round_trips-round_trip_samples to round_trips. If round_trip_samples > round_trips, round_trip_samples = round_trips.
- high_res_sampling: bool. If True, high-resolution sampling of the
intracavity field. This is slow.
- high_res_sampling_limits: list, int, len=2. Start and stop round trips
for the high-resolution field sampling. Ignored if high_res_sampling==False.
- high_res_sample_interval: float. Distance separating high-resolution
field samples. Default is 10 cm.
- class pyLaserPulse.optical_assemblies.sm_fibre_amplifier(grid, components, co_ASE=None, high_res_sampling=None, plot=False, name=None, data_directory=None, verbose=True)¶
Class for use as a template for other SM fibre amplifiers.
Only supports simulations where the boundary value conditions for the active fibre are solved.
James Feehan, 19/3/2022
- __init__(grid, components, co_ASE=None, high_res_sampling=None, plot=False, name=None, data_directory=None, verbose=True)¶
grid: grid class. components: list of component objects. Must appear in order.
Recommended that components_list[0] is gain. Coupling losses between components are added automatically. An active fibre must be present in components and boundary_value_solver needs to be enabled.
- co_ASE: numpy array (or None).
ASE from a previous amplifier that co-propagates in the core with the signal.
- high_res_samplingNonetype or int
- if samplingint
Number of samples to take along the propagation axis
if not sampling : None (default)
- plot: bool.
Create plot information. True if high_res_sampling.
- name: str.
String identifier for the amplifier object. Cannot be None if plot == True
- data_directorystr or Nonetype
Save the data to data_directory if not None
- verbosebool
Print information about the simulation at runtime
- scale_co_core_ASE(spectrum, omega_axis)¶
Core ASE light at the input of the amplifier that is generated by previous amplifiers needs to be scaled by the components which come before the gain fibre of this amplifier.
Only required if co_ASE is not None at constructor. Input analogue to self.make_co_core_ASE_output_spectra.
- spectrum: numpy array. Either self.gain_fibre.co_core_ASE.spectrum OR
self.gain_fibre.pump.spectrum AFTER co_ASE has been added. Which spectrum is used depends on self.gain_fibre.cladding_pumping (former if True).
- original_omega_window. numpy array.
Either self.gain_fibre.co_core_ASE.omega_window OR self.gain_fibre.pump.omega_window, depending on whether self.gain_fibre.cladding_pumping is True (former) or False (latter).
James Feehan, 14/5/2022
- make_co_core_ASE_output_spectra()¶
Make arrays containing the co-propagating core ASE PSDs after they have been modified by components that come after the gain fibre.
These arrays are passed to subsequent amplifiers as the starting conditions for co-propagating ASE.
This method creates self.co_core_ASE_ESD_output. This method neglects cladding modes (assumed to be isolated effectively by spatial constraints).
- make_display_spectra(pulse)¶
Organise spectra for plots.
pulse: pulse class. Starting field used in simulations.
James Feehan, 12/5/2022
- plot_spectra(pulse)¶
Make the spectral plots and display them
- plot_inversion()¶
Plot the inversion as a function of fibre length.
- plot_integration_error()¶
Plot the error for the ESD and full-field propagation.
- plot_gain_fibre_spectral_samples(rep_rate)¶
Plot self.gain_fibre.spectral_samples as heatmaps.
- plot_change_in_B_over_gain_fibre(pulse)¶
Same as assembly but just for the gain fibre.
- plot_pump_powers_over_gain_fibre()¶
Plot the power in the co- and counter-propagating pump and ASE channels over the length of the gain fibre.