psychopy.org | Reference | Downloads | Github

Rounding fractions of a frame

If this template helps then use it. If not then just delete and start from scratch.

**OS: Windows 7:
**PsychoPy version 2

There is a mismatch between my intertrial interval component in a dot-probe task and my conditions file. The component duration is set to stop on frame N as defined in the conditions file, but a mistake in the conditions file lists the available duration lengths as 0.0, 0.1, 0.2, and 0.3. These durations were chosen under the assumption the intertrial interval component would be set to seconds rather than frames. Since the study has already collected data, I want to know whether PsychoPy rounds all these durations down to zero frames or rounds (0.1, 0.2, and 0.3) up to 1 frame.

So, how does PsychoPy round fractions of a frame?

Thank you for the assistance!

Hi There,

This is an interesting one! I would assume that it might be rounded up but I wouldn’t be sure - you should be able to tell though if the stimulus appeared very very briefly or it it didn’t appear at all - is it possible to tell that way?

Thanks,
Becca

Becca,
Thanks for the input and suggestion. I can’t be sure if the intertrial interval stimulus (a plus sign) appears here because the stimulus actually continues from the previous trial component (i.e., the plus sign is already on the screen). It is hard to tell if the stimulus is on screen for an extra 16.7 ms (1 frame).

-Nathan

Hi Nathan - can you remove the previous trial component just to test it?

Thanks,
Becca

Becca, thanks for the suggestion, I should have started with testing it!

I ran some tests and found that PsychoPy rounds any fraction of a frame up to 1 frame, as the frame appeared even when the duration was set to as low as 0.1 frame. I also looked at the log file, which appears to confirm that the intertrial interval was on the screen for about 16 ms, so one frame.

Thanks again,
Nathan