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

Methodology: Calibration and Data Conversion

This repository implements a rigorous quantitative analysis workflow for Temporal Analysis of Products (TAP) mass spectrometry data. Unlike standard MS analysis which often relies on relative intensity, TAP requires the conversion of time-resolved electrical signals (counts/amps) into absolute molar flux ($\text{nmol} \cdot \text{s}^{-1}$).

The conversion logic is based on the principle of using an inert internal standard (e.g., Argon) to normalize machine drift, combined with a species-specific calibration factor to account for ionization physics.

1. The Physical Model

The fundamental equation used to transform the raw mass spectrometer signal $S(t)$ into molar flux $\Phi(t)$ is:

$$ \Phi_X(t) = [S_X(t) - B] \times \underbrace{K_{pulse}}_{\text{Machine State}} \times \underbrace{\alpha_X}_{\text{Chemical Identity}} $$

Where:

  • $\Phi_X(t)$: Molar flux of species $X$ leaving the reactor ($\text{nmol} \cdot \text{s}^{-1}$).
  • $S_X(t)$: Raw MS intensity signal at time $t$ (Arbitrary Units).
  • $B$: Baseline background signal (vacuum level).
  • $K_{pulse}$: The pulse-specific Intensity-to-Flux Constant derived from the inert tracer.
  • $\alpha_X$: The species-specific Calibration Factor (Relative Sensitivity).

2. Parameter Definitions

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

  • Code Variable: config['conv'] (User Input: Intensity -> Flux Conversion)
  • Source: Calculated from the inert tracer (Argon) present in the current pulse.
  • Definition: This factor represents the instantaneous sensitivity of the mass spectrometer for the reference gas. It compensates for day-to-day variations in detector gain, vacuum pressure, and valve performance.

$$ K_{pulse} = \frac{\text{Known Moles of Ar Injected}}{\int S_{Ar}(t) , dt} $$

  • Application: In pump-probe experiments or multi-pulse sequences, this value is defined separately for each peak (e.g., c_global_0, c_global_1) to account for drift or different loop volumes between pulses.

B. Calibration Factor ($\alpha_X$)

  • Code Variable: calibration_factor (User Input: Calibration Factor)
  • Source: Determined offline via separate calibration experiments.
  • Definition: This is a dimensionless scalar that accounts for the relative difference in detection efficiency between the reactant $X$ and the inert reference $Ar$. It encapsulates the physics of ionization cross-section ($\sigma$), transmission efficiency ($T$), and fragmentation probability ($f$).

$$ \alpha_X = \frac{\sigma_{Ar} \cdot T_{Ar}}{\sigma_X \cdot T_X} $$

  • Application: Since ionization physics are invariant, this value is determined once (by averaging many pulses of a known mixture) and entered as a static constant for the specific AMU being analyzed.

3. Algorithm Implementation

The software processes the .tdms data through a strict pipeline to ensure mass balance conservation:

  1. Baseline Subtraction: The background signal is removed to prevent the integration of vacuum noise into molar mass.

    corrected_raw = raw_vals - baseline_offset
  2. Piecewise Conversion: To handle complex pulse sequences (e.g., pump-probe), the code applies the conversion factors using time-domain masking. This allows different conversion logic to be applied to different parts of the transient response.

    # Effective Conversion Factor combining machine state and chemical physics
    eff_conv = config['conv'] * calibration_factor
    
    # Apply to specific time window
    flux_column[mask] = corrected_raw[mask] * eff_conv
  3. Integration & Validation: The resulting flux curve $\Phi(t)$ is integrated to calculate the zeroth moment ($M_0$), representing the total moles eluted. This value is used to validate the transport regime via the Knudsen criterion ($H_p \cdot t_p \approx 0.3$) defined in standard TAP literature.

Clone this wiki locally