DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Find first Max value and append previous channel values

Solved!
Go to solution

Hello, I would like to be able to analyze a channel to find the first maxima (inflection point) and then append the channel so that all prior values are equal to the maximum up to

the index where the maximum was found.

 

To explain better, in the attachment the original channel is Ych and the appended channel is Ych_appended.

 

Any help would be appreciated.

 

Thanks

0 Kudos
Message 1 of 3
(4,933 Views)
Solution
Accepted by topic author CVfactor

The functionality you are looking for would be best implemented by using DIAdem SCRIPT.

 

First, you can find the first maximum in a channel by using the ChnPeakFind function. The document below discusses how to use this:

 

http://digital.ni.com/public.nsf/allkb/DD069B95FB938C4286256FC8006A09CD?OpenDocument

 

The channels you specify in the function call will contain the x- and y-value of the first maxima. Then, you will just need to:

 

  1. Copy the original channel using ChnCopy.
  2. Find the value index in your original x-axis channel at which the peak occurs.
  3. Iterate through the newly copied channel, replacing the values in it with the peak value until you reach the value index found in step 2.

I hope this helps.

0 Kudos
Message 2 of 3
(4,887 Views)

Thanks Frank L.

 

I managed to do this by first finding the max peak and deleting all data prior to this. Then using the linear map function with the original X channel you

can re-generate the channel with constant values for the data that was deleted.

 

Thanks for the help.

0 Kudos
Message 3 of 3
(4,874 Views)