AlbertoPdRF / root-file-viewer

View ROOT files directly in VS Code!
https://marketplace.visualstudio.com/items?itemName=albertopdrf.root-file-viewer
MIT License
47 stars 5 forks source link

Add re-binning functionality #2

Closed dnwerner closed 3 years ago

dnwerner commented 3 years ago

The extension is an awesome tool to improve productivity.

A few features from the TBrowser that are helpful are still missing: One of these is the option to re-bin the viewed histograms (analogous to the Re-bin function in the TBrowser, just suming up existing bins).

AlbertoPdRF commented 3 years ago

Hey @dnwerner!

First of all, thanks for your kind words and for openning the issues! And also sorry for the delay in getting back to you.

Regarding this issue, it's important to note that ROOT File Viewer leverages the JavaScript ROOT package to do all the heavy lifting, and after taking a look I don't think it supports rebinning histograms 😕 I could be wrong though, maybe @linev can enlighten us!

linev commented 3 years ago

Yes, histograms rebinning has to be implemented in JSROOT directly. You could open issue on project https://github.com/root-project/jsroot webpage It should be not that difficult - there much complex functions like: https://root.cern/js/latest/examples.htm#th2_projx1

AlbertoPdRF commented 3 years ago

I've just opened https://github.com/root-project/jsroot/issues/210 @linev, thanks for the very quick reply!

AlbertoPdRF commented 3 years ago

Please note that although https://github.com/root-project/jsroot/issues/210 has already been addressed (albeit not released yet) this issue is still blocked by #6

linev commented 3 years ago

One can call rebin via sub-menu, but also I will try to find better solution than using prompt

AlbertoPdRF commented 3 years ago

Oh, that's very nice! I'll close the issue when the re-binning functionality is included in a JSROOT release, thanks for letting me know!

linev commented 3 years ago

Now in jsroot 6.1.0 jquery dialog is used instead of prompt

AlbertoPdRF commented 3 years ago

Yep, I'm already publishing v0.3.0 with all the changes, thanks for the heads up! :slightly_smiling_face:

dnwerner commented 3 years ago

@linev @AlbertoPdRF Thank you! (sorry to tag you, but your work is really helping!)