05-28-2010 10:03 AM
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") :
Name | Temps (s) | VSL1\Voie1_Reech | VSL1\Voie2_Reech | |
Unit | ||||
1 | 0,02003 | 7,7716E-16 | 1,5543E-15 | |
2 | 0,02009 | 0,58778525 | 1,1755705 | |
3 | 0,02015 | |||
4 | 0,02021 | 0,95105652 | 1,90211303 | |
5 | 0,02027 | |||
6 | 0,02033 | 0,95105652 | 1,90211303 | |
7 | 0,02039 | 0,58778525 | 1,1755705 | |
8 | 0,02045 | |||
9 | 0,02051 | -1,6651E-15 | -3,3301E-15 | |
10 | 0,02057 | -0,58778525 | -1,1755705 |
etc...
============================
How can I do a real decimation efficiently ?
Thank you for any help...
Julien
Solved! Go to Solution.
05-31-2010 03:04 AM
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
05-31-2010 03:49 AM
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
05-31-2010 10:21 AM
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
06-01-2010 03:21 AM
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 ?).
06-01-2010 11:41 AM
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
06-01-2010 12:08 PM
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