Langsung ke konten
Skillpedia
Analisis & spreadsheet51k · #3589

uncertainty-and-units

Fungsinya

Alat ini membantu memastikan perhitungan ilmiah Anda benar dari sisi satuan (seperti meter, detik) dan ketidakpastian (seberapa andal suatu angka). Alat ini mengonversi satuan, menghitung propagasi error, dan menyajikan hasil dengan jelas.

Kapan dipakai

  • ✓Saat mengonversi satuan dalam perhitungan ilmiah.
  • ✓Saat menghitung ketidakpastian suatu hasil dari beberapa pengukuran.
  • ✓Saat menyajikan hasil pengukuran agar ketidakpastiannya mudah dipahami.

Link skill

https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/uncertainty-and-units/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/uncertainty-and-units/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit →

Contoh permintaan ke AI

“Konversikan 10 kilometer per jam ke meter per detik dan beri tahu saya ketidakpastiannya.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Alat ini menggunakan library khusus untuk melacak satuan dan ketidakpastian sepanjang perhitungan. Alat ini memastikan satuan ditangani dengan benar dan ketidakpastian dipropagasikan sesuai metode ilmiah yang sudah mapan.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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 = 2 is 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.constants in 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

  1. Attach units at input and strip them only at output. Convert at function boundaries with ureg.wraps or m_as("unit"), never mid-calculation.
  2. 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.
  3. Give every input four things: an estimate, a standard uncertainty, the distribution the uncertainty came from, and its degrees of freedom.
  4. Convert Type B statements with the right divisor. A certificate's expanded uncertainty divides by its stated k; rectangular limits divide by sqrt(3).
  5. Identify correlations before combining. A shared calibration, instrument correction, or fit can induce correlation; quantify shared components instead of assuming every pair is correlated.
  6. Compute sensitivity coefficients, and read the budget from c_i * u(x_i) rather than from the raw uncertainties.
  7. 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.
  8. Justify coverage. A Student-t factor from effective degrees of freedom is an approximation requiring suitable distributional assumptions.
  9. Round the uncertainty first, then the value to the same decimal place.
  10. State what the ± is — standard or expanded, with k, the coverage probability, and the method.
  11. 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

…

Pertanyaan umum

Apa itu satuan fisik?

Satuan fisik adalah standar untuk mengukur besaran seperti panjang (meter), waktu (detik), atau massa (kilogram).

Apa itu ketidakpastian pengukuran?

Ketidakpastian pengukuran adalah indikasi rentang di sekitar nilai terukur, di mana nilai sebenarnya diperkirakan berada dengan probabilitas tertentu.

Mengapa melacak satuan dan ketidakpastian itu penting?

Untuk memastikan akurasi, keterbandingan, dan keandalan hasil ilmiah, serta menghindari kesalahan umum dalam perhitungan yang kompleks.

Detail

Deskripsi asli dari pembuat

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

repo: K-Dense-AI/scientific-agent-skills

Popularitas

Bintang GitHub
51k
Peringkat
#3589
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa