On 25/10/2011 12:53, Stefano Guidi wrote:
> Hi all,
>
> I'm trying to implement an experiment in PsychoPy for measuring the
> JND luminance contrast threshold for a small gabor patch, using the
> built-in StairHandler. I've been able to set up a working pilot
> version of my experiment, using the following code (adapted from the
> coder demo):
>
> staircase = data.StairHandler(startVal = .50,
> stepType = 'lin',
> stepSizes=[.08,.04,.04,.02,.02,.01,.01],
> minVal=.001, maxVal=.50,
> nUp=1, nDown=3,
> nTrials=50)
>
I've added some indices (n) to your trials below to try and explain.
> However, when at the end I look at the text file with the list of
> trials (produced with the code in the demo), responses and increments,
> I've noticed that sometimes the step size is decreased after 2
> reversals, sometimes after just one.
In your case the only time that the step size changes after a single
reversal is the first one, occurring at the 1st incorrect response.
> Also the print-out of the list of the reversals (from print
> staircase.reversalIntensities) is somehow strange, as for the first
> reversal the reported intensity value is the one at which the reversal
> happened (incorrect response), while for the second reversal the
> reported intensity is the one of the trial after the reversal.
No, the 2nd reversal occurred when you first got it correct 3 times (on
n=10) in a row after the first incorrect (on n=7). That's the trial when
the value starts going down again whereas it was going up before. The
intensity at that trial is correctly reported as 0.01.
> Does anyone have any idea about what might be happening? ANd can
> anyone help me understand better the stepSizes parameter, when used
> with a list?
In your case you have a step size of 0.08 until the first reversal (n=7)
it then uses a step 0.04 for two reversals, then a step size of 0.02 for
two reversals etc until you reach 0.01 and it stays with that step size
until the end.
does that make sense now?
Jon
>
> I report below the list of trials (in the text file) and the list of
> reversals (from the output):
>
> n targetOrd contIncrement correct
> 0 -1 0.500 1
> 2 1 0.420 1
> 3 1 0.340 1
> 4 1 0.260 1
> 5 -1 0.180 1
> 6 1 0.100 1
> 7 -1 0.020 0
> 8 1 0.100 1
> 9 1 0.100 1
> 10 1 0.100 1
> 11 1 0.060 1
> 12 1 0.060 1
> 13 1 0.060 0
> 14 1 0.100 1
> 15 -1 0.100 1
> 16 -1 0.100 1
> 17 1 0.080 1...
>
> reversals:
> [0.019999999999999934, 0.099999999999999936, 0.059999999999999935,
> 0.099999999999999936, 0.039999999999999925, 0.099999999999999908,
> 0.079999999999999918, 0.1099999999999999]
>
> Hope someone can help. Thanks in advance,
>
> Stefano Guidi
> University of Siena
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "psychopy-users" group.
> To post to this group, send email to psychop...@googlegroups.com.
> To unsubscribe from this group, send email to
> psychopy-user...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/psychopy-users?hl=en.
--
Dr. Jonathan Peirce
Nottingham Visual Neuroscience
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
To post to this group, send email to psychopy-users@googlegroups.com.
To unsubscribe from this group, send email to psychopy-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/psychopy-users?hl=en.
--
Dr. Jonathan Peirce
Nottingham Visual Neuroscience
http://www.peirce.org.uk/
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To post to this group, send email to psychopy-users@googlegroups.com.
To unsubscribe from this group, send email to psychopy-users+unsubscribe@googlegroups.com.
On 25/10/2011 15:33, Stefano Guidi wrote:
> Hi Jon,
>
> thanks for your quick response, now it makes much more sense! But
> there is one thing (see below) I still have a few doubts on, can you
> tell me if I got it right?
>
> You say that after the first incorrect response the step changes in
> size, but at the next trial (n=8) the intensity goes up of .08. Then,
> after three correct response at the same stimulus level (0.100) the
> stairs starts to go down again, and it is now that the new step size
> (.04) begin to be used. I was thinking that the reduced step size
> should have been used also for calculating the intensity value of the
> trial after the first incorrect response.
Ah, yes. Actually the very first reversal is a little special. Usually
the start point for a staircase is put well away from the expected
convergence point. But then you don't want to keep waiting for 3
reversals to go downwards. So in the first section of the staircase the
step occurs with every correct answer irrespective of what you have for
nUp/nDown and the very first reversal is then sort of ignored. Think of
that first section as just getting into the neighbourhood. ;-)
> I think I had also mistaken the definition of reversal, thinking was
> only happening after an incorrect response, while sometimes (i.e at
> the 3rd consecutive correct response after the intensity level was
> increased due to an incorrect response) it is reversal also after a
> correct response.
If you plot the staircase intensities (including with reversal points)
that might make it clearer. Hmm, maybe I should improve the plot
staircase demo to show that....
Jon