Skip to content
Kenneth Kusima edited this page Jan 25, 2026 · 32 revisions

This repository implements a rigorous quantitative analysis workflow for Temporal Analysis of Products (TAP) mass spectrometry data. TAP requires the conversion of time-resolved electrical signals (counts or Amps) into absolute molar flux ($\text{nmol} \cdot \text{s}^{-1}$). Because TAP experiments rely on the precise analysis of transient pulse shapes (moments analysis), maintaining strict mass balance is critical.


1. The Fundemental Equation

The fundamental equation used to transform the raw mass spectrometer signal $S(t)$ into molar flux $\Phi(t)$ is derived from the requirement that the integral of the signal must equal the known injected molar amount.

The master equation implemented in the code is:

$$ \Phi_X(t) = \underbrace{\left[ S_X(t) - B \right]}_{\text{Net Signal}} \times \underbrace{K_{pulse}}_{\text{Intensity-to-Flux Constant}} \times \underbrace{\alpha_X}_{\text{Calibration Factor}} $$

Nomenclature

Symbol Unit Description
$\Phi_X(t)$ $\text{nmol} \cdot \text{s}^{-1}$ Molar Flux of species $X$ leaving the reactor.
$S_X(t)$ $\text{counts}$ Raw Intensity signal from the mass spectrometer at time $t$.
$B$ $\text{counts}$ Baseline background signal (vacuum level) to be subtracted.
$K_{pulse}$ $\frac{\text{nmol} \cdot \text{s}^{-1}}{\text{counts}}$ Intensity-to-Flux Constant. A dynamic scalar derived from the inert tracer in the current pulse.
$\alpha_X$ Dimensionless Calibration Factor. A static scalar representing the relative detection efficiency of species $X$ vs. the inert reference.

2. Parameter Definitions & Derivation

A. Intensity-to-Flux Constant ($K_{pulse}$)

  • Code Variable: config['conv']
  • UI Label: Intensity -> Flux Conversion
  • Nature: Dynamic (Recalculated for every experiment across all pulses for each peak)

Purpose: This factor translates the MS signal recorded based on number of counts/intensity into molar flux units ($\text{nmol} \cdot \text{s}^{-1}$)

Derivation: It is calculated by integrating the signal of the co-pulsed inert tracer (e.g., Argon) where the injected amount is known.

$$ K_{pulse} = \frac{N_{Ar, injected}}{\int_{0}^{\infty} S_{Ar}(t) , dt} $$

** Implementation Note:** In multi-peak experiments (e.g., pump-probe), this value is defined separately for each peak (e.g., c_global_0, c_global_1).

B. Calibration Factor ($\alpha_X$)

  • Code Variable: calibration_factor
  • UI Label: Calibration Factor (AMU X)
  • Nature: Static (Determined separately, constant for each species [AMU])

Purpose: This is a material constant that corrects for the fact that the mass spectrometer is not equally sensitive to all molecules.

Derivation: This factor is determined in a separate external calibration experiment where a mixture of known composition with an inert (e.g., 50% Reactant / 50% Ar) is pulsed repeatedly.

$$ \alpha_X = \frac{Sensitivity_{X}}{Sensitivity_{Ar}} = \frac{K_{X}}{K_{Ar}} = \frac{\frac{N_{X, injected}}{\int_{0}^{\infty} S_{X}(t) , dt}}{\frac{N_{Ar, injected}}{\int_{0}^{\infty} S_{Ar}(t) , dt}}$$

Once determined, this value is "hard-coded" or entered once for the specific AMU and remains constant across all experiments involving that species.


3. Transport Analysis & Knudsen Criteria

See TAP Kinetics Paper

For TAP results to effectively isolate surface kinetic effects, the reactor must operate in the Knudsen Diffusion Regime, where transport is dominated by molecule-wall collisions rather than molecule-molecule collisions. The software automatically validates this regime by calculating the statistical moments of the pulses.

Key Transport Parameters

Parameter Symbol Unit Derivation Description
Zeroth Moment $M_0$ $\text{nmol}$ $\int_{0}^{\infty} \Phi(t) , dt$ The total moles of gas eluted during the pulse. Used to check mass balance closure against the injected amount.
Peak Height $F_{peak}$ $\text{nmol} \cdot \text{s}^{-1}$ $\max(\Phi(t))$ The maximum instantaneous rate of molecules leaving the reactor.
Peak Time $t_p$ $\text{s}$ $t(\Phi = F_{peak}) - t_{delay}$ The time elapsed between the pulse injection and the maximum flux detection.
Normalized Peak Height $H_p$ $\text{s}^{-1}$ $F_{peak} / M_0$ A shape factor indicating the sharpness of the pulse. Used to validate transport (inert) or assess reaction kinetics (reactive).

The Knudsen Criterion ($H_p \cdot t_p$)

The product of the normalized peak height and the peak time provides a dimensionless shape factor that characterizes the diffusion quality.

$$ \text{Knudsen Product} = H_p \times t_p $$

  • Target Range: $0.25 \le H_p \cdot t_p \le 0.35$
  • Interpretation: A value near 0.3 indicates ideal one-dimensional Knudsen diffusion. Deviations suggest problems such as channeling, dead volumes, or transition-regime flow.

4. Algorithm Implementation

Step 1: Baseline Subtraction

Before any scaling, the vacuum background must be removed. This is critical because even a small DC offset, when integrated over the long tail of a TAP pulse, will result in significant mass balance errors.

# Code Logic
corrected_raw = raw_vals - baseline_offset

Step 2: Piecewise Time-Domain Conversion

The code uses boolean masking to apply the specific $K_{pulse}$ and $\alpha_X$ to the correct time window.

# The Master Equation in Code
# eff_conv combines the machine state (conv) and chemical physics (calibration_factor)
eff_conv = config['conv'] * calibration_factor

# Apply conversion only to the specific time window (mask)
flux_column[mask] = corrected_raw[mask] * eff_conv

Step 3: Transport Validation Loop

After conversion, the software runs the validation check on the derived flux curve to ensure the experiment meets the criteria defined in Section 3.

# Code Logic: Validate Knudsen Criteria
Mo_avg = area_under_curve(t_list, f_list)
Hp_val = F_peak / Mo_avg
knudsen_product = Hp_val * t_p_val

if 0.25 <= knudsen_product <= 0.35:
    status = "✓ EXCELLENT"

Clone this wiki locally