Skip to content

linear vs log interpolation #88

@nbassler

Description

@nbassler

Summary

libdedx currently interpolates stopping-power tables with natural cubic splines in linear space.

For ICRU data, the recommended interpolation is instead log-log interpolation with natural cubic splines, i.e. fitting ln(X) as a function of ln(T), where X is the stopping power and T is the energy.

From ICRU:

The main results are given to four significant figures, more than are warranted by the expected accuracy of the evaluations, in order to facilitate smooth interpolation. Based on practices used in the development of these tables, log-log interpolation is recommended, using natural cubic splines fitted to ln X as a function of ln T, where X is the variable of interest.

Requested behavior

  • Use log-log natural cubic spline interpolation for tabulated stopping-power data by default.
  • Keep linear interpolation available as an explicit runtime option.
  • Return the exact tabulated value when queried exactly at a knot energy.

Why this matters

The interpolation method affects off-grid values and can give noticeable differences compared with the intended source-table behavior. Also, knot points should reproduce the tabulated data exactly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions