Skip to content

Methods and checksMethods

How every result is reached and what it was checked against, app by app.

Methods and checks pages

Mass error of an observed m/z or mass, version 1.0.1

mass-error@1.0.1: this version's equations with their symbols, each constant's value, their sources and whether each was read, a worked example where the record holds one, its level and what it was checked against, the number of cases, and what was not checked. This version's record is not rewritten; a correction is added under Changes.

What this page can and cannot show

Level: Checked against a reference; VIM 2.16 read; pyOpenMS 3.6.0 getPPM on every computed case; error is observed minus theoretical. Research arithmetic. Reference kind: our own exact-arithmetic script and a hand-worked case.

Checked by this project, not independently reviewed. Every method on this page has its equations, constants, sources and cases on record, and its cases agree with the stated reference within the stated tolerance. A reader can follow each method's worked example by hand; that shows the stated method gives the stated answer for one set of inputs, and does not test the code. The other cases and their values are not printed, so a reader cannot re-run these checks. No independent scientist has yet reviewed them.

Every version of this method · Every method · What the levels mean

Version 1.0.1

Level: Checked against a reference; VIM 2.16 read; pyOpenMS 3.6.0 getPPM on every computed case; error is observed minus theoretical. Research arithmetic. Reference kind: our own exact-arithmetic script and a hand-worked case. mass-error@1.0.1

Built, not hosted. Generated from a snapshot of the library's records taken on 2026-11-25, as committed on 2026-11-25. A later snapshot replaces this one, so these records and this page can change.

Verification statement: Difference as observed minus theoretical, the measurement error of VIM 2.16; error as that difference over the theoretical value in millionths of the theoretical value, a standard definition. Every output compared with a second implementation in Python by a separate agent of the same model family (33 cases, 20 at the edges); pyOpenMS 3.6.0 Math.getPPM on all 13 computed cases. Computed in doubles, within the bound in the reporting rule. Research arithmetic.

