Chicago LabVIEW User Group

취소
다음에 대한 결과 표시 
다음에 대한 검색 
다음을 의미합니까? 

Help with an Algorithm

Hi Everyone.  I'm not sure if this is really the most appropriate place to ask this but I figured I'd ask locally first. 

 

I'm trying to come up with a simple algorithm to select 2 points from a data set to be used for a baseline correction. Initially the points were being selected visually by the user picking the points out on a graph, but this has proven to give inconsistent results because everyone picks different points out of the data.  The idea is to pick the lowest points before the data is 5% of the maximum, and then the lowest point after the data returns to 5% of the maximum.  BUT..... sometimes the data has multiple peaks, and looks like a rollercoaster, and the lowest point after the maximum could be halfway through the data set and a great portion of the data would be cut off. 

 

Selecting the first point is pretty straightforward and I have that nailed down.  The second point is where I'm looking for some input from folks who know more than me.

 

My thought is to reverse the array and find the lowest point before the data starts to rise above that 5% mark, but if anyone has a simpler idea I'm happy to hear it.

 

I'm attaching a PDF of a graph as an example of what I'm dealing with.  I wasn't given the raw data to work with. 

https://www.youracclaim.com/badges/7af733bc-832f-47fe-aaa6-9df19dddd73b/public_url
0 포인트
1/3 메시지
2,967 조회수

It's not obvious to me what the requirements are, and the 5% of max bit seems to over complicate things.

 

Find the max value, split the graph in half at that point. Find the min value of each data set. If that min value is greater than 5% of the max value, then no valid min value found. Otherwise you're done?

 

I'd suggest drawing out some sample data sets and walking through how you would do it by hand, then translate that into logical rules.

 

The before and after max value points seem to follow the same rules, so if you can find the min before, then reversing the data and using the same logic should find the min after. Unless there are assumptions about the data, such as the first peak is always the highest, which you are taking into account. Good luck

0 포인트
2/3 메시지
2,936 조회수

It would probably help to attach a simple VI containing a problematic dataset.

0 포인트
3/3 메시지
2,927 조회수