LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data stitching

Has anybody done data stitching in labview, meaning having to sets of data
and combining the relevent parts of the data together?


Rob
0 Kudos
Message 1 of 10
(3,769 Views)
Rob wrote:

> Has anybody done data stitching in labview, meaning having to sets of data
> and combining the relevent parts of the data together?
>
> Rob

Rob,
I think we need a little more information on this. This all depends on how
the data sets are
stored (clusters, arrays, etc) and what you want to do with them. There are a
number of
array and cluster tools, that when used in loops are very powerful.

Can you be more specific?
Kevin Kent
0 Kudos
Message 2 of 10
(3,769 Views)
well the data will be stored in 3 separate arrays , the first array for the
first "scan" the second for the second "scan" and the third for the third
"scan". Each array has data with a different a "peak" and i need to combine
those "peaks" into one array.

Rob

Kevin B. Kent wrote in message
news:3991ADCD.1B1A6479@usa.alcatel.com...
> Rob wrote:
>
> > Has anybody done data stitching in labview, meaning having to sets of
data
> > and combining the relevent parts of the data together?
> >
> > Rob
>
> Rob,
> I think we need a little more information on this. This all depends on how
> the data sets are
> stored (clusters, arrays, etc) and what you want to do with them. There
are a
> number of
> array and cluster tools, that when used in loo
ps are very powerful.
>
> Can you be more specific?
> Kevin Kent
>
0 Kudos
Message 3 of 10
(3,769 Views)
Rob wrote:

> well the data will be stored in 3 separate arrays , the first array for the
> first "scan" the second for the second "scan" and the third for the third
> "scan". Each array has data with a different a "peak" and i need to combine
> those "peaks" into one array.
>
> Rob
>

Rob,

Well I dont see this as a major task, it may take some tweaking to get where
you want to be.

I am making some assumptions here to illustrate the process. If these are wrong
the process
is still valid, but may need some work.
Assume:
Three 1D arrays, each array has one "peak" (i.e. there is only ONE maximum
value per array)

Process:
Use the "Array Max & Min" function. This returns the value AND the index.
Do this for each of the arrays. Use the "Build Array" fun
ction (with 3
nodes) and
connect the max value from each search to a node. This will build a 1D array
with 3 elements. The elements will be in the order that they are wired to the
"Build Array" function.

The "Array Max & Min" works on multi-dimensional arrays. Be aware that
this works on the actual number, and not what is displayed. (i.e if you show
2 digits of precision, but the numbers have 10 it will look at all 10 )
If 2 numbers are the same it will return the FIRST one.

the process is similar if there are multiple peaks in each array, you have to
do some array manipulation to remove the found peak and search for the next
one.

Another process could use the "Sort 1D Array". This ONLY works on 1D arrays
the last element in the output array will be the largest (ie ascending order ,
lowest to highest)

Hope this helps
Kevin Kent
0 Kudos
Message 4 of 10
(3,769 Views)
Thank you very much this helped alot.


Rob
Kevin B. Kent wrote in message
news:3991C734.27D4E2A3@usa.alcatel.com...
> Rob wrote:
>
> > well the data will be stored in 3 separate arrays , the first array for
the
> > first "scan" the second for the second "scan" and the third for the
third
> > "scan". Each array has data with a different a "peak" and i need to
combine
> > those "peaks" into one array.
> >
> > Rob
> >
>
> Rob,
>
> Well I dont see this as a major task, it may take some tweaking to get
where
> you want to be.
>
> I am making some assumptions here to illustrate the process. If these are
wrong
> the process
> is still valid, but may need some work.
> Assume:
> Three 1D arrays, each array has one "peak" (i.e.
there is only ONE maximum
> value per array)
>
> Process:
> Use the "Array Max & Min" function. This returns the value AND the index.
> Do this for each of the arrays. Use the "Build Array" function (with 3
> nodes) and
> connect the max value from each search to a node. This will build a 1D
array
> with 3 elements. The elements will be in the order that they are wired to
the
> "Build Array" function.
>
> The "Array Max & Min" works on multi-dimensional arrays. Be aware that
> this works on the actual number, and not what is displayed. (i.e if you
show
> 2 digits of precision, but the numbers have 10 it will look at all 10 )
> If 2 numbers are the same it will return the FIRST one.
>
> the process is similar if there are multiple peaks in each array, you have
to
> do some array manipulation to remove the found peak and search for the
next
> one.
>
> Another process could use the "Sort 1D Array". This ONLY works on 1D
arrays
> the last element in the output array will be the largest (i
e ascending
order ,
> lowest to highest)
>
> Hope this helps
> Kevin Kent
>
>
0 Kudos
Message 5 of 10
(3,769 Views)
Actually aI drew an example of a peak, and i want to add the data between
the 2 thick lines to another array, is this possible with the method you
indicated but with some tweeking?


