DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Good decimation function ?

Solved!
Go to solution

Hello,

 

I need to decimate some curves with DIAdem (the user specifies start time, duration, and increment time ; and then he runs decimation). I have tried the "reducing classification" function but it does not really performs what I need. This is what I get when generating a report excel after using "reducing classification" function (as you can see, there are some "blank lines") :

 

 

NameTemps (s)VSL1\Voie1_ReechVSL1\Voie2_Reech
Unit    
10,020037,7716E-161,5543E-15 
20,020090,587785251,1755705 
30,02015   
40,020210,951056521,90211303 
50,02027   
60,020330,951056521,90211303 
70,020390,587785251,1755705 
80,02045   
90,02051-1,6651E-15-3,3301E-15 
100,02057-0,58778525-1,1755705 

etc... 

 ============================

 

How can I do a real decimation efficiently ?

 

Thank you for any help...

 

Julien

0 Kudos
Message 1 of 7
(4,635 Views)

Hi Julien,

 

The Reducing Classification function is definitely the right place to be for decimation of data channels already loaded into DIAdem.  You specifically asked to input start time, increment time, and duration.  If you select the "Determination Mode" on the second (X-channel) dialog tab to be "Begin/Width/Range", then you can input exactly these quantities.  Were you not able to find this input mode, or were you able to find this input mode but were still unhappy with the results the ANALYSIS function returned?  If you're unhappy with the results, please explain what is wrong about them.  You posted 10 rows of values, but it's unclear if those were the original values or the values resulting from the Reducing Classification, or the decimated results you wish to get from DIAdem.

 

I really think we can get this to work for you,

Brad turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 2 of 7
(4,609 Views)

Hi,

 

Thank you for your help. I found the input mode you're talking about ("begin/width/range") but were still unhappy with the results the analysis function returned. The posted 10 rows of values were the values resulting from the reducing classification (without any other processing). And as you can see, for some X values (time), associated Y values are missing (it depends on input parameters).

 

Julien

0 Kudos
Message 3 of 7
(4,600 Views)

OK Julien,

 

Thanks for clarifying that the results are the problem and not the method of entering the set up parameters.  I certainly agree that missing values is non-optimal and quite surprising.  Still, it's hard to know what to make of the results without also seeing the original data and knowing the set up parameters you used to get those results.  Would you be willing to post an example data set and the set up parameters to reproduce this kind of effect?  You could alternatively email those files directly to me if you prefer (brad.turpin@ni.com).

 

Brad Turpin

DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 4 of 7
(4,589 Views)

Please see attached some files to show you my problem.

 

=> There is a TDMS file which can be loaded into DataPortal ; in this file there are 4 channels :

- Time

- Data

- Reducing Classification X (= Time after decimation)

- Reducing Classification Y (= Data after decimation)

=> You will also find the script that allowed me obtaining those results : as you can see, for some X values, associated Y values are equal to "NoValue".

 

I have to precise something : I was mistaken by explaining my problem. I do not use "begin/width/range" input parameters, I use "no/begin/range" input parameters (the user must specify start time, duration, and "decimation factor"...so I apologize for my first explanation wich was not very good...but maybe I would not have my problem by using "begin/width/range" function ? that could be a clue for finding a solution ?).

0 Kudos
Message 5 of 7
(4,568 Views)
Solution
Accepted by Julien_31

Hi krsone,

 

I have 2 solutions for you below, one based on Reducing Classification, the other based on Linear Mapping.  Let me know if you still have questions.

 

StartTime = 0.02
Duration  = 0.01
RedFactor = 2
Xchan = "[1]/Time"
Ychan = "[1]/[2]"
Period = ChD(2, Xchan) - ChD(1, Xchan)


ClassBegin      = StartTime
ClassWidth      = Period*RedFactor
ClassRangeWidth = Duration
Call ChnClassXRedXY(Xchan, Xchan, Ychan, "BeginWidthRange", "Mean", 0, 0, 0)


Points = CLng(Duration/(Period*RedFactor))
Call ChnLinGenImp("LinInterpX", Points, StartTime, Period*RedFactor)
Call ChnMapLinCalc(Xchan, Ychan, "[1]/LinInterpX", "LinInterpY", 1, "Y[bound.value]", NoValue, "analogue")

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

Message 6 of 7
(4,552 Views)

Thank you very much ! I will be on vacation next days but I'll try your solutions when I'm back. 🙂 I'll tell you wether it's OK or not (I suppose it should be OK).

 

Best,

 

Julien

0 Kudos
Message 7 of 7
(4,550 Views)