Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ROOT7 bin coordinate queries (and axis growth logic while I'm at it) #4688

Merged
merged 6 commits into from
Dec 13, 2019
Merged

Fix ROOT7 bin coordinate queries (and axis growth logic while I'm at it) #4688

merged 6 commits into from
Dec 13, 2019

Conversation

HadrienG2
Copy link
Contributor

@HadrienG2 HadrienG2 commented Dec 12, 2019

Previously, ROOT7 histograms used different local bin coordinate conventions for GetBinIndex and GetBin(From|Center|To), as discussed in https://sft.its.cern.ch/jira/browse/ROOT-10445 . This PR brings order to that chaos, following the resolution proposed in https://sft.its.cern.ch/jira/browse/ROOT-10446 , and adds some tests which assert that the two binning conventions will remain in sync in the future.

While I was looking through the RHistImpl code, investigating further binning logic inconsistencies, I also spotted a few mistakes in the (currently unused) axis growth logic of GetBinIndex. So I corrected those along the way.

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-performance-centos7-multicore/default, ROOT-fedora27/noimt, ROOT-fedora29/python3, ROOT-fedora30/cxx14, ROOT-ubuntu16/nortcxxmod, ROOT-ubuntu18.04-i386/cxx14, mac1014/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link
Collaborator

@phsft-bot
Copy link
Collaborator

@phsft-bot
Copy link
Collaborator

@phsft-bot
Copy link
Collaborator

@HadrienG2
Copy link
Contributor Author

Ping @Axel-Naumann. Clearly I have nothing to do with these test failures, so what should I do next?

@phsft-bot
Copy link
Collaborator

@phsft-bot
Copy link
Collaborator

@phsft-bot
Copy link
Collaborator

@phsft-bot
Copy link
Collaborator

Build failed on windows10/cxx14.
See console output.

@Axel-Naumann
Copy link
Member

Regarding Windows: we have a bug in our CI infra that forces you to fork roottest for the Windows build to succeed. Could you do that, please?

@Axel-Naumann
Copy link
Member

These failures are indeed unrelated (and should now be fixed in master).

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-performance-centos7-multicore/default, ROOT-fedora27/noimt, ROOT-fedora29/python3, ROOT-fedora30/cxx14, ROOT-ubuntu16/nortcxxmod, ROOT-ubuntu18.04-i386/cxx14, mac1014/cxx17, windows10/cxx14
How to customize builds

hist/histv7/inc/ROOT/RHistImpl.hxx Outdated Show resolved Hide resolved
@@ -116,6 +116,18 @@ TEST(HistImplBinning, EquiDist2D) {
RAxisEquidistant, RAxisEquidistant>
hist(RAxisEquidistant(2, 0., 2.), RAxisEquidistant(2, -1., 1.));

// Here's a visual overview of how binning should work
Copy link
Member

Choose a reason for hiding this comment

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

👍

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-performance-centos7-multicore/default, ROOT-fedora27/noimt, ROOT-fedora29/python3, ROOT-fedora30/cxx14, ROOT-ubuntu16/nortcxxmod, ROOT-ubuntu18.04-i386/cxx14, mac1014/cxx17, windows10/cxx14
How to customize builds

@HadrienG2 HadrienG2 merged commit fba31b1 into root-project:master Dec 13, 2019
@HadrienG2 HadrienG2 deleted the rhist-local-bin-idx-order branch December 13, 2019 11:02
Falcort pushed a commit to Falcort/root that referenced this pull request Jan 7, 2020
…it) (root-project#4688)

* Fix incorrect axis in RGetBinIndex axis growth logic

* Fix off-by-one in RGetBinIndex need-to-grow detection logic

* Make RFillBinCoord logic consistent with RGetBinIndex logic

* Add tests of GetBinFrom/GetBinCenter/GetBinTo
Falcort pushed a commit to Falcort/root that referenced this pull request Jan 7, 2020
…it) (root-project#4688)

* Fix incorrect axis in RGetBinIndex axis growth logic

* Fix off-by-one in RGetBinIndex need-to-grow detection logic

* Make RFillBinCoord logic consistent with RGetBinIndex logic

* Add tests of GetBinFrom/GetBinCenter/GetBinTo
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.

None yet

3 participants