Ramdon fixation during biased toward the lower end

** OS: Win10
**PsychoPy version: 2020.2.8
**Standard Standalone? : Yes
What are you trying to achieve?: a randomized fixation duration between 1s and 2s

My issue:

I (a newbie) am learning Psychopy through building the original Posner Cueing Task where a fixation with a random duration between 1 to 2 seconds needs to be present right before the cue.

When building this fixation I created a new Routine with a just for the fixation itself, and a Routine including the cue, the target, and a response component is immediately after the fixation Routine.

For the fixation, I set the duration field in the Polygon component to be ‘duration(S) = random() + 1’ , and it starts at 0.0s.

However, when I analyze the excel sheet after a run to verify this randomized duration, the duration never exceeded 1.5 seconds with the longest duration of 1.38s. Since there were 50 trials, I am expecting about 25 trials to be over 1.5s, and that’s why I believe something went wrong.

Can anyone help me make a diagnosis?

random is a function from the numpy.random package:
https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.random.random.html

Which should generate a random number between 0 and 1 - so the fact that you’re only getting between 0 and 0.5(?) is very strange. Is the code that you shared exactly as written?

It may be that there’s something deeper going on with frame rates - so the requested duration may be between 1s and 2s, but because something is maybe out of sync it’s only presenting the stimulus for up to 1.8s. Check your settings in the Monitor Center and make sure that it all lines up with the spec of your monitor