cross correlation lfp with calcium data

hello,

i have lfp data (sampled with 2000hz) and fluorescence data (sampled with 125 hz) and i would like to cross correlate both (to show that fluorescence changes and lfp signales are correlated). how should i handle the data in igor?

thanks,
ferand
You'll want both sets of data to be sampled at the same rate.

Use the Resample dialog to increase the sampling rate of your 125 Hz data to 2000 Hz.

You can either use the "New Sampling Rate (Frequency)" to 2000,
or "Set to Same Rate as": lfp.

Select the wave to be resampled from the Wave(s) list AND CLICK the YELLOW DOWN ARROW to add the wave to the list of wave(s) to be resampled.

Then you can cross-correlate the two 2000 Hz waves.

--Jim Prouty
Software Engineer, WaveMetrics, Inc.
JimProuty wrote:
Use the Resample dialog to increase the sampling rate of your 125 Hz data to 2000 Hz.


My hunch would have been to downsample the 2000 Hz data to 125 Hz and then crosscorrelating the 125 Hz datasets. Is upsampling a better strategy?
741 wrote:
My hunch would have been to downsample the 2000 Hz data to 125 Hz and then crosscorrelating the 125 Hz datasets. Is upsampling a better strategy?

I would guess that Jim Prouty's method is better because it does not lose information from the 2000 Hz data. Properly adding interpolated points to the 125 Hz data should not significantly affect its spectral content. It adds no useful information to that signal but makes it compatible with the high-frequency data for convenient correlation methods.
s.r.chinn wrote:
741 wrote:
My hunch would have been to downsample the 2000 Hz data to 125 Hz and then crosscorrelating the 125 Hz datasets. Is upsampling a better strategy?

I would guess that Jim Prouty's method is better because it does not lose information from the 2000 Hz data. Properly adding interpolated points to the 125 Hz data should not significantly affect its spectral content. It adds no useful information to that signal but makes it compatible with the high-frequency data for convenient correlation methods.

But any high frequency features in the LFP data cannot be correlated with the fluorescence data, whether they're measurement noise or phenomenological. It's not clear to me there's any advantage to up-sampling over down-sampling here.
ikonen wrote:
But any high frequency features in the LFP data cannot be correlated with the fluorescence data, whether they're measurement noise or phenomenological. It's not clear to me there's any advantage to up-sampling over down-sampling here.

I agree that the low-frequency signal will filter out high-frequency features under correlation. However it is not clear to me that down-sampling the 2000 Hz signal will be equivalent. One would have to be sure of the difference between filtering characteristics. I would opt for Jim's method because there seems to be less ambiguity in that approach. Perhaps Jim should weigh in.
thank you very much, this was very helpful. is there any easy way to calculate a 95% significance level for a cross-correlation in igor?