LArbys / LArCV

Liquid Argon Computer Vision
11 stars 9 forks source link

Setting a vertex along with an ROI #47

Closed twongjirad closed 8 years ago

twongjirad commented 8 years ago

For certain scanning tasks, we might want to be able to set a vertex in conjunction with the ROI. The immediate use case is for scanning Michel electrons. The ROI encapsulates the entire shower while the vertex marks the point of the decay. Together, along with Kalman filter, we'd start from vertex and follow muon in order to mask it, leaving only the electron charge. Also, vertex provides target for regression.

I've made a first attempt at 0511351a8b194c52937bc5010cb3e0e763d6d4ac

An example of what a user might label is here:

screen shot 2016-07-21 at 3 32 41 am

If can develop algorithm to follow muon, then we can avoid having users mark pixels directly.

twongjirad commented 8 years ago

Currently can draw vertex. Need to decide how to save that information into an ROI.

twongjirad commented 8 years ago

Looks like @drinkingkazu has written storage class for 2D vertex: a22f14b8f490244fab299de3950a821cdfb7fa7d. going to merge master with tmw_roi_feature and then utilize object to store hand-scanned vertex.

twongjirad commented 8 years ago

Lauren found a bug. Occurs when loading ROIs from file.

Traceback (most recent call last):
  File "/Users/twongjirad/working/larbys/LArCV/mac/pyrgb/display/rgbdisplay.py", line 524, in plotData
    self.roitool_layout.reloadROI()
  File "/Users/twongjirad/working/larbys/LArCV/mac/pyrgb/display/roilayout.py", line 358, in reloadROI
    if not self.roisg.fix_vertex_to_bb:
AttributeError: 'ROIToolLayout' object has no attribute 'roisg'
drinkingkazu commented 8 years ago

@twongjirad a clarification on 2D stuff in 2 categories:

Simple product for pixel location info Pixel2D ... just pixel coordinate Pixel2DCluster ... a set of such poop

Sophisticated product for geometrical calculation (algorithm to be ported from another geometrical computation package) Vector2D ... double precision coordinate LineSegment2D ... two Vector2D to define a finite line segment AABox2D ... two Vector2D to define axis-aligned box

I think anything a user will do from GUI has no better precision than a pixel point, so Pixel2D should be enough. If we want to store a value associated with each Pixel2D we can define something else (like Hit2D maybe... as something carrying time, wire, and value).

twongjirad commented 8 years ago

I finished the save feature here. Will check into tmw_roi_feature soon.

twongjirad commented 8 years ago

finished: d839117653351c411d85fcb6e39465f5b407d534