Welcome! Log In Create A New Profile

Advanced

Ending acquisiton of touchdata early

Posted by CptCook95 
Ending acquisiton of touchdata early
June 20, 2025 07:18PM
Hi Jaewon,

I am wondering if there is a method of stopping the acquisition of analog data at a specified point in the trial.

I ask this because I run a task that has an arbitrarily long post-trial period that I use to wait for the next subject to enter. This can be as short as a few seconds, to as long as a 30+ minutes. I suspect that this is causing the analog Data field to become enlarged proportional to the duration, and I am often noticing a variable ITI that I believe is due to this.

Please let me know if there is a way to do this, or if it is definitely not possible for the saving of the analog data to the trial to take a long period of time.

Thank you.
Re: Ending acquisiton of touchdata early
June 23, 2025 03:52PM
There is no way to stop data acquisition in the middle of a trial.

I do not know how you detect the entrance of the next subject, but you can put the related code in the 'trial_start' hook of the alert function, instead of the timing script, and hold the task there until the next subject is detected. Then, there is no need to worry about the data accumulation, since data is not acquired between trials (unless you turn on the ITI recording).
Re: Ending acquisiton of touchdata early
June 23, 2025 05:17PM
Hi Jaewon, thank you for the reply.

Your solution may work if it is possible to run a scene or display a .gif in on the subject screen during the alert function, which I don't think is the case.

I am currently running a scene which displays some rotating shapes to catch the attention of the animals. When they come close, a collar they wear is scanned by an RFID coil and stimuli are presented based on which task the subject is currently assigned.
Re: Ending acquisiton of touchdata early
June 23, 2025 09:49PM
You are right. If you display something, it cannot be moved to the alert function.

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.