The documentation for the QuestHandler staircase says that threshold is measured using a Weibull psychometric function. This psychometric function is a function of " intensity or a contrast (in log10 units)".
In the example given in the documentation the minVal and maxVal parameters, and the output, are used in such a way that suggests they refer directly to contrast, not to contrast in log10 units. E.g. minVal is set to 0, instead of some very large negative number, and the output of the staircase is used directly to set the contrast.
Therefore, I am wondering which, if any, parameters and outputs use intensity/contrast on a log10 scale and which not.
Thanks you very much for any thoughts or advice, and apologies if I have misunderstood something here.
Looking at the code, it should all be in the same units as the starting value, and I think they’re all log10 units for QuestHandler. You can use QuestPlusHandler and specify whether they’re log, decibel, or linear if you want to be absolutely sure.
Thank you very much for thinking about this and for taking a look into the code. I will try with the QuestHandler based on the assumption of log10 units and see if I can get consistent results.
Hi, sorry to revive this post - did you figure it out if the Startval/minVal etc etc has to be indicated in log10 units?
Hey,
I tried the thresholding with startVal, minVal and maxVal all in log units, and also worked from the assumption that the intensities returned by the staircase are also in log10 units. Thresholding based on this seemed to work well.
I also plotted the fitted Weibull assuming that the fitted value of the threshold is in log10 units, substituted this in the equation given in the documentation, and compared this to the presented log intensities and responses. These seemed to give consistent results.
I did not check that the plotting/comparison fails under alternative assumptions, and we have not tested extensively.
Hope that is of some help!
Here is the code for the plot.
plt.figure()
colors = ['C0', 'C1', 'C2']
lines = []
for i_cond, this_label in enumerate(label):
xVals = np.linspace(log_values['minVal'], log_values['maxVal'], num=200)
delta = multi_stair.staircases[i_cond].delta
gamma = multi_stair.staircases[i_cond].gamma
epsilon = multi_stair.staircases[i_cond].epsilon
beta = multi_stair.staircases[i_cond].beta
log_thresh = multi_stair.staircases[i_cond].mean()
print(f'Value of log-threshold: {log_thresh}')
exponent = np.exp(-np.power(10, beta * (xVals - log_thresh + epsilon)))
fittedWeibull = (delta*gamma) + ((1-delta)*(1-((1-gamma)*exponent)))
this_line = plt.plot(xVals, fittedWeibull, color=colors[i_cond])
lines.append(this_line[0])
plt.scatter(logIntensities[this_label], responses[this_label],
color=colors[i_cond])
plt.legend(lines, pThreshold)
plt.show()
log_values['minVal']
and log_values['maxVal']
are the minVal and maxVal used in logarithmic units. multi_stair
contains multiple QuestHander staircases (each with their own label in label
). logIntensities[this_label]
contains the sequence of intensities generated by one of the staircases (the staircase with the label this_label
). responses[this_label]
contains the corresponding participant responses.