08-18-2016 04:46 AM
Hello guys,
I am trying to get peak index from one plot to let me to calculations with this index.
The problem I got is when I have very long signal in graph (around 2h signal with dt=0.002), and I put the max scale to low values to view clearly each peak, The cursor doesnt works and show several lines... I would like to know if I can fix it.
I attached one example. If you load it and put the graph to show from 0 to 10, you can click in each peak detected (red points) perfectly. But If you fix the scale from 0 to 5. You will see that the cursor no works like it is supposed.
This is only one example, In my data I need block of 2h and the plot 1 takes 500 samples/sec.
When I charge my data I need to put at least from 0 to 2'30" to be able to click in each point.
Is possible fix it to use lower scale max?. I would like to use from 0 to 20s at least.
Best Regards.
08-19-2016 01:02 AM - edited 08-19-2016 01:05 AM
I tested your VI and I see your problem. After bringing the cursor to the most-left, and making the X-scale from 0 to 5, I try to drag the cursor with the mouse, but it just disappears, and go far to the right based on the cursor value indicator... If I use a 0 to 10 scale, it works fine even with dragging...
I would consider this as a bug (tested with LV 2014 and 2015, same results):
As a temporary workaround, instead of clicking or dragging on the Graph itself, you could just use little "cursor navigator" panel (no idea what is the official name for this?) to move the cursor, it works:
08-19-2016 08:11 AM
Yes, Thanks for take your time!.
It seems a bug when you try to show only 5 seconds in the graph. Yes de cursor button you can use to move but it appears in the middle of data. It is not functional for use with large data.
You can use right click in cursor legend and put 'Go to cursor ' or 'Bring to the middle', if you go there yo can click in peaks but it doenst works properly.
No way to fit it?.
Regards.
08-19-2016 08:39 AM
Yes, looks buggy. Same in 2016. Haven't studied it in detail, though.
(...even after fixing some of the weird things. (Why is there a regular and a filtering even for the same thing (mouse down & mouse down?), what's the purpose of the inner case? Is't it always true (sorry, the boolean output is not even described in the help...)
08-19-2016 08:57 AM
Yes, sad No way to fix it.
About the weird things:
1- The inner case, you are right. I copied the example from forum and try to use to my case.
I dont check it, it is not neccesary.
2- The doble case with down? and down. IF I dont put it, the index of peak detected is not update.
I got the idea from here:
Its true he used Mouse move and mouse down!.
Then there is no way to fix the problem?.
Thanks For help!.
08-19-2016 09:09 AM
Sorry, I don't have time at the moment, but since your x scale is linear (equally spaced), you might try a waveform graph instread of an xy graph. To mark the peaks, you could change all other points to NaN for the second graph or even use annotations. Then you could find the closest peak on mouse down and set the cursor there. No guarantees, of course.
08-19-2016 09:10 AM
Btw, If I remove the event structure with the cursor and I try to move the cursor it works even in the range 4s. So maybe there is some problem with the event structure getting coordinates.
08-19-2016 09:18 AM - edited 08-19-2016 09:21 AM
Thanks for your time!.
I understand what you mean. But my proposal in this vi is to remove bad peaks and add peaks manually too. I did and works. I added one event structure case when I push one button to remove peaks, I click the peak. Look at the index of plot1 and remove from the array the peaks detected.
When I want to add one peak, I need to push one button that change the cursor plot to 0 and I can set the point undetected from plot0 and add this point in array peaks of plot1.
It works fine, the only problem is the main topic error.
I normally works with fragments of 2 data hours. If I can't fix the scale to 20/25s width I can`t see correctly whenthe pulse is bad or good to add/remove and then it is not practical.
08-19-2016 09:34 AM
08-19-2016 11:15 AM
Hi altenbach,
I tried the idea you exposed in the previous post.
But I didnt get it works.