[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CTR4W9PRRRT53D0SMDE5J7":3,"skill-same:01M7CTR4W9PRRRT53D0SMDE5J7":103},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M7CTR4W9PRRRT53D0SMDE5J7","uncertainty-and-units",null,"Track physical units and propagate measurement uncertainty in scientific calculations using pint and uncertainties. Use for unit conversion and dimensional checking, GUM uncertainty budgets, Type A and Type B evaluation, coverage factors and expanded uncertainty, Monte Carlo propagation, significant-figure and plus-minus reporting, error propagation through curve fits, CODATA constants, auditing Python code for stripped units or broken uncertainty propagation, and order-of-magnitude plausibility checks using dimensionless groups (Reynolds, Peclet, Damkohler, Knudsen, Biot, Womersley), characteristic scales such as diffusion time or Debye length, and observed magnitude ranges. Trigger on \"is this number physically reasonable\", \"sanity check these units\", \"what regime is this flow in\", or a result that looks off by orders of magnitude.","mrsonord2240\u002Fopenscience-specialists","mrsonord2240","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F76487430?v=4","01M7CTEM40S43GSJZ9A3YCCXZK","Samuel Nord","01M7CTEM4K69JD1GBYNHVJ9ZP4",2,"MIT","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Funcertainty-and-units\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: uncertainty-and-units\ndescription: Track physical units and propagate measurement uncertainty in scientific calculations using pint and uncertainties. Use for unit conversion and dimensional checking, GUM uncertainty budgets, Type A and Type B evaluation, coverage factors and expanded uncertainty, Monte Carlo propagation, significant-figure and plus-minus reporting, error propagation through curve fits, CODATA constants, auditing Python code for stripped units or broken uncertainty propagation, and order-of-magnitude plausibility checks using dimensionless groups (Reynolds, Peclet, Damkohler, Knudsen, Biot, Womersley), characteristic scales such as diffusion time or Debye length, and observed magnitude ranges. Trigger on \"is this number physically reasonable\", \"sanity check these units\", \"what regime is this flow in\", or a result that looks off by orders of magnitude.\nlicense: MIT\nmetadata:\n  version: \"1.0.0\"\n---\n\n\n\n# Uncertainty and units\n\n## Scope\n\nUse this skill whenever a calculation carries physical units or a reported number needs\nan uncertainty. Concretely:\n\n- converting between units, including conversions that need a physical context\n  (wavelength to photon energy, mass to amount of substance, energy to temperature);\n- propagating uncertainty through a measurement model, with or without correlated inputs;\n- building a GUM uncertainty budget from calibration certificates, specifications, and\n  repeatability data;\n- choosing a coverage factor and deciding whether `k = 2` is defensible;\n- rounding and writing a result so a reader knows what the `±` means;\n- extracting parameter uncertainties from a curve fit without discarding correlations;\n- reviewing existing analysis code for silent unit and uncertainty defects;\n- checking that a dimensionally consistent answer is also physically possible — the\n  order of magnitude, the dimensionless group, and the regime it implies.\n\nThis skill covers the metrology and the two libraries that implement it. It does not\ncover statistical inference, model selection, or study design — see `statistical-analysis`,\n`statistical-power`, and `experimental-design`.\n\n## Current release and installation\n\nVerified 2026-07-26:\n\n- **pint 0.25.3**, released 2026-03-19; requires Python 3.11+.\n- **uncertainties 3.2.3**, released 2025-04-21; requires Python 3.8+.\n- **NumPy 2.5.1** and **SciPy 1.18.0**; both require Python 3.12+.\n- `scipy.constants` in SciPy 1.18.0 serves **CODATA 2022**. SciPy 1.11 and earlier\n  served CODATA 2018, and several recommended values differ between them.\n\n```bash\nuv venv --python 3.13\nsource .venv\u002Fbin\u002Factivate\nuv pip install \"pint==0.25.3\" \"uncertainties==3.2.3\" \"numpy==2.5.1\" \"scipy==1.18.0\"\n```\n\n`pint-pandas` and `pint-xarray` add unit-aware columns and arrays and are separate\ninstalls.\n\n## Non-negotiable workflow\n\n1. **Attach units at input and strip them only at output.** Convert at function\n   boundaries with `ureg.wraps` or `m_as(\"unit\")`, never mid-calculation.\n2. **Write the measurement model explicitly** before computing anything, including\n   corrections whose estimated value is zero. A correction left out of the model leaves\n   its uncertainty out of the budget.\n3. **Give every input four things**: an estimate, a standard uncertainty, the\n   distribution the uncertainty came from, and its degrees of freedom.\n4. **Convert Type B statements with the right divisor.** A certificate's expanded\n   uncertainty divides by its stated `k`; rectangular limits divide by `sqrt(3)`.\n5. **Identify correlations before combining.** Inputs calibrated against the same\n   standard, measured on the same instrument, or drawn from the same fit are correlated.\n6. **Compute sensitivity coefficients**, and read the budget from `c_i * u(x_i)` rather\n   than from the raw uncertainties.\n7. **Check the linearization.** Run Monte Carlo alongside the GUM framework and apply\n   the JCGM 101 clause 8 comparison. Report the Monte Carlo result when it fails.\n8. **Choose `k` from the effective degrees of freedom**, not by habit.\n9. **Round the uncertainty first, then the value to the same decimal place.**\n10. **State what the `±` is** — standard or expanded, with `k`, the coverage probability,\n    and the method.\n11. **Sanity-check the magnitude before reporting.** A dimensionally consistent result can\n    still be impossible. Compare it against a known scale or a dimensionless group, and\n    confirm every assumption you relied on still holds in that regime.\n\n## The failures this skill exists to prevent\n\nEach of the following runs without error and produces a plausible number.\n\n### A unit stripped at an unknown scale\n\n```python\nlength = (12.7 * ureg.mm).magnitude          # 12.7 -- of what?\nlength = (12.7 * ureg.mm).m_as(\"m\")          # 0.0127 metres, stated\n```\n\n`.magnitude` returns whatever the quantity happened to be carrying. Name the unit at the\npoint of extraction, every time.\n\n### Offset temperature arithmetic\n\n```python\nQ(20, \"degC\") + Q(5, \"degC\")     # OffsetUnitCalculusError -- correctly refused\nQ(20, \"degC\") + Q(5, \"delta_degC\")   # 25 degree_Celsius\nQ(25, \"degC\") - Q(20, \"degC\")        # 5 delta_degree_Celsius\n```\n\nCelsius and Fahrenheit are interval scales. An uncertainty on a temperature is always a\ndifference and belongs in a `delta_` unit: converting `20 ± 0.5 degC` to Fahrenheit\ngives `68 degF ± 0.9 delta_degF`, two different conversions on one line.\n\n### Logarithmic units that add by multiplying\n\n```python\nQ(10, \"dBm\") + Q(10, \"dBm\")   # 0.0001 kilogram**2 * meter**4 \u002F second**6\n```\n\nThat is 10 mW × 10 mW, not 20 mW and not 13 dBm. Nothing raises. Convert to a linear\nunit before any arithmetic.\n\n### A correlation destroyed by a round trip\n\n```python\nx = ufloat(1.0, 0.1)\nx - x                                     # 0.0+\u002F-0\nx - ufloat(x.nominal_value, x.std_dev)    # 0.00+\u002F-0.14\n```\n\nRebuilding a variable from its nominal value and standard deviation creates an\nindependent variable. So does any serialization that passes through a pair of floats.\nUse `correlated_values(values, covariance_matrix)` to rebuild a correlated set.\n\n### A covariance matrix silently rescaled\n\n```python\npopt, pcov = curve_fit(f, x, y, sigma=sigma)                        # default\npopt, pcov = curve_fit(f, x, y, sigma=sigma, absolute_sigma=True)\n```\n\nThe default rescales `pcov` by the reduced chi-square, so the parameter uncertainties\nabsorb the goodness of fit and match what you would get by passing no `sigma` at all. On\none synthetic straight-line fit the two give `[0.0364, 0.2154]` and `[0.0477, 0.2820]` —\na 31% difference. Pass `absolute_sigma=True` whenever `sigma` holds real standard\nuncertainties.\n\n### A linearization that was never checked\n\nFor `y = x²` with `x = 1.0 ± 0.5`, the GUM framework gives `y = 1.0`, `u_c = 1.0`, and a\n95% interval of `[-0.96, 2.96]` — mostly negative, for a squared quantity. Monte Carlo\ngives a mean of 1.25, `u_c = 1.06`, and a shortest 95% interval of `[0, 3.32]`. Nothing\nin a linear-propagation library will tell you this happened.\n\n## Bundled local CLIs\n\nAll helpers run offline, reject URLs and symlinks, bound their inputs, write output\natomically with private permissions, and refuse to overwrite without `--force`.\n\n```bash\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Fpropagate_uncertainty.py --help\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Funcertainty_budget.py --help\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Fformat_result.py --help\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Fconvert_units.py --help\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Faudit_units.py --help\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Fcheck_plausibility.py --help\n```\n\n### propagate_uncertainty.py\n\nRuns both propagation methods on the same model and applies the JCGM 101 clause 8\nvalidation test.\n\n```bash\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Fpropagate_uncertainty.py \\\n  --expression \"m \u002F (pi * (d \u002F 2) ** 2 * h)\" \\\n  --variable \"m=250.0,0.05\" \\\n  --variable \"d=20.0,0.02,rectangular\" \\\n  --variable \"h=40.0,0.05,rectangular\" \\\n  --measurand density --unit \"g\u002Fcm3\" --format markdown\n```\n\nEach `--variable` is `name=value,standard_uncertainty[,distribution[,dof]]`, where the\ndistribution is `normal`, `rectangular`, `triangular`, `arcsine`, or `exact` and controls\nMonte Carlo sampling only. Correlations go in as `--correlation \"a,b=0.9\"`. A JSON\n`--spec` file holds the same model for anything long-lived.\n\nThe expression is parsed into an abstract syntax tree and reduced by an explicit walk\nover `+ - * \u002F **` and a fixed list of functions. It is never compiled or executed.\n\nThe report gives the estimate, `u_c`, sensitivity coefficients, the budget in percent,\neffective degrees of freedom, `k`, `U`, both Monte Carlo coverage intervals, and the\nverdict on whether the linearized result may be reported.\n\n### uncertainty_budget.py\n\nCombines components stated the way certificates and data sheets state them.\n\n```bash\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Funcertainty_budget.py --template > budget.json\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Funcertainty_budget.py --spec budget.json --format markdown\n```\n\nEach component names a `distribution` that fixes its divisor — `expanded` divides by its\n`coverage_factor`, `rectangular` by `sqrt(3)`, `triangular` by `sqrt(6)`, `arcsine` by\n`sqrt(2)`, `normal` by 1 — with an optional `sensitivity`, `dof`, and `relative: true`.\nThe tool computes `u_c`, the Welch-Satterthwaite effective degrees of freedom, `k` from\nthe t-distribution, and `U`, and warns when a Type A component has no degrees of\nfreedom, when `nu_eff` is small enough that `k = 2` is wrong, when one component\ndominates, and when a Type B component declared `normal` is probably an undivided\nexpanded uncertainty.\n\n### format_result.py\n\n```bash\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Fformat_result.py \\\n  --value 12.34567 --uncertainty 0.02345 --unit mm \\\n  --coverage-factor 2.26 --coverage-probability 0.95\n```\n\nReturns `12.346 ± 0.023 mm`, `12.346(23) mm`, the scientific and LaTeX forms, and the\nsentence that has to accompany the number. Warns when one significant digit is requested\nfor an uncertainty beginning in 1 or 2, and when the uncertainty exceeds the estimate.\n\n### convert_units.py\n\n```bash\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Fconvert_units.py \\\n  --value 532 --unit nm --to eV --context spectroscopy --uncertainty 0.5\n\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Fconvert_units.py \\\n  --value 1.0 --unit g --to mol --context chemistry --context-parameter \"mw=180.156 g\u002Fmol\"\n```\n\nCarries the uncertainty through the conversion's local derivative, which matters because\ncontext conversions are reciprocal rather than proportional. Names the context in the\nerror message when a conversion needs one, and flags offset and logarithmic units.\n`--list-contexts` shows what the registry defines.\n\n### audit_units.py\n\nStatic review of existing analysis code. Parses, never imports or runs.\n\n```bash\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Faudit_units.py \\\n  --input analysis.py --format markdown --fail-on medium\n```\n\n| Rule | Severity | Detects |\n| --- | --- | --- |\n| `UNIT001` | medium | a second `UnitRegistry` in one module — cross-registry `ValueError` |\n| `UNIT002` | medium | offset temperature units with no `delta_` unit anywhere |\n| `UNIT003` | high | `.magnitude` without a preceding `.to(...)` or `.m_as(...)` |\n| `UNIT004` | medium | logarithmic units, whose `+` multiplies |\n| `UNC001` | high | `curve_fit` without `absolute_sigma` |\n| `UNC002` | medium | `np.std` \u002F `np.var` without `ddof` |\n| `UNC003` | medium | `math` or `numpy` functions in a module that uses `uncertainties` |\n| `UNC004` | high | a `ufloat` rebuilt from `.nominal_value` and `.std_dev` |\n| `CONST001` | low | a literal within 0.1% of a CODATA constant |\n\nExit status is 1 when a finding meets `--fail-on` (default `high`), which makes it usable\nas a pre-commit or CI check.\n\nThe rules are heuristics, so a false positive is suppressed with a directive comment —\ntrailing to cover its own line, or alone on a line to cover the next one:\n\n```python\nvalue = quantity.magnitude  # audit-units: ignore UNIT003 -- already converted upstream\n\n# audit-units: ignore UNC003 -- the argument here is a plain float array\nscaled = np.log10(counts)\n```\n\n`# audit-units: ignore-file CONST001` covers a whole module, and naming no rule\nsuppresses all of them. Suppressions are counted in the report rather than hidden, so a\nfile that silences everything still says so.\n\n### check_plausibility.py\n\nDimensional consistency is not physical possibility. A cell 2 m across and a Reynolds\nnumber of 4e7 in a capillary both pass every unit check. This tool tests a set of\nquantities against dimensionless groups, characteristic scales, and curated magnitude\nbands, and verifies each formula's dimensionality before reporting a number.\n\n```bash\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Fcheck_plausibility.py \\\n  --quantity \"density=1060 kg\u002Fm**3\" --quantity \"velocity=0.5 mm\u002Fs\" \\\n  --quantity \"length=8 um\" --quantity \"viscosity=3.5 mPa*s\" \\\n  --group reynolds --format markdown\n# Re = 0.001211 -- laminar (circular pipe, length = diameter)\n\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Fcheck_plausibility.py \\\n  --quantity \"diameter=2 m\" --band \"eukaryotic_cell_diameter=diameter\"\n# implausible: 4.3 decades outside the 5-100 um range\n```\n\n`--group` evaluates one of 14 dimensionless groups and names the regime it places the\nsystem in; `--scale` computes a characteristic scale such as a diffusion time, Debye\nlength, or Stokes settling velocity; `--band` compares a supplied quantity against an\nobserved range. `--list` prints the whole catalogue with the inputs each formula needs.\n\nPhysical constants (`k_B`, `N_A`, `R_gas`, `g_earth`, and the rest) are available to every\nformula without being supplied, and are read from `scipy.constants` at run time rather\nthan written as literals, so they track the CODATA release SciPy ships.\n\nThe dimensionality check is the point. Passing a kinematic viscosity where the formula\nneeds a dynamic one — both called \"viscosity\", both tabulated for water, differing by a\nfactor of ρ — is refused before any number is computed:\n\n```\nerror: viscosity must have dimensionality [mass] \u002F ([length] * [time]),\n       but m²\u002Fs is [length] ** 2 \u002F [time]\n```\n\nExit status is 1 when the verdict meets `--fail-on` (default `implausible`; a value\nwithin one decade of a band is `questionable`). The thresholds are conventions with soft\nedges and assume the geometry their correlation was fitted for — see\n`references\u002Fplausibility-scales.md` for the characteristic length to use in each case.\n\n## Choosing a propagation method\n\n| Situation | Method |\n| --- | --- |\n| Linear or near-linear model, normal-ish inputs, large dof | GUM framework alone |\n| Any nonlinearity across ±2u of an input | run both, apply the clause 8 test |\n| Relative uncertainty above ~20% on any input | Monte Carlo |\n| Dominant rectangular or otherwise non-normal component | Monte Carlo |\n| Output bounded below (variance, concentration, squared quantity) | Monte Carlo |\n| Asymmetric output distribution | Monte Carlo, shortest coverage interval |\n| Correlated inputs | either, but supply the covariance matrix, not the standard uncertainties alone |\n\nA model dominated by rectangular contributions fails the clause 8 test even when it is\nperfectly linear: the framework's `k = 1.96` over-covers a nearly trapezoidal output.\nThe estimate and `u_c` are still right; only the interval is too wide.\n\n## Constants\n\nNever type a constant from memory. The 2019 SI redefinition fixed `c`, `h`, `e`, `k`,\nand `N_A` exactly, so their relative standard uncertainty is zero; everything else is a\nmeasured value that moves between CODATA releases.\n\n```python\nimport scipy.constants as constants\n\nconstants.value(\"electron mass\")        # 9.1093837139e-31\nconstants.unit(\"electron mass\")         # kg\nconstants.precision(\"electron mass\")    # 3.07e-10, relative standard uncertainty\nconstants.precision(\"Planck constant\")  # 0.0, exact by definition\n```\n\n`precision` returns a *relative* standard uncertainty; multiply by the value for the\nabsolute one.\n\n## Reference files\n\n- `references\u002Fgum-methodology.md` — Type A and Type B evaluation, distribution divisors,\n  the law of propagation, Welch-Satterthwaite, when the framework fails, the Monte Carlo\n  procedure, and the clause 8 validation test.\n- `references\u002Fpint-recipes.md` — registries, offset and logarithmic units, contexts,\n  boundary enforcement with `wraps` and `check`, NumPy interoperability, custom units,\n  formatting.\n- `references\u002Funcertainties-recipes.md` — variable identity and correlation,\n  `correlated_values`, `umath` and `unumpy`, format specs, fit covariance matrices, and\n  the package's limits.\n- `references\u002Fdomain-conversions.md` — the energy ladder, spectroscopy, concentration,\n  pressure, radiation and magnetism, mass spectrometry, logarithmic quantities, and the\n  pairs that share dimensions without sharing meaning.\n- `references\u002Freporting-rules.md` — rounding, notations, the sentence that must\n  accompany a result, SD versus SEM versus CI in figures, non-detects, and conformity\n  decision rules.\n- `references\u002Fplausibility-scales.md` — choosing the characteristic length, the\n  dimensionless groups and the modelling assumption each one gates, characteristic\n  scales, the observed magnitude bands and their sources, and the caveats on every\n  threshold.\n\n## Dated sources\n\nChecked 2026-07-26:\n\n- [JCGM 100:2008, Evaluation of measurement data — Guide to the expression of\n  uncertainty in measurement](https:\u002F\u002Fwww.bipm.org\u002Fdocuments\u002F20126\u002F2071204\u002FJCGM_100_2008_E.pdf)\n- [JCGM 101:2008, Supplement 1 — Propagation of distributions using a Monte Carlo\n  method](https:\u002F\u002Fwww.bipm.org\u002Fdocuments\u002F20126\u002F2071204\u002FJCGM_101_2008_E.pdf)\n- [NIST Technical Note 1297](https:\u002F\u002Fnvlpubs.nist.gov\u002Fnistpubs\u002FLegacy\u002FTN\u002Fnbstechnicalnote1297.pdf)\n- [CODATA internationally recommended values](https:\u002F\u002Fphysics.nist.gov\u002Fcuu\u002FConstants\u002F)\n- [Pint on PyPI](https:\u002F\u002Fpypi.org\u002Fproject\u002FPint\u002F) — 0.25.3, released 2026-03-19.\n- [Pint documentation](https:\u002F\u002Fpint.readthedocs.io\u002Fen\u002Fstable\u002F), including\n  [non-multiplicative units](https:\u002F\u002Fpint.readthedocs.io\u002Fen\u002Fstable\u002Fuser\u002Fnonmult.html)\n  and [contexts](https:\u002F\u002Fpint.readthedocs.io\u002Fen\u002Fstable\u002Fuser\u002Fcontexts.html).\n- [uncertainties on PyPI](https:\u002F\u002Fpypi.org\u002Fproject\u002Funcertainties\u002F) — 3.2.3, released\n  2025-04-21.\n- [uncertainties documentation](https:\u002F\u002Funcertainties.readthedocs.io\u002Fen\u002Flatest\u002F)\n- [scipy.constants reference](https:\u002F\u002Fdocs.scipy.org\u002Fdoc\u002Fscipy\u002Freference\u002Fconstants.html)\n","# Uncertainty and units\n\n## Scope\n\nUse this skill whenever a calculation carries physical units or a reported number needs\nan uncertainty. Concretely:\n\n- converting between units, including conversions that need a physical context\n  (wavelength to photon energy, mass to amount of substance, energy to temperature);\n- propagating uncertainty through a measurement model, with or without correlated inputs;\n- building a GUM uncertainty budget from calibration certificates, specifications, and\n  repeatability data;\n- choosing a coverage factor and deciding whether `k = 2` is defensible;\n- rounding and writing a result so a reader knows what the `±` means;\n- extracting parameter uncertainties from a curve fit without discarding correlations;\n- reviewing existing analysis code for silent unit and uncertainty defects;\n- checking that a dimensionally consistent answer is also physically possible — the\n  order of magnitude, the dimensionless group, and the regime it implies.\n\nThis skill covers the metrology and the two libraries that implement it. It does not\ncover statistical inference, model selection, or study design — see `statistical-analysis`,\n`statistical-power`, and `experimental-design`.\n\n## Current release and installation\n\nVerified 2026-07-26:\n\n- **pint 0.25.3**, released 2026-03-19; requires Python 3.11+.\n- **uncertainties 3.2.3**, released 2025-04-21; requires Python 3.8+.\n- **NumPy 2.5.1** and **SciPy 1.18.0**; both require Python 3.12+.\n- `scipy.constants` in SciPy 1.18.0 serves **CODATA 2022**. SciPy 1.11 and earlier\n  served CODATA 2018, and several recommended values differ between them.\n\n```bash\nuv venv --python 3.13\nsource .venv\u002Fbin\u002Factivate\nuv pip install \"pint==0.25.3\" \"uncertainties==3.2.3\" \"numpy==2.5.1\" \"scipy==1.18.0\"\n```\n\n`pint-pandas` and `pint-xarray` add unit-aware columns and arrays and are separate\ninstalls.\n\n## Non-negotiable workflow\n\n1. **Attach units at input and strip them only at output.** Convert at function\n   boundaries with `ureg.wraps` or `m_as(\"unit\")`, never mid-calculation.\n2. **Write the measurement model explicitly** before computing anything, including\n   corrections whose estimated value is zero. A correction left out of the model leaves\n   its uncertainty out of the budget.\n3. **Give every input four things**: an estimate, a standard uncertainty, the\n   distribution the uncertainty came from, and its degrees of freedom.\n4. **Convert Type B statements with the right divisor.** A certificate's expanded\n   uncertainty divides by its stated `k`; rectangular limits divide by `sqrt(3)`.\n5. **Identify correlations before combining.** Inputs calibrated against the same\n   standard, measured on the same instrument, or drawn from the same fit are correlated.\n6. **Compute sensitivity coefficients**, and read the budget from `c_i * u(x_i)` rather\n   than from the raw uncertainties.\n7. **Check the linearization.** Run Monte Carlo alongside the GUM framework and apply\n   the JCGM 101 clause 8 comparison. Report the Monte Carlo result when it fails.\n8. **Choose `k` from the effective degrees of freedom**, not by habit.\n9. **Round the uncertainty first, then the value to the same decimal place.**\n10. **State what the `±` is** — standard or expanded, with `k`, the coverage probability,\n    and the method.\n11. **Sanity-check the magnitude before reporting.** A dimensionally consistent result can\n    still be impossible. Compare it against a known scale or a dimensionless group, and\n    confirm every assumption you relied on still holds in that regime.\n\n## The failures this skill exists to prevent\n\nEach of the following runs without error and produces a plausible number.\n\n### A unit stripped at an unknown scale\n\n```python\nlength = (12.7 * ureg.mm).magnitude          # 12.7 -- of what?\nlength = (12.7 * ureg.mm).m_as(\"m\")          # 0.0127 metres, stated\n```\n\n`.magnitude` returns whatever the quantity happened to be carrying. Name the unit at the\npoint of extraction, every time.\n\n### Offset temperature arithmetic\n\n```python\nQ(20, \"degC\") + Q(5, \"degC\")     # OffsetUnitCalculusError -- correctly refused\nQ(20, \"degC\") + Q(5, \"delta_degC\")   # 25 degree_Celsius\nQ(25, \"degC\") - Q(20, \"degC\")        # 5 delta_degree_Celsius\n```\n\nCelsius and Fahrenheit are interval scales. An uncertainty on a temperature is always a\ndifference and belongs in a `delta_` unit: converting `20 ± 0.5 degC` to Fahrenheit\ngives `68 degF ± 0.9 delta_degF`, two different conversions on one line.\n\n### Logarithmic units that add by multiplying\n\n```python\nQ(10, \"dBm\") + Q(10, \"dBm\")   # 0.0001 kilogram**2 * meter**4 \u002F second**6\n```\n\nThat is 10 mW × 10 mW, not 20 mW and not 13 dBm. Nothing raises. Convert to a linear\nunit before any arithmetic.\n\n### A correlation destroyed by a round trip\n\n```python\nx = ufloat(1.0, 0.1)\nx - x                                     # 0.0+\u002F-0\nx - ufloat(x.nominal_value, x.std_dev)    # 0.00+\u002F-0.14\n```\n\nRebuilding a variable from its nominal value and standard deviation creates an\nindependent variable. So does any serialization that passes through a pair of floats.\nUse `correlated_values(values, covariance_matrix)` to rebuild a correlated set.\n\n### A covariance matrix silently rescaled\n\n```python\npopt, pcov = curve_fit(f, x, y, sigma=sigma)                        # default\npopt, pcov = curve_fit(f, x, y, sigma=sigma, absolute_sigma=True)\n```\n\nThe default rescales `pcov` by the reduced chi-square, so the parameter uncertainties\nabsorb the goodness of fit and match what you would get by passing no `sigma` at all. On\none synthetic straight-line fit the two give `[0.0364, 0.2154]` and `[0.0477, 0.2820]` —\na 31% difference. Pass `absolute_sigma=True` whenever `sigma` holds real standard\nuncertainties.\n\n### A linearization that was never checked\n\nFor `y = x²` with `x = 1.0 ± 0.5`, the GUM framework gives `y = 1.0`, `u_c = 1.0`, and a\n95% interval of `[-0.96, 2.96]` — mostly negative, for a squared quantity. Monte Carlo\ngives a mean of 1.25, `u_c = 1.06`, and a shortest 95% interval of `[0, 3.32]`. Nothing\nin a linear-propagation library will tell you this happened.\n\n## Bundled local CLIs\n\nAll helpers run offline, reject URLs and symlinks, bound their inputs, write output\natomically with private permissions, and refuse to overwrite without `--force`.\n\n```bash\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Fpropagate_uncertainty.py --help\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Funcertainty_budget.py --help\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Fformat_result.py --help\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Fconvert_units.py --help\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Faudit_units.py --help\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Fcheck_plausibility.py --help\n```\n\n### propagate_uncertainty.py\n\nRuns both propagation methods on the same model and applies the JCGM 101 clause 8\nvalidation test.\n\n```bash\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Fpropagate_uncertainty.py \\\n  --expression \"m \u002F (pi * (d \u002F 2) ** 2 * h)\" \\\n  --variable \"m=250.0,0.05\" \\\n  --variable \"d=20.0,0.02,rectangular\" \\\n  --variable \"h=40.0,0.05,rectangular\" \\\n  --measurand density --unit \"g\u002Fcm3\" --format markdown\n```\n\nEach `--variable` is `name=value,standard_uncertainty[,distribution[,dof]]`, where the\ndistribution is `normal`, `rectangular`, `triangular`, `arcsine`, or `exact` and controls\nMonte Carlo sampling only. Correlations go in as `--correlation \"a,b=0.9\"`. A JSON\n`--spec` file holds the same model for anything long-lived.\n\nThe expression is parsed into an abstract syntax tree and reduced by an explicit walk\nover `+ - * \u002F **` and a fixed list of functions. It is never compiled or executed.\n\nThe report gives the estimate, `u_c`, sensitivity coefficients, the budget in percent,\neffective degrees of freedom, `k`, `U`, both Monte Carlo coverage intervals, and the\nverdict on whether the linearized result may be reported.\n\n### uncertainty_budget.py\n\nCombines components stated the way certificates and data sheets state them.\n\n```bash\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Funcertainty_budget.py --template > budget.json\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Funcertainty_budget.py --spec budget.json --format markdown\n```\n\nEach component names a `distribution` that fixes its divisor — `expanded` divides by its\n`coverage_factor`, `rectangular` by `sqrt(3)`, `triangular` by `sqrt(6)`, `arcsine` by\n`sqrt(2)`, `normal` by 1 — with an optional `sensitivity`, `dof`, and `relative: true`.\nThe tool computes `u_c`, the Welch-Satterthwaite effective degrees of freedom, `k` from\nthe t-distribution, and `U`, and warns when a Type A component has no degrees of\nfreedom, when `nu_eff` is small enough that `k = 2` is wrong, when one component\ndominates, and when a Type B component declared `normal` is probably an undivided\nexpanded uncertainty.\n\n### format_result.py\n\n```bash\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Fformat_result.py \\\n  --value 12.34567 --uncertainty 0.02345 --unit mm \\\n  --coverage-factor 2.26 --coverage-probability 0.95\n```\n\nReturns `12.346 ± 0.023 mm`, `12.346(23) mm`, the scientific and LaTeX forms, and the\nsentence that has to accompany the number. Warns when one significant digit is requested\nfor an uncertainty beginning in 1 or 2, and when the uncertainty exceeds the estimate.\n\n### convert_units.py\n\n```bash\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Fconvert_units.py \\\n  --value 532 --unit nm --to eV --context spectroscopy --uncertainty 0.5\n\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Fconvert_units.py \\\n  --value 1.0 --unit g --to mol --context chemistry --context-parameter \"mw=180.156 g\u002Fmol\"\n```\n\nCarries the uncertainty through the conversion's local derivative, which matters because\ncontext conversions are reciprocal rather than proportional. Names the context in the\nerror message when a conversion needs one, and flags offset and logarithmic units.\n`--list-contexts` shows what the registry defines.\n\n### audit_units.py\n\nStatic review of existing analysis code. Parses, never imports or runs.\n\n```bash\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Faudit_units.py \\\n  --input analysis.py --format markdown --fail-on medium\n```\n\n| Rule | Severity | Detects |\n| --- | --- | --- |\n| `UNIT001` | medium | a second `UnitRegistry` in one module — cross-registry `ValueError` |\n| `UNIT002` | medium | offset temperature units with no `delta_` unit anywhere |\n| `UNIT003` | high | `.magnitude` without a preceding `.to(...)` or `.m_as(...)` |\n| `UNIT004` | medium | logarithmic units, whose `+` multiplies |\n| `UNC001` | high | `curve_fit` without `absolute_sigma` |\n| `UNC002` | medium | `np.std` \u002F `np.var` without `ddof` |\n| `UNC003` | medium | `math` or `numpy` functions in a module that uses `uncertainties` |\n| `UNC004` | high | a `ufloat` rebuilt from `.nominal_value` and `.std_dev` |\n| `CONST001` | low | a literal within 0.1% of a CODATA constant |\n\nExit status is 1 when a finding meets `--fail-on` (default `high`), which makes it usable\nas a pre-commit or CI check.\n\nThe rules are heuristics, so a false positive is suppressed with a directive comment —\ntrailing to cover its own line, or alone on a line to cover the next one:\n\n```python\nvalue = quantity.magnitude  # audit-units: ignore UNIT003 -- already converted upstream\n\n# audit-units: ignore UNC003 -- the argument here is a plain float array\nscaled = np.log10(counts)\n```\n\n`# audit-units: ignore-file CONST001` covers a whole module, and naming no rule\nsuppresses all of them. Suppressions are counted in the report rather than hidden, so a\nfile that silences everything still says so.\n\n### check_plausibility.py\n\nDimensional consistency is not physical possibility. A cell 2 m across and a Reynolds\nnumber of 4e7 in a capillary both pass every unit check. This tool tests a set of\nquantities against dimensionless groups, characteristic scales, and curated magnitude\nbands, and verifies each formula's dimensionality before reporting a number.\n\n```bash\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Fcheck_plausibility.py \\\n  --quantity \"density=1060 kg\u002Fm**3\" --quantity \"velocity=0.5 mm\u002Fs\" \\\n  --quantity \"length=8 um\" --quantity \"viscosity=3.5 mPa*s\" \\\n  --group reynolds --format markdown\n# Re = 0.001211 -- laminar (circular pipe, length = diameter)\n\npython skills\u002Funcertainty-and-units\u002Fscripts\u002Fcheck_plausibility.py \\\n  --quantity \"diameter=2 m\" --band \"eukaryotic_cell_diameter=diameter\"\n# implausible: 4.3 decades outside the 5-100 um range\n```\n\n`--group` evaluates one of 14 dimensionless groups and names the regime it places the\nsystem in; `--scale` computes a characteristic scale such as a diffusion time, Debye\nlength, or Stokes settling velocity; `--band` compares a supplied quantity against an\nobserved range. `--list` prints the whole catalogue with the inputs each formula needs.\n\nPhysical constants (`k_B`, `N_A`, `R_gas`, `g_earth`, and the rest) are available to every\nformula without being supplied, and are read from `scipy.constants` at run time rather\nthan written as literals, so they track the CODATA release SciPy ships.\n\nThe dimensionality check is the point. Passing a kinematic viscosity where the formula\nneeds a dynamic one — both called \"viscosity\", both tabulated for water, differing by a\nfactor of ρ — is refused before any number is computed:\n\n```\nerror: viscosity must have dimensionality [mass] \u002F ([length] * [time]),\n       but m²\u002Fs is [length] ** 2 \u002F [time]\n```\n\nExit status is 1 when the verdict meets `--fail-on` (default `implausible`; a value\nwithin one decade of a band is `questionable`). The thresholds are conventions with soft\nedges and assume the geometry their correlation was fitted for — see\n`references\u002Fplausibility-scales.md` for the characteristic length to use in each case.\n\n## Choosing a propagation method\n\n| Situation | Method |\n| --- | --- |\n| Linear or near-linear model, normal-ish inputs, large dof | GUM framework alone |\n| Any nonlinearity across ±2u of an input | run both, apply the clause 8 test |\n| Relative uncertainty above ~20% on any input | Monte Carlo |\n| Dominant rectangular or otherwise non-normal component | Monte Carlo |\n| Output bounded below (variance, concentration, squared quantity) | Monte Carlo |\n| Asymmetric output distribution | Monte Carlo, shortest coverage interval |\n| Correlated inputs | either, but supply the covariance matrix, not the standard uncertainties alone |\n\nA model dominated by rectangular contributions fails the clause 8 test even when it is\nperfectly linear: the framework's `k = 1.96` over-covers a nearly trapezoidal output.\nThe estimate and `u_c` are still right; only the interval is too wide.\n\n## Constants\n\nNever type a constant from memory. The 2019 SI redefinition fixed `c`, `h`, `e`, `k`,\nand `N_A` exactly, so their relative standard uncertainty is zero; everything else is a\nmeasured value that moves between CODATA releases.\n\n```python\nimport scipy.constants as constants\n\nconstants.value(\"electron mass\")        # 9.1093837139e-31\nconstants.unit(\"electron mass\")         # kg\nconstants.precision(\"electron mass\")    # 3.07e-10, relative standard uncertainty\nconstants.precision(\"Planck constant\")  # 0.0, exact by definition\n```\n\n`precision` returns a *relative* standard uncertainty; multiply by the value for the\nabsolute one.\n\n## Reference files\n\n- `references\u002Fgum-methodology.md` — Type A and Type B evaluation, distribution divisors,\n  the law of propagation, Welch-Satterthwaite, when the framework fails, the Monte Carlo\n  procedure, and the clause 8 validation test.\n- `references\u002Fpint-recipes.md` — registries, offset and logarithmic units, contexts,\n  boundary enforcement with `wraps` and `check`, NumPy interoperability, custom units,\n  formatting.\n- `references\u002Funcertainties-recipes.md` — variable identity and correlation,\n  `correlated_values`, `umath` and `unumpy`, format specs, fit covariance matrices, and\n  the package's limits.\n- `references\u002Fdomain-conversions.md` — the energy ladder, spectroscopy, concentration,\n  pressure, radiation and magnetism, mass spectrometry, logarithmic quantities, and the\n  pairs that share dimensions without sharing meaning.\n- `references\u002Freporting-rules.md` — rounding, notations, the sentence that must\n  accompany a result, SD versus SEM versus CI in figures, non-detects, and conformity\n  decision rules.\n- `references\u002Fplausibility-scales.md` — choosing the characteristic length, the\n  dimensionless groups and the modelling assumption each one gates, characteristic\n  scales, the observed magnitude bands and their sources, and the caveats on every\n  threshold.\n\n## Dated sources\n\nChecked 2026-07-26:\n\n- [JCGM 100:2008, Evaluation of measurement data — Guide to the expression of\n  uncertainty in measurement](https:\u002F\u002Fwww.bipm.org\u002Fdocuments\u002F20126\u002F2071204\u002FJCGM_100_2008_E.pdf)\n- [JCGM 101:2008, Supplement 1 — Propagation of distributions using a Monte Carlo\n  method](https:\u002F\u002Fwww.bipm.org\u002Fdocuments\u002F20126\u002F2071204\u002FJCGM_101_2008_E.pdf)\n- [NIST Technical Note 1297](https:\u002F\u002Fnvlpubs.nist.gov\u002Fnistpubs\u002FLegacy\u002FTN\u002Fnbstechnicalnote1297.pdf)\n- [CODATA internationally recommended values](https:\u002F\u002Fphysics.nist.gov\u002Fcuu\u002FConstants\u002F)\n- [Pint on PyPI](https:\u002F\u002Fpypi.org\u002Fproject\u002FPint\u002F) — 0.25.3, released 2026-03-19.\n- [Pint documentation](https:\u002F\u002Fpint.readthedocs.io\u002Fen\u002Fstable\u002F), including\n  [non-multiplicative units](https:\u002F\u002Fpint.readthedocs.io\u002Fen\u002Fstable\u002Fuser\u002Fnonmult.html)\n  and [contexts](https:\u002F\u002Fpint.readthedocs.io\u002Fen\u002Fstable\u002Fuser\u002Fcontexts.html).\n- [uncertainties on PyPI](https:\u002F\u002Fpypi.org\u002Fproject\u002Funcertainties\u002F) — 3.2.3, released\n  2025-04-21.\n- [uncertainties documentation](https:\u002F\u002Funcertainties.readthedocs.io\u002Fen\u002Flatest\u002F)\n- [scipy.constants reference](https:\u002F\u002Fdocs.scipy.org\u002Fdoc\u002Fscipy\u002Freference\u002Fconstants.html)\n",{"name":5,"license":15,"metadata":24,"description":7},{"version":25},"1.0.0","main","e0956dc9606356ab78468936b502e55a365282e2","specialist-src\u002Fpublished-skills\u002Funcertainty-and-units",0,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists","https:\u002F\u002Fgithub.com\u002Fmrsonord2240","2026-10-12 03:19:04",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add mrsonord2240\u002Fopenscience-specialists --skill uncertainty-and-units",{"tool":39,"command":40},"bunx","bunx skills add mrsonord2240\u002Fopenscience-specialists --skill uncertainty-and-units",{"tool":42,"command":43},"pnpm","pnpm dlx skills add mrsonord2240\u002Fopenscience-specialists --skill uncertainty-and-units","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Funcertainty-and-units\u002FSKILL.md",true,[47,53,57,61,65,69,73,79,83,87,91,95,99],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"references\u002Fdomain-conversions.md","REFERENCE","参考文档",8566,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Funcertainty-and-units\u002Freferences\u002Fdomain-conversions.md",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Fgum-methodology.md",10048,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Funcertainty-and-units\u002Freferences\u002Fgum-methodology.md",{"path":58,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Fpint-recipes.md",8133,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Funcertainty-and-units\u002Freferences\u002Fpint-recipes.md",{"path":62,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fplausibility-scales.md",9487,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Funcertainty-and-units\u002Freferences\u002Fplausibility-scales.md",{"path":66,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Freporting-rules.md",6513,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Funcertainty-and-units\u002Freferences\u002Freporting-rules.md",{"path":70,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Funcertainties-recipes.md",6622,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Funcertainty-and-units\u002Freferences\u002Funcertainties-recipes.md",{"path":74,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":77,"sourceHtmlUrl":78},"scripts\u002F_common.py","SCRIPT","脚本",21872,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Funcertainty-and-units\u002Fscripts\u002F_common.py",{"path":80,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":81,"sourceHtmlUrl":82},"scripts\u002Faudit_units.py",21214,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Funcertainty-and-units\u002Fscripts\u002Faudit_units.py",{"path":84,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":85,"sourceHtmlUrl":86},"scripts\u002Fcheck_plausibility.py",34751,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Funcertainty-and-units\u002Fscripts\u002Fcheck_plausibility.py",{"path":88,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":89,"sourceHtmlUrl":90},"scripts\u002Fconvert_units.py",10353,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Funcertainty-and-units\u002Fscripts\u002Fconvert_units.py",{"path":92,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":93,"sourceHtmlUrl":94},"scripts\u002Fformat_result.py",11707,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Funcertainty-and-units\u002Fscripts\u002Fformat_result.py",{"path":96,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":97,"sourceHtmlUrl":98},"scripts\u002Fpropagate_uncertainty.py",26346,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Funcertainty-and-units\u002Fscripts\u002Fpropagate_uncertainty.py",{"path":100,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":101,"sourceHtmlUrl":102},"scripts\u002Funcertainty_budget.py",13396,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Funcertainty-and-units\u002Fscripts\u002Funcertainty_budget.py",[104,112,119,126,133,140],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":108,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":19},"01M7CW36A6QAGWFE2C008M1XPG","bio-workflows-metabolomics-pipeline","Orchestrates the untargeted LC-MS metabolomics pipeline end-to-end (xcms 4.x feature extraction, QC\u002Fdrift\u002Fnormalization, confidence-stratified annotation, permutation-validated statistics, background-aware pathway mapping), naming what each stage decides and where it silently fails. Use when running a full LC-MS metabolomics study from raw mzML to enriched pathways and needing the honest handoffs between stages. Each stage defers to its component skill for parameters and traps; for stable-isotope flux (a separate branch, not this untargeted flow) see metabolomics\u002Fisotope-tracing.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-workflows-metabolomics-pipeline\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":108,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":19},"01M7CW2Y18623NA2S1Y30FRQW1","bio-metabolomics-xcms-preprocessing","Programmatic untargeted LC-MS feature extraction in R with the modern xcms 4.x MsExperiment\u002FXcmsExperiment API, taking raw mzML to a feature table via CentWave peak detection, retention-time alignment, peak-density correspondence, gap-filling, CAMERA redundancy collapse, and built-in QC feature filtering. Use when converting centroided LC-MS runs into a features-by-samples matrix and deciding centWave\u002Fgrouping\u002Falignment parameters. For drift correction and QC\u002FCV filtering execution see metabolomics\u002Fnormalization-qc; for metabolite identification see metabolomics\u002Fmetabolite-annotation; for the MS-DIAL GUI alternative with MS2Dec deconvolution see metabolomics\u002Fmsdial-preprocessing; for downstream statistics see metabolomics\u002Fstatistical-analysis.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-xcms-preprocessing\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":108,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":19},"01M7CW2M364HVWPNQEKE2WP4PP","bio-metabolomics-statistical-analysis","Decision-grade statistical analysis for metabolomics intensity tables. Covers transformation and scaling (Pareto vs unit-variance as a hidden hypothesis), unsupervised structure (PCA\u002FHCA for QC), permutation-validated PLS-DA\u002FOPLS-DA (R2 vs Q2, double CV, VIP as heuristic), univariate testing (Welch\u002FMann-Whitney\u002FANOVA\u002FLMM with covariate adjustment), and dependence-aware multiple testing. Use when testing which metabolites differ, building or validating a discriminant model, choosing a scaling, or correcting many correlated tests. For sample-wise normalization\u002Fdrift correction see metabolomics\u002Fnormalization-qc; for ML classifiers and selection-inside-CV leakage see machine-learning\u002Fbiomarker-discovery and machine-learning\u002Fmodel-validation; for pathway interpretation see metabolomics\u002Fpathway-mapping; for design\u002Fpower\u002Fmultiplicity regime see experimental-design\u002Fmultiple-testing.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-statistical-analysis\u002FSKILL.md",[],[],{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":108,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":19},"01M7CW2BCBF851WYE03Z8XPEDQ","bio-metabolomics-pathway-mapping","Maps metabolomics results to biological pathways via over-representation (ORA), metabolite-set enrichment (MSEA\u002FQEA), mummichog\u002FPSEA on raw m\u002Fz peaks, and network-diffusion enrichment (FELLA), with correct background-set construction and honest interpretive ceilings. Use when interpreting differential metabolites or an untargeted LC-MS feature table in pathway context, choosing ORA vs MSEA vs mummichog vs topology, or setting the reference\u002Fbackground set. For annotation confidence levels feeding ORA see metabolomics\u002Fmetabolite-annotation; for gene-set concepts see pathway-analysis\u002Fgo-enrichment and pathway-analysis\u002Fgsea; for joint gene+metabolite pathways see multi-omics-integration\u002Fmofa-integration.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-pathway-mapping\u002FSKILL.md",[],[],{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":108,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":19},"01M7CW21NSZMCPMF7D9CHJM718","bio-metabolomics-normalization-qc","Designs QC, corrects signal drift, removes batch effects, filters features, normalizes samples, and imputes missing values for untargeted LC-MS\u002FGC-MS metabolomics, framing each step as a measurement model that can create or erase biological signal. Use when processing a peak\u002Ffeature table before statistical analysis, choosing a drift-correction or sample-normalization method, deciding QC RSD vs D-ratio filtering, or handling left-censored missing values. The feature table is produced by metabolomics\u002Fxcms-preprocessing or metabolomics\u002Fmsdial-preprocessing; transformation\u002Fscaling for modeling defers to metabolomics\u002Fstatistical-analysis; cross-study design issues link to experimental-design\u002Fbatch-design.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-normalization-qc\u002FSKILL.md",[],[],{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":108,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":19},"01M7CW1SWVM0NYHVE6Q7MA3G7R","bio-metabolomics-msdial-preprocessing","Runs the MS-DIAL preprocessing workflow (peak picking, MS2Dec spectral deconvolution, alignment, gap-filling) and imports the alignment-result table into R or Python with honest filtering. Use when preprocessing LC-MS DDA\u002FDIA (SWATH) or GC-MS raw data with MS-DIAL, deciding MS-DIAL vs XCMS, configuring the MSDIALCUI console run, or parsing an MS-DIAL export into a clean feature matrix. For programmatic R peak detection and the feature-table-as-artifact framing see metabolomics\u002Fxcms-preprocessing; for lipid annotation mode see metabolomics\u002Flipidomics; for MSI-level confidence honesty see metabolomics\u002Fmetabolite-annotation; for drift correction and QC see metabolomics\u002Fnormalization-qc.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-msdial-preprocessing\u002FSKILL.md",[],[]]