pyLaserPulse.pulse¶
Created on Thu Nov 26 20:39:13 2020
@author: james feehan
Starting pulse definition
Functions
Calculate the complex first-order degree of coherence for all fields in an iterable of pulse objects. |
Classes
|
Laser pulse class. |
|
Laser pulse class. |
|
Laser pulse class. |
|
Laser pulse class. |
|
Laser pulse class. |
- pyLaserPulse.pulse.complex_first_order_degree_of_coherence(grid, pulse_objects, decimate=True)¶
Calculate the complex first-order degree of coherence for all fields in an iterable of pulse objects.
- Parameters:
grid (pyLaserPulse.grid.grid object)
pulse_objects (iterable (list, tuple, etc) of pulse objects.)
decimate (bool) – The complex first-order degree of coherence calculation is memory intensive, and it is rare that very high resolution data is required. It is recommended that decimate == True, which will result in the coherence data set having a lower wavelength-domain resolution (max of 2^12 points).
- Returns:
CFODC (numpy array) – complex first-order degree of coherence for both polarization axis shape (2, n_points), where n_points is set by either grid.points, or the decimation (max 2^12).
lw (numpy array) – Wavelength grid for the complex first-order degree of coherence. This is the decimated grid.lambda_window, or equal to grid.lambda_window if no decimation is used.
- class pyLaserPulse.pulse.pulse(duration, P_0, pulse_shape, repetition_rate, grid, order=2, chirp=0, quantum_noise_seed=None, high_res_sampling=False, save_high_res_samples=False, save_dir=None, initial_delay=0)¶
Laser pulse class.
- __init__(duration, P_0, pulse_shape, repetition_rate, grid, order=2, chirp=0, quantum_noise_seed=None, high_res_sampling=False, save_high_res_samples=False, save_dir=None, initial_delay=0)¶
- Parameters:
duration (float) – FWHM pulse duration.
P_0 (list) – [peak_power_x, peak_power_y]
pulse_shape (string) – “Gauss” or “sech”
repetition_rate (float) – Repetition rate of the laser.
grid (pyLaserPulse.grid.grid object)
order (even integer) – If pulse_shape == ‘Gauss’, this is the supergaussian order (>= 1)
chirp (float) –
initial phase applied to the pulse in the time domain. This can be used to increase the pulse bandwidth for a given input duration. For a Gaussian pulse with chirp_parameter = C:
field = exp(2log(2) * (1 - iC) * (T / tau)**2)
- For a sech pulse with chirp_parameter = C:
field = (1 / cosh(t / tau))**(1 - iC)
quantum_noise_seed (numpy array or NoneType) – Custom starting quantum noise. If NoneType, default one photon per mode is used.
high_res_sampling (bool) – If True, propagation information is saved at intervals throughout the propagation.
save_high_res_samples (bool) – If True, high_res_sampling is saved.
save_dir (NoneType or string) – Directory to which data will be saved.
initial_delay (float) – Starting point of the pulse along the time axis in seconds. E.g., if initial_delay = 0, the pulse will be centred at 0 ps in the time window. If initial_delay = -1e-12, the pulse will be centred at -1 ps in the time window. This feature is useful if a large amount of asymmetrical broadening is expected in the time domain (e.g., when pumping close to the zero-dispersion wavelength in supercontinuum generation).
- make_pulse(grid, pulse_shape, P_0, duration, order=2, chirp=0)¶
Make self.field.
- Parameters:
grid (pyLaserPulse.grid.grid object)
pulse_shape (str) – ‘Gauss’, ‘sech’
P_0 (list of floats) – Starting peak powers. [P_x, P_y]
duration (float) – Starting pulse duration.
order (even integer) – If pulse_shape == ‘Gauss’, this is the supergaussian order (>= 1)
chirp (float) –
initial phase applied to the pulse in the time domain. This can be used to increase the pulse bandwidth for a given input duration. For a Gaussian pulse with chirp_parameter = C:
field = exp(2log(2) * (1 - iC) * (T / tau)**2)
- For a sech pulse with chirp_parameter = C:
field = (1 / cosh(t / tau))**(1 - iC)
- class pyLaserPulse.pulse.pulse_from_measured_PSD(grid, spectrum_file, beta_2, repetition_rate, spec_threshold, P_0, quantum_noise_seed=None, high_res_sampling=False, save_high_res_samples=False, save_dir=None, initial_delay=0)¶
Laser pulse class.
- __init__(grid, spectrum_file, beta_2, repetition_rate, spec_threshold, P_0, quantum_noise_seed=None, high_res_sampling=False, save_high_res_samples=False, save_dir=None, initial_delay=0)¶
- Parameters:
grid (pyLaserPulse.grid.grid object)
spectrum_file (str) – Absolute path to the file containing the spectral data. This file must have a header file_header_length lines long. The data must be comma or tab delimited, and must have wavelength data in nm in the first column, and the power spectral density in dBm/nm in the second column.
beta_2 (float) – Second-order dispersion that is applied to the spectrum to give the correct pulse duration. This can be used to model propagation for pulses which are not transform limited.
repetition_rate (float) – Repetition rate of the laser.
spec_threshold (float) – Measurement threshold below which all power spectral density values are set to 0.
P_0 (list) – [peak_power_x, peak_power_y]
quantum_noise_seed (numpy array or NoneType) – Custom starting quantum noise. If NoneType, default one photon per mode is used.
high_res_sampling (bool) – If True, propagation information is saved at intervals throughout the propagation.
save_high_res_samples (bool) – If True, high_res_sampling is saved.
save_dir (NoneType or string) – Directory to which data will be saved.
initial_delay (float) – Starting point of the pulse along the time axis in seconds. E.g., if initial_delay = 0, the pulse will be centred at 0 ps in the time window. If initial_delay = -1e-12, the pulse will be centred at -1 ps in the time window. This feature is useful if a large amount of asymmetrical broadening is expected in the time domain (e.g., when pumping close to the zero-dispersion wavelength in supercontinuum generation).
- make_pulse(grid, spectrum_file, spec_threshold, beta_2, P_0)¶
Method which defines the pulse (self.field)
- class pyLaserPulse.pulse.pulse_from_pyLaserPulse_simulation(grid, data_directory, high_res_sampling=False, save_high_res_samples=False, save_dir=None, initial_delay=0)¶
Laser pulse class.
Define a laser pulse using data output by a pyLaserPulse simulation.
- __init__(grid, data_directory, high_res_sampling=False, save_high_res_samples=False, save_dir=None, initial_delay=0)¶
- Parameters:
grid (pyLaserPulse.grid.grid object)
data_directory (str) – Absolute path of directory containing pulse.npz data file produced by a previous pyLaserPulse simulation.
high_res_sampling (bool) – If True, propagation information is saved at intervals throughout the propagation.
save_high_res_samples (bool) – If True, high_res_sampling is saved.
save_dir (NoneType or string) – Directory to which data will be saved.
initial_delay (float) – Starting point of the pulse along the time axis in seconds. E.g., if initial_delay = 0, the pulse will be centred at 0 ps in the time window. If initial_delay = -1e-12, the pulse will be centred at -1 ps in the time window. This feature is useful if a large amount of asymmetrical broadening is expected in the time domain (e.g., when pumping close to the zero-dispersion wavelength in supercontinuum generation).
- make_pulse(pulse_data)¶
Method which defines the pulse (self.field)
- load_high_res_sample_data()¶
Load the high resolution sampling data from the data file used to define the pulse.
These aren’t loaded at instantiation because it can take some time if the data file is large.
- This method populates:
self.high_res_B_integral_samples self.high_res_field_samples self.high_res_rep_rate_samples self.high_res_field_sample_points
Notes
self.high_res_rep_rate_samples is unlikely to be directly useful, and is generally only required for active fibre simulations and for proper scaling of the power spectral density as a function of self.high_res_field_sample_points.
- class pyLaserPulse.pulse.pulse_from_text_data(grid, file, P_0, repetition_rate, quantum_noise_seed=None, high_res_sampling=False, save_high_res_samples=False, save_dir=None, initial_delay=0)¶
Laser pulse class.
Define a laser pulse using data from a text file.
- __init__(grid, file, P_0, repetition_rate, quantum_noise_seed=None, high_res_sampling=False, save_high_res_samples=False, save_dir=None, initial_delay=0)¶
- Parameters:
grid (pyLaserPulse.grid.grid object)
file (str) – Absolute path of the text file containing the pulse amplitude data. This must be tab delimited with the following format with no header: Time axis in ps, centred at zero pulse intensity data (arb).
P_0 (list) – [peak_power_x, peak_power_y]
repetition_rate (float) – Repetition rate of the laser.
quantum_noise_seed (numpy array or NoneType) – Custom starting quantum noise. If NoneType, default one photon per mode is used.
high_res_sampling (bool) – If True, propagation information is saved at intervals throughout the propagation.
save_high_res_samples (bool) – If True, high_res_sampling is saved.
save_dir (NoneType or string) – Directory to which data will be saved.
initial_delay (float) – Starting point of the pulse along the time axis in seconds. E.g., if initial_delay = 0, the pulse will be centred at 0 ps in the time window. If initial_delay = -1e-12, the pulse will be centred at -1 ps in the time window. This feature is useful if a large amount of asymmetrical broadening is expected in the time domain (e.g., when pumping close to the zero-dispersion wavelength in supercontinuum generation).
- make_pulse(grid, file, P_0)¶
Method which defines the pulse (self.field)
- class pyLaserPulse.pulse.pulse_from_numpy_array(grid, pulse_array, P_0, repetition_rate, quantum_noise_seed=None, high_res_sampling=False, save_high_res_samples=False, save_dir=None, initial_delay=0)¶
Laser pulse class.
Define a laser pulse using a 1D numpy array containing the pulse shape in the time domain.
- __init__(grid, pulse_array, P_0, repetition_rate, quantum_noise_seed=None, high_res_sampling=False, save_high_res_samples=False, save_dir=None, initial_delay=0)¶
- Parameters:
grid (pyLaserPulse.grid.grid object)
pulse_array (numpy array) – Shape of the intensity profile of the pulse in the time domain. Doesn’t need to be normalized. Must be 1D and of len grid.points.
P_0 (list) – [peak_power_x, peak_power_y]
repetition_rate (float) – Repetition rate of the laser.
quantum_noise_seed (numpy array or NoneType) – Custom starting quantum noise. If NoneType, default one photon per mode is used.
high_res_sampling (bool) – If True, propagation information is saved at intervals throughout the propagation.
save_high_res_samples (bool) – If True, high_res_sampling is saved.
save_dir (NoneType or string) – Directory to which data will be saved.
initial_delay (float) – Starting point of the pulse along the time axis in seconds. E.g., if initial_delay = 0, the pulse will be centred at 0 ps in the time window. If initial_delay = -1e-12, the pulse will be centred at -1 ps in the time window. This feature is useful if a large amount of asymmetrical broadening is expected in the time domain (e.g., when pumping close to the zero-dispersion wavelength in supercontinuum generation).
- make_pulse(grid, pulse_array, P_0)¶
Method which defines the pulse (self.field)