Forum
Register Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
Jaewon

Administrator
Registered:
Posts: 492
Reply with quote  #1 
Someone asked me at SfN about storing behavioral signals during the ITI. It is also an issue discussed in one of the original ML papers (Asaad & Eskandar, 2008b). I looked into this a bit.

It is not difficult writing code to do so, but there is one problem. The clock speeds of the DAQ board and the computer are not the same. I tested it on two computers with two NI PCIe-6323 boards. In both computers, the speed of NI boards is slightly faster by ~2.7 ns.

It may not look like a big difference, but what this means is, if you continuously collect data at 1 KHz, there will be one more sample acquired every 370000 samples (= ~6 min 10 sec). One trial typically shorter than 6 minutes and ML2 resets the clock every trial, so it should not be a problem in most cases. However, if recording continues for several hours without stopping during the ITIs, the accumulated error will be big enough to be a problem.

I think we can solve this either by resampling data after recording is finished or by simply discarding extra sample points from time to time. Does anybody have a thought about this?

0
kms

Junior Member
Registered:
Posts: 29
Reply with quote  #2 
Hi Jaewon, 

In the extreme scenario of >6 mins of ITI, discarding extra sample points from time to time seems like a good idea. How do you propose to execute this?

Thanks.

0
Jaewon

Administrator
Registered:
Posts: 492
Reply with quote  #3 
It is the whole trial length, not just the ITI, that matters to this calculation. I also found a case that the NI board is slower by 8.5 ns than the system clock. So it is possible that you get less numbers of NI samples sometimes.

In either case, we need to avoid the temporal error being accumulated and therefore cannot just concatenate all samples collected with two different clocks. I think we can make a small adjustment each trial, assuming that one trial is not too long for the temporal error to be accumulated.

In every trial, we compare the time elapsed from the beginning of the recording and the total number of the samples collected so far. The difference between those two numbers should be 0 most of time or 1 once every a few minutes. If we have one more NI sample, then we discard it. If we have one less, we can interpolate.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.