gasfir.kernels — kernel internals
Note
End users should call the public functions in gasfir rather than
importing from this module directly.
Linear polarisation
Kernel functions for computing ionization rates and probabilities.
This module provides functions to compute ionization rates and probabilities using different kernel methods. The kernels are used to model the ionization process in atoms and molecules under strong laser fields.
The module implements three different methods:
GASFIR (General Approximator for Strong Field Ionization Rates)
Exact SFA (Strong Field Approximation)
QS (Quasi-Static)
Parameters can be obtained either by using pre-defined values for common gases
through get_parameters() or by specifying custom values.
Example
>>> from gasfir import create_pulse, get_parameters
>>> laser = create_pulse(800, 1e14, 0, 30)
>>> params = get_parameters("Hydrogen_SFA")
>>> rates = get_diabatic_ionization_rate(t_grid, laser, params)
- gasfir.kernels.get_diabatic_ionization_probability(pulse, param_dict, dt=2.0, dT=0.25, filterTreshold=0.0, kernel_type='GASFIR', ret_Rate=False, ret_electron_density=False)[source]
Compute ionization probability for a defined pulse.
- Parameters:
pulse (
Pulse) – Pulse object defining the pulseparam_dict (
Dict[str,float]) – Dictionary containing kernel parametersdt (
float) – Time step for rate calculation (default: 2.0)dT (
float) – Time step for kernel integration (default: 0.25)filterTreshold (
float) – Threshold for filtering rates (default: 0.0)kernel_type (
str) – Type of kernel to use (“GASFIR” or “exact_SFA”)ret_Rate (
bool) – Whether to return rates array (default: False)
- Return type:
Union[float,Tuple[float,ndarray[tuple[Any,...],dtype[float64]],ndarray[tuple[Any,...],dtype[float64]]]]- Returns:
If
ret_Rateis False, the total ionization probability (float). Ifret_Rateis True, a tuple(probability, t_grid, rates).
- gasfir.kernels.get_diabatic_ionization_rate(t_grid, pulse, param_dict, dT=0.25, kernel_type='GASFIR', ret_tgrid=False)[source]
Compute ionization rates for a defined pulse.
- Parameters:
t_grid (
ndarray[tuple[Any,...],dtype[float64]]) – Time grid for ionization momentspulse (
Pulse) – Pulse object defining the laser fieldparam_dict (
Dict[str,float]) – Dictionary containing kernel parametersdT (
float) – Time step for integration (default: 0.25)kernel_type (
str) – Type of kernel to use (“GASFIR” or “exact_SFA”)ret_tgrid (
bool) – Whether to return the time grid (default: False)
- Return type:
Union[ndarray[tuple[Any,...],dtype[float64]],Tuple[ndarray[tuple[Any,...],dtype[float64]],ndarray[tuple[Any,...],dtype[float64]]]]- Returns:
If
ret_tgridis False, an array of ionization rates at each time point. Ifret_tgridis True, a tuple(time_grid, rates).
Notes
The function handles various input formats for t_grid:
None: Uses laser field’s default time grid
pandas Series: Converts to numpy array
list: Converts to numpy array
numpy array: Used as is
- gasfir.kernels.get_probability_quasi_static_limit(pulse, param_dict, dt=2.0)[source]
Calculate the quasi-static ionization probability.
- gasfir.kernels.get_quasi_static_rate_for_field(field, param_dict, type='GASFIR', Z=1, l=0, m=None)[source]
return the ionization rate for a define pulse computed with provided parameters :type field:
float|ndarray[tuple[Any,...],dtype[float64]] :param field: the grid of electric field strengths :type field: float64/np.ndarray :type param_dict:Dict[str,float] :param param_dict: dictionary defining the medium’s parameters :type type: :param type: GASFIR or ADK or Tong-Lin (default: GASFIR) :type Z: :param Z: charge of the residual ion (default: 1 for neutral atoms) :type l: :param l: orbital angular momentum quantum number (default: 0) :type m: :param m: magnetic quantum number (default: None, if None, sums over all m for given l)- Returns:
the ionization rates for given array of electric field strengths
- Return type:
np.ndarray, shape=(field.size)
- gasfir.kernels.get_rate_quasi_static_limit(t_grid, pulse, param_dict, type='GASFIR', Z=1, l=0, m=None)[source]
Calculate the quasi-static ionization rate.
- Parameters:
t_grid (
ndarray[tuple[Any,...],dtype[float64]]) – Time grid for the calculationpulse (
Pulse) – Pulse object defining the laser fieldparam_dict (
Dict[str,float]) – Dictionary containing the parameterstype – Type of rate to compute (“GASFIR” or “ADK” or “Tong-Lin”) default is “GASFIR”
Z – Charge of the residual ion (default: 1 for neutral atoms, relevant for ADK)
l – Orbital angular momentum quantum number (default: 0, relevant for ADK)
m – Magnetic quantum number (default: None, if None, sums over all m for given l, relevant for ADK)
- Return type:
- Returns:
Array of ionization rates at each time point
Elliptical / circular polarisation
- gasfir.kernels_circ.get_diabatic_ionization_probability(pulse, param_dict, dt=2.0, dT=0.25, filterTreshold=0.0, kernel_type='GASFIR', ret_Rate=False)[source]
Compute ionization probability for a defined pulse.
- Parameters:
pulse (
EllipticalCosNPulse) – EllipticalCosNPulse object defining the pulseparam_dict (
Dict[str,float]) – Dictionary containing kernel parametersdt (
float) – Time step for rate calculation (default: 2.0)dT (
float) – Time step for kernel integration (default: 0.25)filterTreshold (
float) – Threshold for filtering rates (default: 0.0)kernel_type (
str) – Type of kernel to use (“GASFIR” or “exact_SFA”)ret_Rate (
bool) – Whether to return rates array (default: False)
- Return type:
Union[float,Tuple[float,ndarray[tuple[Any,...],dtype[float64]],ndarray[tuple[Any,...],dtype[float64]]]]- Returns:
If
ret_Rateis False, the total ionization probability (float). Ifret_Rateis True, a tuple(probability, t_grid, rates).
- gasfir.kernels_circ.get_diabatic_ionization_rate(t_grid, pulse, param_dict, dT=0.25, kernel_type='GASFIR', ret_tgrid=False)[source]
Compute ionization rates for a defined pulse.
- Parameters:
t_grid (
ndarray[tuple[Any,...],dtype[float64]]) – Time grid for ionization momentspulse (
EllipticalCosNPulse) – EllipticalCosNPulse object defining the laser fieldparam_dict (
Dict[str,float]) – Dictionary containing kernel parametersdT (
float) – Time step for integration (default: 0.25)kernel_type (
str) – Type of kernel to use (“GASFIR” or “exact_SFA”)ret_tgrid (
bool) – Whether to return the time grid (default: False)
- Return type:
Union[ndarray[tuple[Any,...],dtype[float64]],Tuple[ndarray[tuple[Any,...],dtype[float64]],ndarray[tuple[Any,...],dtype[float64]]]]- Returns:
If
ret_tgridis False, an array of ionization rates at each time point. Ifret_tgridis True, a tuple(time_grid, rates).
Notes
The function handles various input formats for t_grid:
None: Uses laser field’s default time grid
pandas Series: Converts to numpy array
list: Converts to numpy array
numpy array: Used as is
- gasfir.kernels_circ.get_probability_quasi_static_limit(pulse, param_dict, dt=2.0)[source]
Calculate the quasi-static ionization probability.
- gasfir.kernels_circ.get_quasi_static_rate_for_field(field, param_dict)[source]
return the ionization rate for a define pulse computed with provided parameters :type field:
float|ndarray[tuple[Any,...],dtype[float64]] :param field: the grid of electric field strengths :type field: float64/np.ndarray :type param_dict:Dict[str,float] :param param_dict: dictionary defining the medium’s parameters- Returns:
the ionization rates for given array of electric field strengths
- Return type:
np.ndarray, shape=(field.size)