Rating scale continuously

89 views
Skip to first unread message

vqz...@gmail.com

unread,
Jul 1, 2015, 4:35:05 PM7/1/15
to psychop...@googlegroups.com
Dear developers,

I need to continuously track the pain level during 4 mins and use store history in the rating properties. Everything looks good (the rating history looks correct) except at the end I get the following. It is not even a warning. Does this matter?
I'm a relative newbie to PsychoPy. Attached is what I used. Thanks for any suggestion. 

Traceback (most recent call last):
  File "C:\Qing\TN\tracking_pad\ratingScale_lastrun.py", line 263, in <module>
    dataOut=['n','all_mean','all_std', 'all_raw'])
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.82.01-py2.7.egg\psychopy\data.py", line 568, in saveAsExcel
    matrixOnly=matrixOnly)
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.82.01-py2.7.egg\psychopy\data.py", line 1019, in _createOutputArray
    tup = eval(strVersion) #convert back to a tuple
  File "<string>", line 1
    [(, 0.0), (1, 2.313), (2, 3.799), (3, 4.582), (4, 5.215), (5, 5.915), (6, 6.533), (7, 7.199), (6, 9.549), (5, 10.333), (4, 10.966), (3, 11.533), (2, 12.0), (1, 12.883), (2, 13.749), (3, 23.966), (4, 25.45), (5, 29.233), (6, 33.65), (7, 35.633), (6, 40.016), (5, 40.983), (4, 42.833), (5, 44.233), (6, 44.467), (7, 44.6), (6, 49.95), (5, 51.017), (4, 54.933), (3, 59.35), (2, 60.767), (1, 62.067), (2, 62.917), (3, 63.6), (4, 69.3), (5, 70.184), (6, 71.25), (7, 71.95), (6, 73.717), (5, 74.734), (4, 76.35), (3, 80.484), (2, 85.134), (1, 86.934), (2, 88.4), (3, 89.101), (4, 90.334), (5, 91.317), (6, 92.468), (7, 93.551), (6, 95.551), (5, 99.167), (4, 100.217), (3, 101.234), (2, 102.384), (1, 103.384), (2, 105.101), (3, 106.401), (4, 107.618), (5, 108.818), (6, 109.918), (7, 111.151), (6, 113.018), (5, 114.384), (4, 115.401), (3, 115.451), (2, 116.984), (1, 118.051), (2, 119.368), (3, 120.318), (4, 121.784), (3, 125.018), (4, 126.401), (5, 126.918), (6, 128.168), (7, 129.118), (6, 132.285), (5, 133.285), (1, 134.218), (2, 138.035), (3, 138.984), (4, 139.834), (6, 140.634), (5, 145.801), (4, 153.668), (3, 154.518), (2, 157.885), (1, 158.902), (2, 159.985), (3, 161.201), (4, 162.235), (5, 163.268), (6, 164.351), (5, 166.118), (4, 166.585), (3, 168.752), (2, 170.685), (1, 171.868), (2, 174.518), (3, 176.685), (4, 177.702), (5, 179.068), (6, 179.935), (7, 180.752), (6, 181.968), (5, 183.102), (4, 184.135), (3, 185.052), (2, 186.252), (1, 187.419), (2, 189.052), (3, 190.019), (4, 191.702), (5, 193.403), (6, 194.118), (7, 194.569), (7, 196.069)]
      ^
SyntaxError: invalid syntax

BTW: if too many history inputs the software will crashed. I am using the newest version of Phychopy on windows.

Qing 
ratingScale.psyexp

Jeremy Gray

unread,
Jul 1, 2015, 5:42:48 PM7/1/15
to psychop...@googlegroups.com
I suspect (not certain) that using saveAsExcel is part of the issue here. So try turning that off in the Experiment settings, data saving options. 

The issue is that the first part of the string that gets eval()'d "[(, 0.0), "  should have None in there, like "[(None, 0.0), " Not sure why it would get dropped.

--Jeremy

--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psychopy-user...@googlegroups.com.
To post to this group, send email to psychop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psychopy-users/07eb5a1d-601a-4af2-8ffe-5d4af823dedd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

vqz...@gmail.com

unread,
Jul 7, 2015, 12:33:45 PM7/7/15
to psychop...@googlegroups.com
Hi Jeremy,

Thanks for the suggestion. Looks like I need to go to the coder view to change the saving option.
If the history inputs more than about 150, the software will crashed when save as excel.

Qing

Jeremy Gray

unread,
Jul 7, 2015, 12:38:23 PM7/7/15
to psychop...@googlegroups.com
Thanks for the suggestion. Looks like I need to go to the coder view to change the saving option.

No, this is through the Builder view. Click on the icon with a double-headed white arrow on blue background (= Experiment settings), then click on the "Data" tab to show the options for saving. Uncheck "Save excel file"
 
If the history inputs more than about 150, the software will crashed when save as excel.

Maybe Excel format has a limit on characters per cell or something like that? Not sure.

--Jeremy

 

vqz...@gmail.com

unread,
Jul 8, 2015, 4:19:59 PM7/8/15
to psychop...@googlegroups.com
Hi Jeremy,

It works perfectly for me. Thank you so much.
I tried to save the history to a separate txt file and it also works. I think maybe too many inputs in one excel unit will cause this problem.

Is there any easy way to generate a video to show the subject their rating history within Psychopy? Now I only can use other screen recording software to record the whole rating process (about 10 mins). I have to stop the stimulus and do separate scan.
If I can do it within Psychopy will be optimal.

Thanks.

Qing

Jeremy Gray

unread,
Jul 8, 2015, 4:33:09 PM7/8/15
to psychop...@googlegroups.com
It works perfectly for me. Thank you so much.

Cool
 
I tried to save the history to a separate txt file and it also works. I think maybe too many inputs in one excel unit will cause this problem.

Good to know. 
 
Is there any easy way to generate a video to show the subject their rating history within Psychopy? Now I only can use other screen recording software to record the whole rating process (about 10 mins). I have to stop the stimulus and do separate scan.
If I can do it within Psychopy will be optimal.

It can definitely be done within PsychoPy, but you would have to write some code to do it; there's nothing built-in to "play back" a continuous rating. The way to approach it is to use the (rating, time) info to control a visual display, e.g., the height of a bar. The code to do this would be straightforward.

--Jeremy

 

vqz...@gmail.com

unread,
Jul 9, 2015, 1:22:14 PM7/9/15
to psychop...@googlegroups.com
Thanks

Not familiar with Python, work harder to do coding.

Qing
Reply all
Reply to author
Forward
0 new messages