uncertainty-and-units
하는 일
이 도구는 과학 계산에서 단위(미터, 초 등)와 불확실성(값이 얼마나 신뢰할 만한지)을 올바르게 다루도록 돕습니다. 단위를 변환하고, 오차 전파를 계산하며, 결과를 명확하게 보여 줍니다.
사용하는 경우
- ✓과학 계산에서 단위를 변환할 때.
- ✓여러 측정값으로 얻은 결과의 불확실성을 계산할 때.
- ✓측정 결과를 발표할 때 불확실성이 이해되도록 제시하는 경우.
스킬 링크
https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/uncertainty-and-units/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“시속 10킬로미터를 초당 미터로 바꾸고, 불확실성도 알려 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
도구는 전문 라이브러리를 사용해 계산 과정 전체에서 단위와 불확실성을 추적합니다. 단위가 올바르게 처리되고, 불확실성이 확립된 과학적 방법에 따라 전파되도록 합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Uncertainty and units
Scope
Use this skill whenever a calculation carries physical units or a reported number needs an uncertainty. Concretely:
- converting between units, including conversions that need a physical context (wavelength to photon energy, mass to amount of substance, energy to temperature);
- propagating uncertainty through a measurement model, with or without correlated inputs;
- building a GUM uncertainty budget from calibration certificates, specifications, and repeatability data;
- choosing a coverage factor and deciding whether
k = 2is defensible; - rounding and writing a result so a reader knows what the
±means; - extracting parameter uncertainties from a curve fit without discarding correlations;
- reviewing existing analysis code for silent unit and uncertainty defects;
- checking that a dimensionally consistent answer is also physically possible — the order of magnitude, the dimensionless group, and the regime it implies.
This skill covers the metrology and the two libraries that implement it. It does not
cover statistical inference, model selection, or study design — see statistical-analysis,
statistical-power, and experimental-design.
Current release and installation
Verified 2026-10-01:
- pint 0.26.1, released 2026-09-10; requires Python 3.12+.
- uncertainties 3.2.3, released 2025-04-21; requires Python 3.8+.
- NumPy 2.5.3 and SciPy 1.18.1; both require Python 3.12+.
scipy.constantsin SciPy 1.18.1 serves CODATA 2022. SciPy 1.11 and earlier served CODATA 2018; the switch to CODATA 2022 occurred in SciPy 1.15.
uv venv --python 3.13
source .venv/bin/activate
uv pip install "pint==0.26.1" "uncertainties==3.2.3" "numpy==2.5.3" "scipy==1.18.1"
pint-pandas and pint-xarray add unit-aware columns and arrays and are separate
installs.
Non-negotiable workflow
- Attach units at input and strip them only at output. Convert at function
boundaries with
ureg.wrapsorm_as("unit"), never mid-calculation. - Write the measurement model explicitly before computing anything, including corrections whose estimated value is zero. A correction left out of the model leaves its uncertainty out of the budget.
- Give every input four things: an estimate, a standard uncertainty, the distribution the uncertainty came from, and its degrees of freedom.
- Convert Type B statements with the right divisor. A certificate's expanded
uncertainty divides by its stated
k; rectangular limits divide bysqrt(3). - Identify correlations before combining. A shared calibration, instrument correction, or fit can induce correlation; quantify shared components instead of assuming every pair is correlated.
- Compute sensitivity coefficients, and read the budget from
c_i * u(x_i)rather than from the raw uncertainties. - Check the linearization. Compare propagated distributions with the GUM interval when in doubt. Establish Monte Carlo numerical stability before a JCGM 101 clause 8 claim; neither method validates the measurement model or the assigned input PDFs.
- Justify coverage. A Student-t factor from effective degrees of freedom is an approximation requiring suitable distributional assumptions.
- Round the uncertainty first, then the value to the same decimal place.
- State what the
±is — standard or expanded, withk, the coverage probability, and the method. - Sanity-check the magnitude before reporting. A dimensionally consistent result can still be impossible. Compare it against a known scale or a dimensionless group, and confirm every assumption you relied on still holds in that regime.
The failures this skill exists to prevent
Each of the following runs without error and produces a plausible number.
A unit stripped at an unknown scale
length = (12.7 * ureg.mm).magnitude # 12.7 -- of what?
length = (12.7 * ureg.mm).m_as("m") # 0.0127 metres, stated
.magnitude returns whatever the quantity happened to be carrying. Name the unit at the
point of extraction, every time.
Offset temperature arithmetic
Q(20, "degC") + Q(5, "degC") # OffsetUnitCalculusError -- correctly refused
Q(20, "degC") + Q(5, "delta_degC") # 25 degree_Celsius
Q(25, "degC") - Q(20, "degC") # 5 delta_degree_Celsius
…
자주 묻는 질문
물리적 단위란 무엇인가요?
길이(미터), 시간(초), 질량(킬로그램) 같은 양을 재기 위한 표준입니다.
측정 불확실성이란 무엇인가요?
측정값 주변에서 참값이 일정한 확률로 있을 것으로 기대되는 범위를 나타냅니다.
단위와 불확실성을 추적하는 것이 왜 중요한가요?
과학 결과의 정확성, 비교 가능성, 신뢰성을 보장하고 복잡한 계산에서 흔한 실수를 피하기 위해서입니다.
상세 정보
작성자의 원본 설명
Tracks physical units and propagates 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
인기도
- GitHub 스타
- 51k
- 순위
- #3589
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
13c-metabolic-flux
51k탄소-13 동위원소 추적 데이터를 사용해 대사 흐름(플럭스)을 추정합니다. 세포 대사와 생화학 경로를 분석할 때 유용합니다.
adaptyv
51kAdaptyv API를 사용해 단백질 특성 분석 실험을 설계합니다. 비용을 추정하고, 서열을 제출하며, 실험실 결과를 확인하는 데 도움이 됩니다.
aeon
51k시계열 데이터에 대해 머신러닝 작업을 수행합니다. 순차 데이터를 분류하고, 예측하고, 이상을 탐지하고, 패턴을 찾을 때 유용합니다.
alphagenome
51k유전 변이에 대해 미리 계산된 게놈 영향을 조회합니다. 변이가 게놈에 주는 영향을 이해하도록 점수와 설명을 제공합니다.
비슷한 스킬
gitcrawl
394k에이전트가 저장된 GitHub 이슈와 풀 리퀘스트 보관본을 검색하고, 중복 항목을 묶고, GitHub에서 현재 상태를 확인하도록 돕습니다.
slacrawl
394k에이전트가 로컬 Slack 보관본에서 메시지를 검색하고 개수를 세며, 보관본이 얼마나 최신인지 확인하고 필요할 때 새로 고치도록 돕습니다.
goplaces
394k에이전트가 Google Places로 장소를 검색하고, 세부 정보와 리뷰를 가져오고, 장소 이름을 확인하며, 스크립트용 JSON을 출력하도록 돕습니다.