QUEST staircase

OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): v3.0.4
Standard Standalone? (y/n) Yes
What are you trying to achieve?: I want to build a 2AFC QUEST staircase that adjusts the gabor contrast to achieve a 75% accuracy threshold for participants.

What did you try to make it work?: I used the “psychophysicsStairsInterleaved” demo and changed the loop stairType to QUEST and changed the .csv file with parameters for QuestHandler.

What specifically went wrong when you tried that?:

Traceback (most recent call last):
File “C:\Users\Quantum\Documents\Projects\staircase\”, line 320, in
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\data\”, line 1532, in addResponse
self.currentStaircase.addResponse(result, intensity)
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\data\”, line 905, in addResponse
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\data\”, line 1045, in _checkFinished
self.confInterval(True) < self.stopInterval):
TypeError: ‘<’ not supported between instances of ‘numpy.ndarray’ and ‘str’

So I was able to get the staircase to run my removing a few parameters. A picture of what parameters worked is attached. However, the contrast does not seem to be adjusting as can be seen in the picture of the .csv file. I also attached pictures of the settings of the gabor I am using.

I’m having the same problem; I’ve an experiment I’m trying to run that consists of 100 dots with directions sampled from a Gaussian distribution- I want the SD of this distribution to increase/decrease as per the staircase. I’ve got the experiment to run, but in my case, the SD is not updating with each response.

Did you ever manage to find a solution to this problem?

if you add a code component and in the end routine tab type

thisExp.addData('level', level)

what happens?

If you could share the .psyexp file that would be great.

Hi, having been unable to access PsychoPy (or any related files) due to a network problem, I’m finally back in! As requested, I’ve uploaded the .psyexp file, as well as the .csv file containing the QUEST parameters, and the .csv file containing the experiment output. I hope this helps. Any suggestions would be greatly appreciated.

dotStim_QUEST.csv (113 Bytes)
GaussTest.psyexp (17.9 KB)
_GaussTest_2021_Apr_17_0808.csv (377 Bytes)

Hi There,

I think I see the problem here - there is a quotation mark after “quantile” in the method column of your dotStim_QUEST.csv (i.e. it reads quantile'). Please could you remove it and see if the task behaves as you expect?

I notice that currently an error isn’t thrown if the method is not ‘mean’, ‘mode’ or ‘quantile’ — PsychoPy v2021.1 so we can add that in to control for cases like this.

Hope this helps,

FYI I have put in a pull request to raise an error to avoid users encountering this in future - thanks for bringing it to our attention! Add error for incorrectly requested QUEST methods by RebeccaHirst · Pull Request #3780 · psychopy/psychopy · GitHub

1 Like

Hi Becca, that’s cracked it! Thank you so much.

It’s worth mentioning for anyone reading this with similar issues, you still need the following code if you want to see each level of the staircase in the output .csv:

thisExp.addData('level', level)
thisExp.nextEntry()# add a new row to the output file

Also, I needed to add a value for ‘range’ in the excel file containing the QUEST parameters, otherwise the trials progress in very small increments (e.g., 0.000001).

Thanks again for all the help!

1 Like

Hello, I am also building a QUEST staircase to achieve a contrast sensitivity threshold.

Could you explain the range of possible values for each of the variables; particularly, startVal and level? I have set “foregroundColor” to “level” but I see options to set color to Psychopy RGB [-1:1], Normalized RGB [0:1], and 8-bit RGB [0:255]. I cannot tell which of the three "level’ refers to.

I want the contrast to change from high to low but the direction of the staircase is not consistent. I often end with a high contrast stimulus.

Side note, when I get one staircase to work, I’d like to have 3 interleaved staircases, starting with high contrast, medium contrast, or low contrast.

Would appreciate insight on how the value range of these numbers, thanks!

(Nevermind, I figured this out. Thanks! I was just not using a variable denoting the correct answer before).