Buffer subtraction

Purpose. Solute scattering is Isamples·Ibuffer. The hard part is choosing the scale s so that solvent / capillary contributions cancel while the solute signal remains. Visually, sample and scaled buffer should match in the high-q “tail”, especially past the Porod region / before a detector “knee”.

What autosaxs does (custom) — default point_match.

  1. Restrict both curves to a user window [qmin, qmax] (liveview: q min / q max in Set buffer). Prefer a high-q band where both curves follow a simple form, ending just before any sharp knee.
  2. Fit sample and buffer intensities in that window to analytic forms (default: sample Porod + linear, buffer linear; alternatives: Porod or linear alone).
  3. Set the scale so that at qmax: 0.995 · I_sample_fit(q_max) = s · I_buffer_fit(q_max) (the factor 0.995 keeps the buffer slightly below the sample tail by default).
  4. Write Isub = Isamples·Ibuffer with propagated errors. Flag over-subtracted if any point has Isubsub < 0.

A fixed scaling factor (Subtraction wizard) overrides automatic scaling. Legacy match_tail exists but is not the recommended default.

Engines. Fully custom (no ATSAS).