Replies: 1 comment 1 reply
-
Hi @margo-tje, The Rsync_aligner expects the For example, when we are synchonising pyControl data with pyPhotometry signals, we use the times of the pulses generated by the pyControl system (in units of seconds since the start of the pyControl session) and the pyPhotometry sample numbers when the sync pulse input went high at the start of each pulse (so in units of samples since the start of the pyPhotometry recording). When setup this way the Rsync_aligner can be used to convert between pyControl times and pyPhotometry sample numbers. For an example of this see this ipython notebook. In your case you will need to compute the sample numbers on each system (licking data and pyPhotometry) when the sync pulses went high and use these as the pulse times for setting up the aligner. The aligner will then let you convert sample numbers from one system into those on the other system or vice versa. Thomas |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have been trying to use random pulses to synchronize my licking data (collected with Arduino) with my pyphotometry data.
The pulse I am generating (on Arduino) are randomly drawn from intervals 250 - 1500 ms and have a pulse length of 250 ms.
I receive the Licking data in ~50 Hz with a column 'rSync' being 0 and 1s to indicate the pulses.
In PyPhotometry, the pulses are also displayed as 0s and 1s with a sampling rate of 86 (3ex2em).
I am a bit confused how to work with Rsync_aligner(). I keep getting the error: 'RsyncError: No match found between inter-pulse interval sequences.' I have tried 'auto' units, and also 1000/86 or 1000/50 units respectively.
Happy to hear your thoughts.
Beta Was this translation helpful? Give feedback.
All reactions