pychi package
pychi.light module
Created on Fri Aug 13 12:01:48 2021
@author: Thibault
This module contains the classes used to instantiate light. Different standard pulse shapes are built-in, and a class is dedicated to accomodating user-provided light with arbitrary spectral shape. Note that the electric field is stored as an analytical envelope, thus is a complex quantity.
- class pychi.light.Arbitrary(waveguide, pulse_frequency_axis, pulse_electric_field, pulse_energy)[source]
Bases:
Light
Class for arbitrary light waveform, specified in frequency domain.
- class pychi.light.Cw(waveguide, average_power, wavelength)[source]
Bases:
Light
Class for CW light.
- class pychi.light.Gaussian(waveguide, pulse_duration, pulse_energy, pulse_wavelength, delay=0)[source]
Bases:
Light
Class for a Gaussian pulse.
- class pychi.light.Light(waveguide, field_t_in)[source]
Bases:
object
Parent light class. Implement support for adding pulses, saving the results of a propagation and plotting these results. Not suitable for light instantiation.
pychi.materials module
- class pychi.materials.Waveguide(frequency, n_eff, chi_2, chi_3, effective_area, length, raman_fraction=0.18, raman_tau_1=1.22e-14, raman_tau_2=3.2e-14, t_pts=16384)[source]
Bases:
object
Waveguide class. Contains all material related information, i.e. the refractive index curve versus frequency, the Raman parameters, the nonlinear coefficients, the effective area and length. This object should be the first object instantiated, as the time/frequency axes of the simulation are derived here from the available refractive index data.
- Parameters:
frequency (array) – Frequency axis on which the effective refractive index is given.
n_eff (float, vector, array or callable) – Effective refractive index of the material.
chi_2 (float, vector, array or callable) – Order 2 material nonlinearity.
chi_3 (float, vector, array or callable) – Order 3 material nonlinearity.
effective_area (float) – Effective area at the pump wavelength.
length (float) – Length of the material.
raman_fraction (float) – Fractional contribution of the Raman effect to the Kerr effect. The default is 0.18.
raman_tau_1 (float) – Raman effect primary time scale. The default is 0.0122e-12.
raman_tau_2 (float) – Raman effect secondary time scale. The default is 0.032e-12.
t_pts (float, optional) – Number of points in the time and frequency axes, will be rounded to nearest higher power of 2. The default is 2**14.
- property chi_2
Get the quadratic nonlinear coefficient at position z.
- property chi_3
Get the cubic nonlinear coefficient at position z.
- compute_betas(wavelength=None, order=6)[source]
Compute beta coefficients at a given wavelength and order.
- Parameters:
wavelength (float, optional) – Wavelength at which the beta coefficients are computed. The default is the center of the simulation axis.
order (int, optional) – Highest order of the beta coefficients to be computed. The default is 6.
- Returns:
beta – Beta coefficients of the material at the given wavelength.
- Return type:
array
- property k
Get the wavevectors at position z.
- property n_eff
Get the effective refractive index at position z.
- property rhs_prefactor
Get the GNLSE right-hand-side prefactor at position z.
- set_betas(betas, wavelength)[source]
Convenience only. Allow the use to provide the beta coefficients instead of n_eff. Should be avoided.
pychi.models module
Created on Fri Feb 18 17:24:21 2022
@author: voumardt
- class pychi.models.Chi2(waveguide, light)[source]
Bases:
Model
Sum frequency generation and difference frequency generation only physical model.
- class pychi.models.Chi2Chi3(waveguide, light)[source]
Bases:
Model
Triple-sum, sum and difference frequency generation physical model.
- class pychi.models.Chi3(waveguide, light)[source]
Bases:
Model
Triple sum-frequency physical model.
- class pychi.models.Model(waveguide, light)[source]
Bases:
object
Parent class for the different nonlinear Schrödinger equations. Provide general utility, optimization and setup functions for the physics happening in the child classes.
- class pychi.models.Spm(waveguide, light)[source]
Bases:
Model
Self phase modulation only physical model.
- class pychi.models.SpmChi2(waveguide, light)[source]
Bases:
Model
Self phase modulation, sum and difference frequency generation physical model.
- class pychi.models.SpmChi2Chi3(waveguide, light)[source]
Bases:
Model
Self phase modulation, triple harmonic, sum and difference frequency generation physical model.
- class pychi.models.SpmChi3(waveguide, light)[source]
Bases:
Model
Self phase modulation and triple harmonic physical model.
- pychi.models.numbaabs2(x)
Compute numba optimized absolute norm square of input vector.
- pychi.models.numbaconj(x)
Compute numba optimized complex conjugate of a vector.
- pychi.models.numbacopy(x)
Create a numba optimized copy of a vector.
- pychi.models.numbaexp(x)
Compute numba optimized exponential of input vector.
- pychi.models.numbasht(x, y)
Compute numba optimized sh term.
- pychi.models.numbathg(x, y)
Compute numba optimized th term.
pychi.solvers module
Created on Fri Feb 18 17:54:20 2022
@author: voumardt
- class pychi.solvers.Solver(model, z_pts=500, local_error=1e-05, adaptive_factor=1.1, max_dz=None, method=None, breakpoints=[])[source]
Bases:
object
- pychi.solvers.numbaexp(x)
- pychi.solvers.numbanorm(field)