Getting data from all trials in a staircase

Hi
I’m trying to get access to data but haven’t quite figured it out.

  • I’ve got a trial loop running a staircase called staircase_trials.
  • I’ve got variables such as staircase_trials.intensity, staircase_trials.response, etc which are being saved in the .csv output of PsychoPy.

But I’m trying to get these values (all previous trials) at the end of each trial, to do something with them.Based on this thread How to read data from generated excel during the task I tried the things below, but they all fail.

staircase_trials.intensity = fails
staircase_trials.data.intensity = fails
staircase_trials.data['intensity'] = fails
staircase_trials['intensity'] = fails

I had a look here http://www.psychopy.org/api/data.html#stairhandler, but it’s not clear what holds the data nor how to get at it.