You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 to DEDX_BETHE_EXT00 in find_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, like DEDX_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 from DEDX_ICRU, which never falls back and still fails with DEDX_ERR_COMBINATION_NOT_FOUND for 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 from dedx_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.h enum.
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).
Tie this together with the existing README/index.rst note 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 into docs/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.
Context
README.md's "Supported programs" table and its mirror inindex.rst(pulled intodocs/source/index.rstvia.. include::) both listDEDX_PSTAR,DEDX_ASTAR,DEDX_MSTAR,DEDX_ICRU49,DEDX_ICRU73,DEDX_ICRU73_OLD,DEDX_BETHE_EXT00, andDEDX_ICRU— butDEDX_DEFAULTandDEDX_AUTOare missing from both.DEDX_AUTOis new (#144);DEDX_DEFAULThas existed for a while but was apparently never documented at this level (only in thededx.hDoxygen comments).Separately, there is no documented list of available materials anywhere — not in
README.md, not inindex.rst, not in the Doxygen-generated API reference. The only place material identifiers exist is theinclude/dedx_elements.henum; a reader has to go spelunking in a header to find out whatDEDX_WATER,DEDX_BORON_CARBIDE, etc. even are, or which ones are usable with which program.What to add
1.
DEDX_DEFAULTandDEDX_AUTOrows in the programs table (bothREADME.mdandindex.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.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:
include/dedx_elements.henum.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.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.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
DEDX_AUTO,dedx_get_material_list_for_ion()/dedx_fill_material_list_for_ion(), and fixed the stale per-program materials tableDEDX_AUTO)