LArbys / LArCV

Liquid Argon Computer Vision
11 stars 9 forks source link

Viewer does not display non-zero pixels #39

Open vgenty opened 8 years ago

vgenty commented 8 years ago

Yikes! Ariana found that the viewer may not display all non-zero pixels in the image when using user-controlled thresholding. Here is an example of a Nu in plane 1, with auto pyqtgraph intensity scale (that's why is looks like shit)

alt text

Set the imin threshold a little higher than 0, and there are non-zero pixels in the image if you slice on it the values are... [ 2.50050282 2.87391782 2.25792432 3.22080231 3.17725968 1.86988342 1.64758134 3.24257207 2.84999657 2.88998723 3.7988553 1.76502311 1.17307568 4.05927277 1.23509991 1.21503234 4.26263475 4.66946697 1.23992372 4.14212132 2.64220333 3.4762044 3.35693979 3.57622218 3.47608447 3.77681541 3.72539306 4.3190136 3.80827284 1.18566716 5.65644979 3.04839444 2.34159589 8.38000679 1.78434169 1.01273596]

but the image is blank... alt text

quick fix is to artificially boost the pixel values by 100 with self.plot_mat*=100.0 placed on line 124 in

https://github.com/LArbys/LArCV/blob/master/mac/pyrgb/lib/image_types/plotimage.py

Now with an appropriate threshold, we see the pixels appear alt text

I see 7 non zero pixels and it's confirmed on the slice [ 4.05927277 4.26263475 4.66946697 4.14212132 4.3190136 5.65644979 8.38000679]

I've tried a number of things to get the pixels to scale which include

but so far an arbitrary scaling has resolved this. I will leave this open until I find a better way to address.

twongjirad commented 8 years ago

This is definitely a strange bug. I see that, at least on my computers, the version of pyqtgraph I am using 0.9.8 is old. There is 0.9.10. In version 0.9.9 there are options for downsampling techniques. Maybe this miraculously addresses this.

vgenty commented 8 years ago

@ahack379 did we get this resolved?