I want to consult about a subject that I can't get out of. I am working on an event related design using the backward masking paradigm in fMRI. However, paradigm code and TRs are not synchronized. The flow of the code actually depends on TRs. So the flow of the code is locked to 6. As each TR arrives, it advances the code as if 6 was pressed. As a result, there should be no slippage between code and fMRI. However, the shift duration between computer and MR changes in all sessions. For example, there is a difference of 2 TR in the one, 5 TR in the other, and 8 TR in the other. If anyone has encountered such a problem or has a suggestion, it would be greatly appreciated. How can I solve this problem?
Note: I have written the code in Psychtoolbox.