Clear Filters
Clear Filters

How to reconcile PTBs 'GetSecs' with Matlab's 'now'?

5 views (last 30 days)
Hello! I inherited some task code that uses Psychtoolbox (PTB) to show various images on a screen during an fMRI experiment. The synchronization of the MRI data with the stimulus presentation is handled by a single pulse from the scanner. The pulse is recorded using PTB's KbWait function. After that the onset times of all blocks are recorded via writing the 'now' value to a logfile. The now value can be converted to a datetime object and read out - though PTB's KbWait relies on GetSecs which as far as I know returns the value (in seconds, with precision) from the time of system startup.
Is there any way for me to get these two sets of values into the same format? I don't know when the system started up that day so the value returned by GetSecs seems useless? Any help would be appreciated if I can't sync the data to stimulus I'll have to throw away this dataset :(
I am using 2020b, the task was carried out using 2017a
Further Information:
The pulse time returned by GetSecs = 1.163322498366500e+06
A stimON value in the log file = 7.382064341012850e+14

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!