Rob
Kevin B. Kent wrote in message
news:3991C734.27D4E2A3@usa.alcatel.com...
> Rob wrote:
>
> > well the data will be stored in 3 separate arrays , the first array for
the
> > first "scan" the second for the second "scan" and the third for the
third
> > "scan". Each array has data with a different a "peak" and i need to
combine
> > those "peaks" into one array.
> >
> > Rob
> >
>
> Rob,
>
> Well I dont see this as a major task, it may take some tweaking to get
where
> you want to be.
>
> I am making some assumptions here to illustrate the p
rocess. If these are
wrong
> the process
> is still valid, but may need some work.
> Assume:
> Three 1D arrays, each array has one "peak" (i.e. there is only ONE maximum
> value per array)
>
> Process:
> Use the "Array Max & Min" function. This returns the value AND the index.
> Do this for each of the arrays. Use the "Build Array" function (with 3
> nodes) and
> connect the max value from each search to a node. This will build a 1D
array
> with 3 elements. The elements will be in the order that they are wired to
the
> "Build Array" function.
>
> The "Array Max & Min" works on multi-dimensional arrays. Be aware that
> this works on the actual number, and not what is displayed. (i.e if you
show
> 2 digits of precision, but the numbers have 10 it will look at all 10 )
> If 2 numbers are the same it will return the FIRST one.
>
> the process is similar if there are multiple peaks in each array, you have
to
> do some array manipulation to remove the found peak and search for the
next
> one
.
>
> Another process could use the "Sort 1D Array". This ONLY works on 1D
arrays
> the last element in the output array will be the largest (ie ascending
order ,
> lowest to highest)
>
> Hope this helps
> Kevin Kent
>
>
0 Kudos
Message 6 of 10
(3,769 Views)
Rob wrote:

> Actually aI drew an example of a peak, and i want to add the data between
> the 2 thick lines to another array, is this possible with the method you
> indicated but with some tweeking?
>
>

What you are wanting is a band pass filter. If you have the "advanced
Analysis" vis
you are in luck since there are several good filtering VIs available. If you
don't have
them you can come up with your own using the standard LabVIEW functions, but
it may be torturous.

If you have these give em a try if not send again ans we can talk more about
it.

Kevin Kent

BTW the filter VIs work on 1D but that should not be a problem.
0 Kudos
Message 9 of 10
(3,769 Views)
oops forgot to include the picture

Kevin B. Kent wrote in message
news:3991C734.27D4E2A3@usa.alcatel.com...
> Rob wrote:
>
> > well the data will be stored in 3 separate arrays , the first array for
the
> > first "scan" the second for the second "scan" and the third for the
third
> > "scan". Each array has data with a different a "peak" and i need to
combine
> > those "peaks" into one array.
> >
> > Rob
> >
>
> Rob,
>
> Well I dont see this as a major task, it may take some tweaking to get
where
> you want to be.
>
> I am making some assumptions here to illustrate the process. If these are
wrong
> the process
> is still valid, but may need some work.
> Assume:
> Three 1D arrays, each array has one "peak" (i.e. the
re is only ONE maximum
> value per array)
>
> Process:
> Use the "Array Max & Min" function. This returns the value AND the index.
> Do this for each of the arrays. Use the "Build Array" function (with 3
> nodes) and
> connect the max value from each search to a node. This will build a 1D
array
> with 3 elements. The elements will be in the order that they are wired to
the
> "Build Array" function.
>
> The "Array Max & Min" works on multi-dimensional arrays. Be aware that
> this works on the actual number, and not what is displayed. (i.e if you
show
> 2 digits of precision, but the numbers have 10 it will look at all 10 )
> If 2 numbers are the same it will return the FIRST one.
>
> the process is similar if there are multiple peaks in each array, you have
to
> do some array manipulation to remove the found peak and search for the
next
> one.
>
> Another process could use the "Sort 1D Array". This ONLY works on 1D
arrays
> the last element in the output array will be the largest (ie as
cending
order ,
> lowest to highest)
>
> Hope this helps
> Kevin Kent
>
>



