klabhub / neurostim

Design and run visual neuroscience experiments using Matlab and the Psychophysics Toolbox.
MIT License
5 stars 4 forks source link

Stimulus offsets not logged when ending experiment with "esc" #129

Closed adammorrissirrommada closed 5 years ago

adammorrissirrommada commented 5 years ago

Ending an experiment early by pressing "esc" drops out of the trial loop but doesn't call the afterTrial() functions. One consequence is that the offsets of stimuli are not logged for the last trial. @bartkrekelberg , do you see any negative consequence of moving this line to after afterTrial() is called?

https://github.com/klabhub/neurostim-ptb/blob/e1c7c4ce6111f143d7746f88b20dd4ffd9ffc15d/%2Bneurostim/cic.m#L1112

bartkrekelberg commented 5 years ago

I don't see any negative consequences. So yes, please move it.

adammorrissirrommada commented 5 years ago

Fixed in commit e1c7c4ce6111f143d7746f88b20dd4ffd9ffc15d