Repository navigation
Description
Context
README.md's "Supported programs" table and its mirror in index.rst (pulled into docs/source/index.rst via .. include::) both list DEDX_PSTAR, DEDX_ASTAR, DEDX_MSTAR, DEDX_ICRU49, DEDX_ICRU73, DEDX_ICRU73_OLD, DEDX_BETHE_EXT00, and DEDX_ICRU — but DEDX_DEFAULT and DEDX_AUTO are missing from both. DEDX_AUTO is new (#144); DEDX_DEFAULT has existed for a while but was apparently never documented at this level (only in the dedx.h Doxygen comments).
Separately, there is no documented list of available materials anywhere — not in README.md, not in index.rst, not in the Doxygen-generated API reference. The only place material identifiers exist is the include/dedx_elements.h enum; a reader has to go spelunking in a header to find out what DEDX_WATER, DEDX_BORON_CARBIDE, etc. even are, or which ones are usable with which program.
What to add
1. DEDX_DEFAULT and DEDX_AUTO rows in the programs table (both README.md and index.rst):
DEDX_DEFAULT— currently behaves identically toDEDX_BETHE_EXT00infind_data()(src/dedx.c); worth explicitly saying whether it's meant as a stable alias/default entry point or is expected to diverge later, since right now a reader has no way to tell why both exist.DEDX_AUTO— auto-selects the best tabulated ICRU report for the ion, likeDEDX_ICRU, but falls back to the Bethe-Bloch formula for elements/compounds nothing tabulated covers (comparable to the AUTO mode in dedx_web). Should call out explicitly that this is different fromDEDX_ICRU, which never falls back and still fails withDEDX_ERR_COMBINATION_NOT_FOUNDfor combinations no ICRU sub-report covers — this distinction was a deliberate design decision (see the discussion on Add proper handling of missing ion+material+program combinations #51) and is exactly the kind of thing a reader would otherwise miss.- Both should note the caveat already present for
DEDX_BETHE_EXT00-style programs (advisory-only energy bounds fromdedx_get_min_energy()/dedx_get_max_energy(); the real bounds come from whichever tier actually resolves the request).
2. Document available materials well, likely as a new section/page:
- A materials table or generated list (elements + compounds), since right now the only source of truth is the
include/dedx_elements.henum. - Documentation of the two ways to query availability, and when to use which:
dedx_get_material_list(program)— coarse, per-program hint (not ion-specific, doesn't account for per-compound decomposition feasibility).dedx_get_material_list_for_ion(program, ion, ...)/dedx_fill_material_list_for_ion(...)(added in Fix stale material-availability tables; add ion-aware lookup and Bethe fallback for DEDX_ICRU #144) — accurate, ion-specific, decomposition-aware answer that mirrors whatdedx_load_config()will actually do.
- Tie this together with the existing README/
index.rstnote about Bragg/stoichiometric fallback for compounds not natively covered by a program's own database.
Suggested locations
README.md: extend the existing "Supported programs" table + note.index.rst(top-level, included intodocs/source/index.rst): same table, plus a new subsection (e.g. under "Supported programs" or as its own "Available materials" section) for the materials list/API guidance.- Related but broader: docs: add high-level "purpose, role & how to read the numbers" guide #116 (docs epic for a full "purpose, role & how to read the numbers" guide) already proposes a program-coverage table; this issue is the narrower, concrete piece of that specifically covering the
DEDX_DEFAULT/DEDX_AUTOgap and materials documentation, prompted directly by Fix stale material-availability tables; add ion-aware lookup and Bethe fallback for DEDX_ICRU #144 landing.
References
- Add proper handling of missing ion+material+program combinations #51 — original issue (missing ion+material+program combination handling)
- Fix stale material-availability tables; add ion-aware lookup and Bethe fallback for DEDX_ICRU #144 — added
DEDX_AUTO,dedx_get_material_list_for_ion()/dedx_fill_material_list_for_ion(), and fixed the stale per-program materials table - docs: add high-level "purpose, role & how to read the numbers" guide #116 — broader docs epic proposing a program-coverage table (predates
DEDX_AUTO)
Activity