[Attachment peakexample.bmp, see below]
0 Kudos
Message 7 of 10
(3,769 Views)
Rob wrote in message news:3992c13d@newsgroups.ni.com...
> oops forgot to include the picture


Quite a nasty peak. How are the lines defined at either side? The left is at
the baseline but the right is at the shoulder?

Kevin's method will give you the max of the peak, giving you the X
co-ordinate of the peak. You can then split the array at that point (split
1D array or array subset depending on dimensionality), and get all the data
to the left in one array, and all the data to the right in another. If my
assessment of where the lines are is valid, then to get the left hand side
of the array you could then use the "threshold 1D array" function to find
the point at which the value is, say, 1% or less of the peak value and split
the left array at that point.

To find the right hand boundary will be more difficult- perhaps you could
find the second differential of the line and find the X co-ord of the maxima
in that, which will give you the position of the sharp shoulder, then cut
the right hand array that point.

Join the two arrays and you get a single array containing one peak- do this
for all three and you get three arrays each containing a peak.

How you merge those three depends very much on what the three peaks are,
which is something you still haven't gone into much detail on- I assume
they're all the same physical peak but from different measurement ranges.
Therefore if you simply overlap the three arrays on one plot, you'll see
three different peaks due to measurement inaccuracy in both the X and Y
values. If this is fine, then you simply need to append the three sets of X
and Y arrays to get your final data array and then sort them- one option for
sorting would be to have your data stored as a 1D array of datapoints, where
each datapoint is a cluster of X and Y values- you can then use the "Sort 1D
array" function.

If the measurement inaccuracy is a problem, then you have to come up with a
normalisation scheme to scale the X and Y data in each set. Precisely how
this is done depends too much on the nature of the data to even consider
without knowing more.
0 Kudos
Message 10 of 10
(3,769 Views)
btw they are 2D arrays
Kevin B. Kent wrote in message
news:3991C734.27D4E2A3@usa.alcatel.com...
> Rob wrote:
>
> > well the data will be stored in 3 separate arrays , the first array for
the
> > first "scan" the second for the second "scan" and the third for the
third
> > "scan". Each array has data with a different a "peak" and i need to
combine
> > those "peaks" into one array.
> >
> > Rob
> >
>
> Rob,
>
> Well I dont see this as a major task, it may take some tweaking to get
where
> you want to be.
>
> I am making some assumptions here to illustrate the process. If these are
wrong
> the process
> is still valid, but may need some work.
> Assume:
> Three 1D arrays, each array has one "peak" (i.e. there is only ONE ma
ximum
> value per array)
>
> Process:
> Use the "Array Max & Min" function. This returns the value AND the index.
> Do this for each of the arrays. Use the "Build Array" function (with 3
> nodes) and
> connect the max value from each search to a node. This will build a 1D
array
> with 3 elements. The elements will be in the order that they are wired to
the
> "Build Array" function.
>
> The "Array Max & Min" works on multi-dimensional arrays. Be aware that
> this works on the actual number, and not what is displayed. (i.e if you
show
> 2 digits of precision, but the numbers have 10 it will look at all 10 )
> If 2 numbers are the same it will return the FIRST one.
>
> the process is similar if there are multiple peaks in each array, you have
to
> do some array manipulation to remove the found peak and search for the
next
> one.
>
> Another process could use the "Sort 1D Array". This ONLY works on 1D
arrays
> the last element in the output array will be the largest (ie ascending
order ,
>
lowest to highest)
>
> Hope this helps
> Kevin Kent
>
>
0 Kudos
Message 8 of 10
(3,769 Views)