LArbys / LArCV

Liquid Argon Computer Vision
11 stars 9 forks source link

view_rgb navigation using R/S/E #46

Closed erezcoh4 closed 8 years ago

erezcoh4 commented 8 years ago

Hi, i'd like to navigate in view_rgb using run/subrun/event (rse). I am thinking about looping over all ROI and IMAGE trees inputs for a user-defined rse and when finding the right entry, load the data image and the ROIs initial values. Does it make sense? To start, i've added three widgets to the view_rgb display (mac/pyrgb/display/) and modified the scripts accordingly, so that now it works, but fairly slow (probably because i'm loading heavy images in every loop...) can you please help me engineer it better?

vgenty commented 8 years ago

Might be nice to have especially when we look at data. The famous evd.py doesn't have this feature either, we both are loading the data out of TChain and displaying the run/s/e on screen. I hesitate to do a big loop like this in the viewer since it's written in python. As an annoying workaround you could preselect your events by dumping the TTree index of the R/S/E you want before hand, then navigate to them in the viewer. I'll think about it a bit

erezcoh4 commented 8 years ago

Thanks, I think i've solved it and got it working fast. However I would very much appreciate if you or someone else would be willing to look at the code, to feedback if what I thought of makes sense, and if its robust enough to spread out for others to use as well

twongjirad commented 8 years ago

Great! I'll take a look at at this. One thing to do, is to start a pull request. I imagine you've done the work on rse_viewer? I see that the last commit to that branch is 5 days. Has the latest version been pushed to github?

erezcoh4 commented 8 years ago

yep (just updated rse_viewer) note however that to make things easier for me i changed some widgets default values, so if you want to use it be careful w/ the files paths (sorry... )

drinkingkazu commented 8 years ago

Is this finished?

erezcoh4 commented 8 years ago

Taritree told me the other day he wants to merge it with some modifications he added, and then he'll push to the main version...

vgenty commented 8 years ago

Erez is right, it's available in https://github.com/LArbys/LArCV/commits/tmw_roi_feature branch. At some point Taritree will push to develop but this enhancement exists, so i'll close it.