Part of #108 (health-review epic).
Problem
Several semantically meaningful thresholds appear as bare literals scattered across src/dedx.c and src/dedx_validate.c:
program >= 100 — the "analytical program" threshold (Bethe/default).
target > 99 — the "custom compound id" threshold.
ion > 120 / i < 112 — maximum atomic number / ion-table extent.
These are easy to get subtly wrong (note > 99 vs >= 100, and 112 vs 113 buffer sizing) and obscure intent.
Proposed change
Introduce documented named constants (e.g. DEDX_ANALYTICAL_PROGRAM_MIN, DEDX_COMPOUND_ID_MIN, DEDX_MAX_ELEMENT_Z) in a central internal header and use them everywhere the literals currently appear. No behavior change.
Acceptance criteria
Part of #108 (health-review epic).
Problem
Several semantically meaningful thresholds appear as bare literals scattered across
src/dedx.candsrc/dedx_validate.c:program >= 100— the "analytical program" threshold (Bethe/default).target > 99— the "custom compound id" threshold.ion > 120/i < 112— maximum atomic number / ion-table extent.These are easy to get subtly wrong (note
> 99vs>= 100, and112vs113buffer sizing) and obscure intent.Proposed change
Introduce documented named constants (e.g.
DEDX_ANALYTICAL_PROGRAM_MIN,DEDX_COMPOUND_ID_MIN,DEDX_MAX_ELEMENT_Z) in a central internal header and use them everywhere the literals currently appear. No behavior change.Acceptance criteria
100/99/120/112used as these thresholds are replaced by named constants with explanatory comments at their definition.