Skip to content

Conversation

@hageboeck
Copy link
Member

@hageboeck hageboeck commented Jan 22, 2026

When a user asks to interpolate a value close to the edges of an axis,
the function would generate an error. This is inconsistent with the TH1
version of Interpolate.
Here, the valid range is extended by assuming that the histogram is
constant at the axis limit (i.e. the imaginary next bin outside the axis
limits has the same bin content as the last bin inside the limits). From
here, the trilinear interpolation proceeds as usual.

Fix #10678

@hageboeck hageboeck self-assigned this Jan 22, 2026
@hageboeck hageboeck force-pushed the ROOT-10678_TH3_Interpolate branch from 1c8765b to d446cef Compare January 22, 2026 15:30
@hageboeck hageboeck force-pushed the ROOT-10678_TH3_Interpolate branch from d446cef to a7f0d27 Compare January 22, 2026 15:34
@github-actions
Copy link

github-actions bot commented Jan 22, 2026

Test Results

    22 files      22 suites   3d 10h 26m 23s ⏱️
 3 770 tests  3 770 ✅ 0 💤 0 ❌
74 986 runs  74 986 ✅ 0 💤 0 ❌

Results for commit d77ebbd.

♻️ This comment has been updated with latest results.

@hageboeck hageboeck force-pushed the ROOT-10678_TH3_Interpolate branch from a7f0d27 to ed54dcd Compare January 23, 2026 09:49
Copy link
Contributor

@guitargeek guitargeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good to me! If you'd find a way to make the code easier to understand I'd welcome that, but that's optional

Previously, when a user asked to interpolate a value close to the edges
of the histogram, the function would generate an error. This is
inconsistent with the TH1 version of Interpolate.
Here, the valid range is extended by assuming that the histogram is
constant at its edges (i.e. the imaginary next bin outside the axis
limits has the same bin content as the last bin inside the limits, like
in TH1). From here, the trilinear interpolation proceeds as before.

Fix root-project#10678
@hageboeck hageboeck force-pushed the ROOT-10678_TH3_Interpolate branch from ed54dcd to d77ebbd Compare January 23, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TH3::Interpolate min/max value condition behaves differently for TH1/TH2

2 participants