![]() ![]()
#Psychopy scale description code:Authors: - 2010 Jeremy Gray: original code and on-going updates - 2012 Henrik Singmann: tickMarks, labels, ticksAboveLine - 2014 Jeremy Gray: multiple API changes (v1.80.00) """ def _init_ ( self, win, scale = '', choices = None, low = 1, high = 7, precision = 1, labels = (), tickMarks = None, tickHeight = 1.0, marker = 'triangle', markerStart = None, markerColor = None, markerExpansion = 1, singleClick = False, disappear = False, textSize = 1.0, textColor = 'LightGray', textFont = 'Helvetica Bold', showValue = True, showAccept = True, acceptKeys = 'return', acceptPreText = 'key, click', acceptText = 'accept?', acceptSize = 1.0, leftKeys = 'left', rightKeys = 'right', respKeys = (), lineColor = 'White', colorSpace = 'rgb', skipKeys = 'tab', mouseOnly = False, noMouse = False, size = 1.0, stretch = 1.0, pos = None, minTime = 0.4, maxTime = 0.0, flipVert = False, depth = 0, name = None, autoLog = True, ** kwargs ): # catch obsolete args """ :Parameters: win : A :class:`~` object (required). If your response box sends keys 1-4, you could specify left, right, and accept keys, and not need a mouse:: ratingScale = visual.RatingScale( win, low=1, high=5, markerStart=4, leftKeys='1', rightKeys = '2', acceptKeys='4') **Example 3**: Categorical ratings can be obtained using choices:: ratingScale = visual.RatingScale( win, choices=, markerStart=0.5, singleClick=True) For other examples see Coder Demos -> stimuli -> ratingScale.py. **Example 1**: A basic 7-point scale:: ratingScale = visual.RatingScale(win) item = while ratingScale.noResponse: item.draw() ratingScale.draw() win.flip() rating = ratingScale.getRating() decisionTime = ratingScale.getRT() choiceHistory = ratingScale.getHistory() **Example 2**: For fMRI, sometimes only a keyboard can be used. Direction keys (left, right) will move the marker in the smallest available increment (e.g., 1/10th of a tick-mark if precision = 10). The subject can use the mouse or keys to respond. The experimenter has to draw the item to be rated, and handle `escape` to break or quit, if desired. A RatingScale instance has no idea what else is on the screen. #Psychopy scale description fullThe Builder RatingScale component gives a restricted set of options, but also allows full control over a RatingScale via the 'customize_everything' field. Multiple scales can be displayed at the same time, and continuous real-time ratings can be obtained from the history. The appearance and function of elements can be customized by the experimenter it is not possible to orient a rating scale to be vertical. #Psychopy scale description how toThere are five main elements of a rating scale: the `scale` (text above the line intended to be a reminder of how to use the scale), the `line` (with tick marks), the `marker` (a moveable visual indicator on the line), the `labels` (text below the line that label specific points), and the `accept` button. You can call the ``getRating()`` method anytime to get a rating, ``getRT()`` to get the decision time, or ``getHistory()`` to obtain the entire set of (rating, RT) pairs. When the subject accepts a selection, ``.noResponse`` goes ``False`` (i.e., there is a response). ``draw()`` displays the rating scale, handles the subject's mouse or key responses, and updates the display. A RatingScale instance is a re-usable visual object having a ``draw()`` method, with customizable appearance and response options. Class RatingScale ( MinimalStim ): """A class for obtaining ratings, e.g., on a 1-to-7 or categorical scale. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |