artview icon indicating copy to clipboard operation
artview copied to clipboard

Manual filter - filter gates in radar stops working after a while

Open bdolan44 opened this issue 8 years ago • 17 comments

After editing and unfolding a number of volumes, the "Manual Filter -Filter Gates in radar" button stops working. The fix is to exit out of Artview and restart.

bdolan44 avatar May 20 '16 21:05 bdolan44

is there any error mensage in the terminal?. Have you tried reseting the select region?

gamaanderson avatar May 21 '16 07:05 gamaanderson

We will get back to you on this....trying to reproduce the problem so we can give more specific details. However, resetting the select region does not fix the problem.

bdolan44 avatar May 24 '16 22:05 bdolan44

Can you also not download the latest updated until you get more info and try the same steps after updating your code base? This might help rule things out, or not. Thanks!

nguy avatar May 24 '16 22:05 nguy

Ok. I think we have not updated the latest. When this error occurs, this is what it says in the terminal: File "/usr/local64/python-2.7/anaconda/lib/python2.7/site-packages/artview/components/tools.py", line 300, in onZoom relx = (cur_xlim[1] - xdata)/(cur_xlim[1] - cur_xlim[0]) TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'

bdolan44 avatar May 31 '16 20:05 bdolan44

So, I would guess that xdata is None. I'm not really sure what caused that, but I would test for it and quit the onZoom function

gamaanderson avatar May 31 '16 21:05 gamaanderson

So that error is created when the one try to zoom outside the picture, we should fix that, but I don't thing this is the bug here. So apparent it is not showing any error, that make things difficult. One thing I have notice while trying to replicate is that if the selected region has to much components it gets slower and the program stop responding until it is done creating the Points. But after that it is back to normal. I have created a small video with more information on the working of the select region: https://youtu.be/1Na5fY64m7Y

gamaanderson avatar Jun 02 '16 08:06 gamaanderson

I've noticed the same behavior in the past, but I'm not sure how to fix that. Nice video tutorial.

I wonder if we could simply raise an Exception on a None return?

nguy avatar Jun 02 '16 14:06 nguy

@bdolan44 Could you pull the latest changes and ensure they work for you as well. We'll have to look at the select region code again to see if it can be optimized. If you can recreate the problem, could you select Reset Tools from the Toolbox menu on the Display to see if this clears the problem?

nguy avatar Jun 02 '16 15:06 nguy

She was able to recreate the problem again and Reset Tools did not seem to fix the problem.

bdolan44 avatar Jun 07 '16 15:06 bdolan44

I could not recreate it, without more information there is not much I can do. I would need as much information as possible, really everything.

gamaanderson avatar Jun 07 '16 21:06 gamaanderson

Dang! We'll keep looking.

nguy avatar Jun 08 '16 04:06 nguy

We are still encountering this (occasionally). My student states: "I tried restarting Artview, clicking reset tools under toolbox, resetting my polygon, etc. etc., still won't filter out bad data. I'm not outside of the parts where I should be able to do this, either. Here's the error I'm getting:

Traceback (most recent call last): File "/usr/local64/python-2.7/anaconda/lib/python2.7/site-packages/artview/plugins/manual_filter.py", line 181, in removeFromRadar data.mask[mask_ray, mask_range] = True TypeError: 'numpy.bool_' object does not support item assignment

I don't know if that's any more helpful....

bdolan44 avatar Aug 02 '16 18:08 bdolan44

this error looks a little more helpful than before, at least it is in the part of the code it should be. I will give it one more look.

gamaanderson avatar Aug 02 '16 23:08 gamaanderson

So, this appear to be a problem of the some what confusing / not well documented way numpy handle masked arrays. PR #160 may improve, but I'm not 100% sure.

One extra thing that I could do: this error is in a loop of fields, so we could add a try: there and if the error persist the function would still work in some fields. That however would create a silent error, so I'm not sure if it should be done.

gamaanderson avatar Aug 04 '16 19:08 gamaanderson

@bdolan44 I just accepted this fix from @gamaanderson Can you download the latest code base and test also?

nguy avatar Aug 05 '16 16:08 nguy

We will try it out and report back.

bdolan44 avatar Aug 08 '16 18:08 bdolan44

@bdolan44 Did this get resolved?

nguy avatar Aug 28 '17 21:08 nguy