05-18-2006 04:45 PM
05-19-2006 03:40 AM
05-19-2006 04:22 AM
05-19-2006 10:26 AM
05-19-2006
10:57 AM
- last edited on
11-25-2025
07:45 PM
by
Content Cleaner
Here's an oldie but a goodie. You can tell the age of this document by some of the screenshots, but the information is still valid and generally very useful. This is a good one to bookmark for later. Enjoy!
05-29-2006 08:41 AM
05-29-2006 02:11 PM
11-10-2006 09:24 AM
@dakeddie wrote:
Hi, I wrote a labview routine to perform a multiple tau autocorrelation on a large array of integers. A multi tau autocorrelation is a way to reduce the computation time of the correlation but at the expense of resolution. You can taylor the multitau correlation to give you good resolution where you need it. For instance, I require good resolution near the middle (the peak) of the correlation, so I do a linear autocorrelation for the first 64 channels from the peak, then I skip every second channel for the next 32, then skip every 4th channel for 32 more, then skip every 8th for 32 channels... etc.
Originally, I wrote my own multitau calculation, but it took several hours to perform for just 1024 channels of the correlation of around 2million points of data. I need to actually do the the correlation on probably 2 billion or more points of data, which would take days. So then I tried using labview's AutoCorrelation.vi which calls a library function. It could do a linear autocorrelation with 4 million points in less than a minute. I figured that writing my code in C and calling it using a call library function node would be faster, but that much faster?
Finally, I wrote some code that extracts the correlation data points that I would've got from my multitau code from the linear correlation function that I get from the AutoCorrelation.vi. Clearly this is not optimal, since I spend time calculating all those channels of the correlation function just to throw them away in the end, but I need to do this because the final step of my procedure is to fit the correlation function to a theoretical one. With say 2million points, the fit would take too long. The interesting thing here is that simply extracting the 1024 point from the linear autocorrelation function takes a significant amount of time. Is labview really that slow?
So, my questions are... if I rewrite my multitau autocorrelation function in C and call it using a call library function node, will it run that much faster? Can I achieve the same efficiency if I use a formula node structure? Why does it take so long just to extract 1024 points from an array?
I've tried hiding indicators and this speeds things up a little bit, but not very much.
I'll attach my code if you're interested in taking a look. There is a switch on the front panel called 'MultiTau'... if in the off position, the code performs the linear autocorrelation with the AutoCorrelation.vi, if in the on position, it performs a multitau autocorrelation using the code I wrote. Thanks for any help.
01-03-2007 06:57 AM
06-26-2019 08:00 AM
The code is attached to the first post in the thread.