Quest - Trying to emulate the Quest object from python

Hi felllow coders,

I am trying to emulate the QUEST implementation in C# to implement this adaptive procedure in a touch-screen app.

I understand that updating the psychometric function occurs by updating the Quest object defined below:

StairHandler.__init__(
            self, startVal, nTrials=nTrials, extraInfo=extraInfo,
            method=method, stepType='lin', minVal=minVal,
            maxVal=maxVal, name=name, autoLog=autoLog)

        self.startVal = startVal
        self.startValSd = startValSd
        self.stopInterval = stopInterval
        self._questNextIntensity = startVal
        self._range = range

        # Create Quest object
        self._quest = QuestObject_(
            startVal, startValSd, pThreshold, beta, delta, gamma,
            grain=grain, range=self._range)

However, I am struggling to understand how the Quest object is represented in Python i.e. whether it simply holds the information in the classic Weibull psychometric function
_e = -10**(beta * (x2 + xThreshold))
p2 = delta * gamma + (1-delta) * (1 - (1 - gamma) * exp(_e))

Does anyone know where I could get the documentation about the way Quest is updated?

Thank you very much!

As far as I can tell, the guts of the QUEST implementation are in psychopy/quest.py at release · psychopy/psychopy · GitHub (~line 286 for the initial computation of the posterior, and 358 for the update step).

If it’s of interest, I also have a work-in-progress implementation of QUEST+ (which I think is a superset of QUEST) written in C++ here, which might be directly accessible from C# with some glue code, e.g. CppSharp? Not sure if that would be even more trouble though…

Thank you for saving me hours of searching! Quest+ might be my next endeavour so your implementation will definitely come in handy then.