Rating Scale in Builder?

304 views
Skip to first unread message

MarcB

unread,
Mar 21, 2011, 1:04:16 PM3/21/11
to psychopy-users
Hi there,
has anyone got experience in how to use the rating scale in the
Builder environment?
I assume it would have do be done via a code component, and I can get
it to work to some limited extent, but the mouse arrow is not visible
when I do it that way.

Thanks,
marc

MarcB

unread,
Mar 21, 2011, 1:33:41 PM3/21/11
to psychopy-users
OR, an alternative way to achieve what I need to do would be to modify
the keyboard response component such that it allows (and displays) a
multi-key response, and terminates and records upon the subject
pressing return.

TO put it differently, I need that subjects can give ratings from 0 to
1000, and am stuck as to how to do this in builder.
ANyone any bright ideas?

Many thanks,
Marc

Jeremy Gray

unread,
Mar 21, 2011, 1:39:54 PM3/21/11
to psychop...@googlegroups.com
Hi Marc,

to have a visible mouse, you can try using the attached version of settings.py, and put it in psychopy/app/builder/components/ replacing the existing one. then restart psychopy, and click experiment settings (the blue icon with the double headed arrow), and click the "Show mouse" checkbox at the bottom. then I think (but am not positive) that your rating scale code component will have a visible mouse. I am pretty sure that this version of settings.py is going to be included in the next release of psychopy, so its not something you'll have to hassle with every update.

fyi, I'm making a rating scale component for the builder, to avoid the need to use a code component. it will be easier to use, but not allow nearly as much customization as a code component (which might be a good thing!) if you'd be willing to take it for a test-drive, that would be cool. just let me know.

I just saw your other email. I'll think about adding a multi-key response (e.g., "293"), where the first digit takes you to hundreds, second = tens, third = ones, if the key presses come quickly enough in time. no promises. using the mouse will be much faster for you.

best,

--Jeremy



--
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.


settings.py

Jonathan Peirce

unread,
Mar 21, 2011, 1:51:32 PM3/21/11
to psychop...@googlegroups.com
FYI: I hope to have a major release (1.64?) out in a week or two that will contain Jeremy's new rating scale component. Building major (rather than patch) releases is always a slight headache though, so it might take a little longer.

Jon
-- 
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.

Jeremy Gray

unread,
Mar 21, 2011, 2:07:25 PM3/21/11
to psychop...@googlegroups.com
(replying to the whole list, just in case its useful)

thanks for that -- yes, I'd love to take the builder scale for a test drive.

cool. I'll let you know
 
I don't understand where I need to drop the file you uploaded, though.
Is it in the Library or where? I am on a Mac...

if you are using the StandAlone version, and installed it to /Applications/PsychoPy2.app
try doing this: save the new one to your desktop, then open a terminal window and copy-paste:
  cp ~/Desktop/settings.py /Applications/PsychoPy2.app/Contents/Resources/lib/python2.6/psychopy/app/builder/components/settings.py
or replace the '/Applications/PsychoPy2.app' part with the place where you installed the StandAlone version

you might want to make a backup copy of your current settings.py first, but my advice is not to bother. the new file should be pretty safe to use, and you can always reinstall the StandAlone version if something goes awry (quite unlikely, I think, but ...).

if that does not work, try doing this (copy & paste) from the terminal:
   find /Applications/PsychoPy2.app/ | grep settings.py
and look through the output for the right place to copy to.

--Jeremy




thanks,
marc
>  settings.py
> 9KViewDownload

Jeremy Gray

unread,
May 11, 2011, 8:05:18 AM5/11/11
to psychop...@googlegroups.com
Hi Marc

thanks for checking it out. I'm replying to the list, in case anyone else has the same questions (bug in low/high, how to use customize-everything)

I had a play with the new rating scale in builder.
It seems that the dialog box ignores any values put into the low and high fields -- I always get a 7 point scale regardless of what I put in there.

Can you confirm that?

yes, that's a bug, drat. should be easy to fix. meanwhile, a work-around fix for this is below, using customize-everything. I'll make a proper fix, and hopefully an auto-update in the relatively near future will clear it up.
 
Also, with the customize everything option -- does that literally overwrite EVERYTHING that's in the dialog fields, or just where there is conflict between the contents?

it does overwrite most dialog fields--everything that gets passed to RatingScale. so the tool-tip pop-up hint is not completely accurate, because some of the dialog fields are not passed to RatingScale, and so those are not overwritten. I see not that its not at all clear just from the dialog which ones are which. the following four are not passed to RatingScale (and so are supposed to be unaffected by customize-everything):
startTime
forceEndTrial
storeRatingTime
storeRating

if the customize-everything field contains anything at all, those contents are used as if they are a code component to make a rating scale. other RatingScale parameters that have been "set" through the dialog are ignored, whether they conflict or not. so if you customize one, you need to "customize" all the non-default ones you want (= set them explicitly in the customize everything box).

the easiest way to see the proper syntax for the "other ones", enter the values you want in the dialog, then under the Tools menu, do Compile (or F5), to convert the Builder expt into python code in the Coder. that code will contain a line that looks something like this:

rating=visual.RatingScale(win=win, escapeKeys=['escape'], displaySizeFactor=1.00,
    pos=[0.0, -0.4], scale='test scale')

from that line, ignore the first part: "rating=visual.RatingScale(win=win,"

copy and paste the rest of the line into the "customize everything" box in the builder:
    escapeKeys=['escape'], displaySizeFactor=1.00,
    pos=[0.0, -0.4], scale='test scale'

and, at long last, here you can add your desired low and high settings:
    low=0, high=17,

best,

--Jeremy
Reply all
Reply to author
Forward
0 new messages