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:

  1. GASFIR (General Approximator for Strong Field Ionization Rates)

  2. Exact SFA (Strong Field Approximation)

  3. 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 pulse

  • param_dict (Dict[str, float]) – Dictionary containing kernel parameters

  • dt (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_Rate is False, the total ionization probability (float). If ret_Rate is 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 moments

  • pulse (Pulse) – Pulse object defining the laser field

  • param_dict (Dict[str, float]) – Dictionary containing kernel parameters

  • dT (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_tgrid is False, an array of ionization rates at each time point. If ret_tgrid is 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.

Parameters:
  • pulse (Pulse) – Pulse object defining the laser field

  • param_dict (Dict[str, float]) – Dictionary containing the parameters

  • dt (float) – Time step for integration

Return type:

float

Returns:

Ionization probability as a float

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 calculation

  • pulse (Pulse) – Pulse object defining the laser field

  • param_dict (Dict[str, float]) – Dictionary containing the parameters

  • type – 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:

ndarray[tuple[Any, ...], dtype[float64]]

Returns:

Array of ionization rates at each time point

gasfir.kernels.precompute_pulse_batch(pulse_list, dt_val=4.0, dT_val=0.25)[source]

Strips the raw NumPy arrays out of Python Pulse objects and packs them into Numba-compatible typed Lists for zero-overhead C-level processing.

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 pulse

  • param_dict (Dict[str, float]) – Dictionary containing kernel parameters

  • dt (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_Rate is False, the total ionization probability (float). If ret_Rate is 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 moments

  • pulse (EllipticalCosNPulse) – EllipticalCosNPulse object defining the laser field

  • param_dict (Dict[str, float]) – Dictionary containing kernel parameters

  • dT (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_tgrid is False, an array of ionization rates at each time point. If ret_tgrid is 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.

Parameters:
  • pulse (EllipticalCosNPulse) – EllipticalCosNPulse object defining the laser field

  • param_dict (Dict[str, float]) – Dictionary containing the parameters

  • dt (float) – Time step for integration

Return type:

float

Returns:

Ionization probability as a float

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)

gasfir.kernels_circ.get_rate_quasi_static_limit(t_grid, pulse, param_dict)[source]

Calculate the quasi-static ionization rate.

Parameters:
Return type:

ndarray[tuple[Any, ...], dtype[float64]]

Returns:

Array of ionization rates at each time point