09-14-2005 02:44 PM
09-15-2005 01:53 AM
09-15-2005 03:54 PM
Thanks for the reply but that is not exactly what I was looking for. What I have is a time channel and a data channel and I want to
create 2 new channels with every 100th point. It looks like we will be writing a function.
Thanks,
Jim
09-15-2005 07:01 PM
09-15-2005 07:01 PM
06-23-2014 12:51 PM
Hi Brad,
I am still having problems with this. I have also read what you wrote here http://forums.ni.com/t5/DIAdem/Good-decimation-function/td-p/1138235
Basically, I am going to disagree with you and hope that you can show me that I am wrong.
You said "...is able to pull out every 100th point for you..." I cant make the function do that.
I have 4001 lines of data in two channels, one a time channel and one a data channel. The time channel has evenly spaced times from 0 to 0.4 at 0.0001 time step (10 kHz sampling).
I can use Reducing Classification to resample this data to a 100 Hz sampling (401 data points from t=0 to t=0.4 with 0.001 timestep) by using Reducing Classifcation (with X-channel settings: Determination Mode--> Begin/End/Width, Begin --> -0.0005, End -->0.4005, width 0.001) But the only thing that makes sense in the "Reduction Mode" setting is "MEAN". Thus, it actually takes the mean of the 10 values surrounding each new time and reports them in that time.
I do not want that.
I want another reduction mode called "VALUE" or something, that does what you say...just gives me the value...i.e. I dont want to average the signal from t= -0.0005 to t=+0.0005 to give me the value at t=0, I just want it to take the value at t=0 and return it (forgetting about the other 10 values around).
Show me that I dont know what I am talking about!!! PLEASE!!!
06-24-2014 10:45 AM
Hi jrk3z,
On closer inspection, I have to admit I was wrong about the reducing classification function. The "Quantity" option counts the number of values, it doesn't pull the Nth value unchanged. However, DIAdem 2014 has a new function call "Resampling" which looks like it does what you want for data that is already loaded.
If you're loading data from file, though, then you should be able to load with data reduction and get the Nth value behavior you're looking for.
IntervalValue = 100 Call DataDelAll DataFilePath = "C:\Users\Public\Documents\National Instruments\DIAdem 2012\Data\Example.tdm" Call DataFileLoadSel(DataFilePath, "TDM", "[1]/*") Call DataFileLoadRed(DataFilePath, "TDM", "[1]/*", "IntervalWidth", IntervalValue, 1)
Brad Turpin
DIAdem Product Support Engineer
National Instruments
06-24-2014 10:56 AM
Hi Brad,
I will definitely try v2014 for the new functions. I need to check if we have a license.
For the loading data, that is an interesting idea...unfortunately though, the data I want to resample resulted from several calculations done in diadem. I guess I could spit out hte data in CSV, and then re-load it with data reduction, but it seems pretty bass-ackwards to do it this way...
Thanks for your help though!
Jason
06-24-2014 02:24 PM
Hi jrk3z,
DIAdem 2014 isn't officially released yet, but you could sign up for the Beta program. If you decide to spit out the data with DataFileSaveSel(), I'd recommend sending it to a temporary TDM file instead of CSV-- it will perform way faster AND preserve all your properties.
Brad Turpin
DIAdem Product Support Engineer
National Instruments