--- name: averaging description: > Use this skill when calculating weighted or unweighted averages for ENSDF nuclear data using Java_Average.py. Enforces exact transcription of the Suggested Adopted Result, minimum-uncertainty rule, and lifetime uncertainty limit 99. Suitable for adopting measured values from multiple publications. argument-hint: [VALUE1 UNC1 VALUE2 UNC2 ...] --- # ENSDF Averaging ENSDF 80-column data record and field definitions, structural rules, column positions, and uncertainty notation: `.github/agents/ENSDF-Agent.agent.md`. Spot-check policy: `.github/copilot-instructions.md`. ## How **Numeric mode** — comma after each pair for readability (optional): ```bash python .github/scripts/Java_Average.py 19.7 1.3, 22 4, 21.5 1.5 ``` **Comment mode** — feed the existing cL T$ comment directly: ```bash python .github/scripts/Java_Average.py --comment "19.7 ps {I13} (1970Br10) and 22 ps {I4} (1975Sm02)" ``` ## What to adopt - Transcribe the printed **Suggested Adopted Result** character-for-character to data fields; never recompute, re-round, or substitute. Comments quote must match the suggestion. - Use the method the tool labels (Weighted vs Unweighted). - Adopted uncertainty ≥ smallest input uncertainty (min-uncertainty rule); the tool enforces it — do not override. - Lifetimes use full precision (limit 99): `197 fs {I50}`. In the record, `T`/`DT` = ln2 × tool τ/unc in the record's unit. ## Uncertainty digits by destination | Destination | Digits | | --- | --- | | Comment line (`cL T$`, `cG RI$`, …) | as printed; 2 digits kept even when >35 | | Data-record field (`E`/`DE`, `RI`/`DRI`, `T`/`DT`, `2 L BE2=`) | >35 → 1 digit | When user requests code `Java_Average.py` for calculating averages, follow these rules with absolute precision and zero tolerance for deviation: - Always use exact Java code `Suggested Adopted Result` value without recalculation or substitution - Use exact uncertainty value provided by Java code (automatically applies rule: adopted uncertainty ≥ any individual input uncertainty) - Check whether Java suggests weighted or unweighted average in output comments - Use whichever method Java code explicitly recommends - Transcribe all values character-for-character without rounding, adjustment, or omitting units - Never recalculate averages by yourself - Never use unrecommended uncertainty results - Never substitute weighted/unweighted averages contrary to Java's recommendation ## Minimum Uncertainty Rule **ENSDF-Specific Requirement:** Adopted uncertainty ≥ any individual input uncertainty. **Rationale:** Prevents averaging from artificially reducing systematic uncertainty below best single measurement. Maintains conservative uncertainty estimates in nuclear data evaluation. Java_Average.py automatically enforces this. - **Statistical avg < min input uncertainty** → Adopted = min input uncertainty - **Statistical avg ≥ min input uncertainty** → Adopted = statistical average **Example:** Averaging 665.56±0.05 and 665.6±0.1 yields statistical uncertainty 0.0447, but adopted uncertainty becomes 0.05 (matches smallest input). ## Gotchas - **`[critical=X]` is display-only.** The tool decides Weighted vs. Unweighted not just based on the chi-squared critical value. - **Lifetimes can use full precision** (uncertainty limit 99): write `197 fs {I50}`, not `2.0E2 {I5}`. - **One value per paper.** Comment mode skips the value before `average of` (it's the old average result) and stops at `Other:`.