gasfir.pulse — pulse classes
- class gasfir.pulse.Pulse[source]
Bases:
ABC- get_central_wavelength()[source]
Get the central wavelength of the pulse.
- Return type:
- Returns:
Central wavelength in nm
- get_fft(omega=None, center_of_pulse=None)[source]
Get the Fourier transform of the pulse.
- Return type:
Union[ndarray[tuple[Any,...],dtype[float64]],Tuple[ndarray[tuple[Any,...],dtype[float64]],ndarray[tuple[Any,...],dtype[float64]]]]- Returns:
If
omegais None, a tuple(frequencies, amplitudes)in atomic units. Ifomegais an array, the amplitude at the given frequency(ies) in atomic units.
- get_intensity()[source]
Calculate the peak intensity of the pulse.
- Return type:
- Returns:
Peak intensity in W/cm^2
- get_keldysh_parameter(Ip)[source]
Calculate the Keldysh parameter γ for this pulse and ionization potential.
The Keldysh parameter separates the tunnel (γ ≪ 1) and multiphoton (γ ≫ 1) ionization regimes:
\[\gamma = \sqrt{\frac{I_p}{2 U_p}} = \frac{\omega_0 \sqrt{2 I_p}}{E_0}\]where \(U_p = E_0^2 / (4\omega_0^2)\) is the ponderomotive energy.
- Parameters:
Ip (
float) – Ionization potential in atomic units.- Return type:
- Returns:
Dimensionless Keldysh parameter. γ < 1 → tunnel ionization regime. γ > 1 → multiphoton ionization regime. γ ≈ 1 → intermediate regime.
Example
>>> laser = create_pulse(800, 1e14, 0, 30) >>> laser.get_keldysh_parameter(0.5) # hydrogen, ~0.5 a.u. IP 1.0...
- get_max_field_strength()[source]
Get the maximum electric field strength of the pulse.
- Return type:
- Returns:
Maximum electric field strength in atomic units
- get_ponderomotive_energy()[source]
Calculate ponderomotive energy.
- Return type:
- Returns:
Ponderomotive energy in atomic units
- class gasfir.pulse.CosNPulse(central_wavelength, peak_intensity, cep, FWHM, envelope_N=8, t0=0.0)[source]
Bases:
Pulse
- class gasfir.pulse.EllipticalCosNPulse(central_wavelength, peak_intensity, FWHM, cep, peak_intensity2=0.0, envelope_N=8, t0=0.0)[source]
Bases:
CosNPulse
- class gasfir.pulse.DataPulse(t, *, E=None, A=None, t0=0.0)[source]
Bases:
PulsePulse constructed from a user-supplied numerical field on a time grid.
Accepts either the electric field E(t) or the vector potential A(t) sampled on a uniform (or non-uniform) time grid in atomic units.
- Physical requirement:
A(t) must vanish at both ends of the time window (no net momentum kick). When E(t) is supplied, A is derived by integration
A(t) = −∫ E(t') dt'; the integration constant is chosen so that A = 0 at t = t[0], and the field should be essentially zero at both boundaries for this to be accurate.
All four cumulative-integral splines (∫A, ∫A², ∫E²) are precomputed once at construction time from the supplied data grid.
- Parameters:
t (
ndarray[tuple[Any,...],dtype[float64]]) – 1-D time array in atomic units, must be strictly increasing.E (
ndarray[tuple[Any,...],dtype[float64]] |None) – Electric field array E(t) in atomic units. Mutually exclusive withA.A (
ndarray[tuple[Any,...],dtype[float64]] |None) – Vector potential array A(t) in atomic units. E is derived asE(t) = −dA/dtvia the cubic-spline derivative. Mutually exclusive withE.t0 (
float) – Time offset (default 0).get_electric_field(t)evaluates att − t0.
- Raises:
ValueError – If neither or both of
EandAare given.
Example — from A(t):
t = np.linspace(-200, 200, 3200) A = sum_pulse.get_vector_potential(t) dp = DataPulse(t, A=A) prob = get_diabatic_ionization_probability(pulse=dp, param_dict=params)
Example — from E(t):
E = sum_pulse.get_electric_field(t) dp = DataPulse(t, E=E)
- class gasfir.pulse.TIPTOE(pump, probe)[source]
Bases:
objectTwo-pulse delay scanner for pump–probe TIPTOE spectroscopy.
Generates
SumOfPulsesobjects at arbitrary pump–probe delays and provides a Nyquist-sampled delay grid for scanning experiments.The pump pulse is held fixed; the probe is shifted in time by the requested delay using a lightweight
_DelayedPulsewrapper that adds no computational overhead beyond the underlying pulse’s own caching.- Parameters:
Example:
from gasfir import create_pulse from gasfir.pulse import TIPTOE pump = create_pulse(800, 3e14, 0, 6) probe = create_pulse(800, 1e13, 0, 2) # weak probe scanner = TIPTOE(pump, probe) # Scan over the Nyquist-sampled delay grid delays = scanner.return_delay_array() for tau in delays: field = scanner.at_delay(tau) prob = get_diabatic_ionization_probability(pulse=field, param_dict=params)
- at_delay(delay)[source]
Return a
SumOfPulseswith the probe delayed by delay a.u.- Parameters:
delay (
float) – Pump–probe delay in atomic units. Positive values place the probe after the pump; negative values place it before.- Return type:
SumOfPulses- Returns:
SumOfPulsesof the fixed pump and the shifted probe.
- return_delay_array(delay_min=None, delay_max=None, oversample=4)[source]
Nyquist-sampled delay grid covering the full pump–probe overlap region.
The sampling theorem requires at least 2 delay points per oscillation period of the highest-frequency field component. This method uses the maximum of the pump and probe carrier frequencies to set the step size:
Δτ = T₀ / oversample where T₀ = 2π / max(ω_pump, ω_probe)
The default range extends 1.5× beyond the point where the two pulses just touch (positive and negative), ensuring both fully-separated and fully-overlapping configurations are included.
- Parameters:
delay_min (
float|None) – Start of the delay range in atomic units.None(default) sets it to −1.5 × (pump_half_duration + probe_half_duration).delay_max (
float|None) – End of the delay range in atomic units.None(default) mirrorsdelay_min.oversample (
int) – Number of delay samples per optical cycle of the highest-frequency component (default 4 — 2× Nyquist margin). Use 8 or more for carrier-envelope resolved scans.
- Return type:
- Returns:
1-D NumPy array of delay values in atomic units.
Example:
delays = scanner.return_delay_array() # auto range delays = scanner.return_delay_array(-500, 500, oversample=8)