The difference between an observed and a theoretical m/z (or mass), and that difference in millionths of the theoretical value of the theoretical value.

  • How results are reported: Each number in the call arrives as a double and is read as the exact rational value of the shortest decimal that converts back to that double (the decimal JavaScript's Number-to-String gives: 0.7 is read as 7/10, not as the double's binary value; −0 is read as 0). Every range end and refusal at a bound is decided exactly on those rationals. Each mass is converted to Da on its own (kDa × 1000 in double arithmetic, one rounding); a pair may mix Da and kDa; the difference is in Da. The engine computes each reported number in double arithmetic; against the exact result on the shortest decimals it agrees within relative 1e-12, or within absolute 2^-50 × max(|observed|, |theoretical|) on the difference (in Th or Da after conversion) and that bound over |theoretical| × 10^6 on the error, whichever is larger. Checks run in this order: each value above zero (OUT_OF_RANGE, the kit's bound), then NEEDS_ONE_PAIR; a difference or error that is not zero but lies outside the normal range of a double refuses the whole call as RESULT_OUTSIDE_DOUBLE_RANGE. Worked steps print at most eight significant figures of the stored value; those strings are display only.
  • Uncertainty: Arithmetic on the two stated values; their own uncertainties are the caller's.
  • Reference, as its record states it: pyOpenMS 3.6.0 Math.getPPM on every computed case; a second implementation in Python by a separate agent of the same model family
  • Level confirmed by this project's ruling of 14 November 2026

What this page can and cannot show

What was checked

46 cases in 3 files, linked by this exact version.

Run through the tool at build against our own exact-arithmetic script and a hand-worked case: 32 agree within the tolerance the file states, 14 refuse as the case expects, 0 differ, 0 were not run.

  • File 1, 11 cases

    • Where the expected values came from: our own exact-arithmetic script and a hand-worked case
    • Recorded on: 2026-11-10
    • Reference: exact decimal script (Python decimal), 3.13.18; licence PSF-2.0
    • Tolerance as the file states it: difference absolute 1e-9 in Th or Da; error absolute 1e-7 in uTh/Th or uDa/Da (parts per million); statuses, codes and units exact
  • File 2, 2 cases

    • Where the expected values came from: our own exact-arithmetic script and a hand-worked case
    • Recorded on: 2026-11-11
    • Reference: exact decimal script (Python decimal), 3.13.18; licence PSF-2.0
    • Tolerance as the file states it: difference absolute 1e-9 in Th or Da; error absolute 1e-7 in uTh/Th or uDa/Da (parts per million); statuses, codes and units exact
  • File 3, 33 cases

    • Where the expected values came from: our own exact-arithmetic script and a hand-worked case
    • Recorded on: 2026-11-14
    • Reference: second implementation (Python 3.13), 2026-11-14; licence BSD-3-Clause
    • Tolerance as the file states it: every number relative 1e-12 (absolute 1e-15 below 1e-3, in each value's unit); counts, labels, formulas, strings, flags, statuses and codes exact

Apart from the worked example, the cases and their values are not printed here. This shows agreement with this project's recorded cases. It does not show that a method suits your work, and it is not a qualification.

What was not checked

One session wrote the first script and the engine; the division by the theoretical value is a standard definition; no mass-spectrometry source for it was read (Brenton and Godfrey 2010 behind a login on 14 November 2026; Zubarev and Mann 2007 not read).

Definition or model

A closed form: the result follows from the inputs by the equations alone.

Equations

Equation 1

difference = observed - theoretical
error = (observed - theoretical) / theoretical x 10^6
Symbol Meaning and unit
observed m/z an observed mass-to-charge ratio, Th
theoretical m/z the theoretical mass-to-charge ratio, Th
observed mass an observed mass, Da
theoretical mass the theoretical mass, Da
difference observed less theoretical, in the pair's unit (Th here; Da for a mass pair), Th
error the difference over the theoretical value in millionths of it, uTh/Th (uDa/Da for a mass pair); numerically the figure often written 'ppm'; IUPAC 2013 deprecates it ('parts per thousand (ppt) or parts per million (ppm), both of which are deprecated', p. 1518; entry isotope delta, Note 4, 'Units of parts per thousand (ppt, 10–3) or parts per million (ppm, 10–6) are deprecated', p. 1585), so the unit is written uTh/Th or uDa/Da, uTh/Th

Source: JCGM 200:2012. International vocabulary of metrology: basic and general concepts and associated terms (VIM), 3rd edition, 2008 version with minor corrections, p. 22, section entry 2.16, measurement error: measured quantity value minus a reference quantity value, JCGM 200:2012 (E/F), as BIPM serves it; read in full on 2026-11-14 by an AI-assisted session; not yet checked by a person. Read from the file itself, SHA-256 beginning 8a603e99d236. Free to read (free to download from BIPM; © JCGM), checked 2026-11-14. No erratum found (searched the BIPM VIM page and its listed documents), 2026-11-14.

Equation 2

observed is the measured value and theoretical the calculated one
the error is positive when the measured value is the higher
Symbol Meaning and unit
observed the measured m/z or mass, Th
theoretical the calculated m/z or mass, Th

Source: Murray KK, Boyd RK, Eberlin MN, Langley GJ, Li L, Naito Y. Definitions of terms relating to mass spectrometry (IUPAC Recommendations 2013). Pure Appl Chem 2013;85:1515-1609, p. 1519, section entry 6, Note 2: one term refers to a measured mass, exact mass to a calculated mass, version of record, read from a mirror copy (research.cbc.osu.edu) whose title page matches the DOI, not from the publisher's host; read in full on 2026-11-14 by an AI-assisted session; not yet checked by a person. Read from the file itself, SHA-256 beginning 33f26ca2d82e. Free to read (free to read (IUPAC Recommendations); © IUPAC), checked 2026-11-11. No erratum found (searched web search: the title with erratum, the DOI landing page's listing, as search results show it), 2026-11-11.

Constants

Constants: none used.

Worked example

Worked example: one case of mass-error@1.0.1, from its inputs through each step to the answer. Values are written as a person writes them; the working carries more digits, so your own figure may differ in the last digit shown.

Inputs

  • observedMz = 195.088042 Th
  • theoreticalMz = 195.087652 Th

Steps

  1. difference = 0.00039 Th, from observedMz, theoreticalMz; by equation 1; gives difference.
  2. error = 1.9991014 uTh/Th, from difference, theoreticalMz; by equation 1; gives error.

The working, as the case writes it:

(195.088042 - 195.087652) / 195.087652 x 10^6 = 0.00039 / 195.087652 x 10^6 = 1.99910 ppm

Answer

  • difference = 0.00039 Th
  • error = 1.9991014 uTh/Th

Where these values came from: our own exact-arithmetic script and a hand-worked case; exact decimal, this script.

At build the tool returned this answer within the tolerance the file states: difference absolute 1e-9 in Th or Da; error absolute 1e-7 in uTh/Th or uDa/Da (parts per million); statuses, codes and units exact.

Who worked this case: not recorded.

What it refuses, and its input ranges

  • NEEDS_ONE_PAIR: not exactly one complete pair: an observed and a theoretical m/z, or an observed and a theoretical mass (an m/z is not a mass unless the charge is known) Next: Give exactly one pair: an observed and a theoretical m/z, or an observed and a theoretical mass.

Changes

2026-11-14-mass-error@1.0.1-1

2026-11-14 · mass-error@1.0.1 · Corrections to our methods

  • What was wrong: An error beyond the double range made the tool throw: an observed m/z of 1e300 Th against a theoretical 1e-300 Th gave an error that is not a finite number, and the call failed internally instead of giving a refusal.
  • Affected: Calls in version 1.0.0 whose difference or ppm error lies outside the normal range of a double, in the assistant tool ms_mass_error. Every other call was unaffected.
  • What changed: In 1.0.1 such a call is refused whole as RESULT_OUTSIDE_DOUBLE_RANGE, naming the quantity. No published case's number moved.
  • How it was found: A second implementation in Python by a separate agent of the same model family, in the raising run's full check of 14 November 2026 (finding MS-F16); the CSO's M7.
  • Cases added: None yet: the case enters with the fixture from a fresh agent's program (the CSO's M8 and S29).

Tools that use it

Cite this version

Mass error of an observed m/z or mass. Drybench; mass-error@1.0.1; https://www.drybench.com/methods/m/mass-error/1.0.1 (accessed [date]).