Welcome! Log In Create A New Profile

Advanced

sync with neural recording

Posted by haoran 
sync with neural recording
June 26, 2023 06:45PM
Dear Jaewon,

I have a question related to the synchronization between monkeylogic with wireless neural recording. My wireless neural recording system accepts an input clock signal for synching, eg 1MHz or 1KHz square wave, which I hope I can generate from the NI card on which monkeylogic is running. I am wondering if the trial time stamps in the bhv2 files are synched to the NI card clock, or to the PC time? If it is the former, then I can rely on the trial time stamps, because both behavior and wireless neural recording are based on the same clock. Does this plan seem feasible to you at all?

Another question is, is there a way to let monkeylogic record continuously without ITI? I want to use it as a continuous recorder of NI digital inputs.

Thanks so much for the help!
Re: sync with neural recording
June 27, 2023 12:38PM
I do not understand how you do the synchronization with square waves. If they are periodic pulses, how can you tell when a particular pulse was generated?

Does your wireless system save data locally (e.g., to a memory card) or remotely (e.g., by transmitting the signals to the base station through the air)? Do you need to feed the square waves to the wireless device (i.e., the head implant)?

NIMH ML records continuously, if you turn on the ITI recording option. The data will be split and stored by the trial, but you can put them back into one continuous stream with the mlconcatenate function. If the ITI recording is on, the ITI start time is regarded as the start time of the next trial during experiments.
https://monkeylogic.nimh.nih.gov/docs_MainMenu.html#Task
https://monkeylogic.nimh.nih.gov/docs_RuntimeFunctions.html#mlconcatenate
Re: sync with neural recording
June 27, 2023 07:20PM
Thanks so much for the reply! I didn't know MonkeyLogic can record ITI and concatenate into continuous data! That's very helpful to know.

My wireless recording system uses a periodic signal to calibrate its clock. It is not recording this signal but just to use it to sync with the master clock. So I am wondering if I could use MonkeyLogic and the NI card to generate the master clock signal (ie FREQ_OUT pin). Then the question is how precise MonkeyLogic's behavior file's time. Is it based on the NI card's clock, or the PC time got from the MATLAB? Suppose the wireless logger is synched with the clock on the NI card and I recorded the recording trigger time in MonkeyLogic, can I reliably get the stimulus onset time from bhv2 file? Before switching to wireless, I sent event marks from MonkeyLogic to the recording computer, which records both event marks and the neural signal.

Please let me know how you think if it is feasible. Thanks!
Re: sync with neural recording
June 27, 2023 10:21PM
You did not answer my questions about how your system works. Is your device a wireless logger attached on the subject's head? Does it save data to a memory card? How do you deliver the master clock signal to the wireless logger?
Re: sync with neural recording
July 01, 2023 10:40AM
Is your device a wireless logger attached on the subject's head?
Yes.

Does it save data to a memory card?
Yes, the data is saved on the animal's head.

How do you deliver the master clock signal to the wireless logger?
The wireless logger communicates with a USB antenna, which has a BNC connector receives the master clock signal input.

Thanks a lot!
Re: sync with neural recording
July 17, 2023 01:20PM
I think there is a bit of misunderstanding about what the master clock signal does. From your description, I believe this master clock is an external sample clock, not a synchronization or reset signal. Do you have any test result or the manufacturer's manual about how the master clock is used in the logger?

We may still use it to sync events, if ML begins to send out the master clock signal when a task starts. However, NI boards use different clocks for data acquisition and pulse generation, so we will need to record the master clock signal in ML and calculate time from pulse counts, which requires additional devices and makes things complicated.

More importantly, clock synchronization is difficult in wireless recording because of the delay in wireless transfer. It is the same matter, whether you retrieve a signal from the logger or send one to it. Do you know how long does it take for the logger to communicate with the antenna?
Re: sync with neural recording
July 17, 2023 02:19PM
Thanks a lot for the reply!
In that sense, I will set up another recording device to record the monkeylogic event markers and the wireless recording start triggers, and at the same time to send out sync clock signal to the wireless logger.

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.