Skip to content

Commit

Permalink
DOC: revise hints in builder components
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremygray committed Jul 20, 2014
1 parent 08b4268 commit fe6cc50
Show file tree
Hide file tree
Showing 12 changed files with 1,166 additions and 303 deletions.
6 changes: 3 additions & 3 deletions psychopy/app/builder/components/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

# only use _localized values for label values, nothing functional
_localized = {'name': _('Name'), # fieldName: display label
'startType': _('startType'), 'stopType': _('stopType'),
'startVal': _('startVal'), 'stopVal': _('stopVal'),
'startEstim': _('startEstim'), 'durationEstim': _('durationEstim')
'startType': _('start type'), 'stopType': _('stop type'),
'startVal': _('Start'), 'stopVal': _('Stop'),
'startEstim': _('Expected start (s)'), 'durationEstim': _('Expected duration (s)')
}

class BaseComponent(object):
Expand Down
3 changes: 2 additions & 1 deletion psychopy/app/builder/components/cedrusBox.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ def __init__(self, exp, parentName, name='buttonBox',
self.url = "http://www.psychopy.org/builder/components/cedrusButtonBox.html"
self.exp.requirePsychopyLibs(['hardware'])

self.params['correctAns'].hint = _("What is the 'correct' response? NB, keys are labelled 0 to 6 on a 7-button box")
self.params['correctAns'].hint = _("What is the 'correct' response? NB, buttons are labelled 0 to 6 on a 7-button box. Enter 'None' (no quotes) if withholding a response is correct. Might be helpful to add a correctAns column and use $thisTrial.correctAns")
self.params['correctAns'].valType = 'code'
self.params['allowedKeys'].hint = _('Keys to be read (blank for any) or key numbers separated by commas')
self.params['deviceNumber'] = Param(deviceNumber, valType='code', allowedTypes=[],
updates='constant', allowedUpdates=[],
hint=_("Device number, if you have multiple devices which one do you want (0, 1, 2...)"),
Expand Down
2 changes: 1 addition & 1 deletion psychopy/app/builder/components/grating.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __init__(self, exp, parentName, name='grating', image='sin', mask='None', sf
self.params['phase']=Param(phase, valType='code', allowedTypes=[],
updates='constant', allowedUpdates=['constant','set every repeat','set every frame'],
hint=_("Spatial positioning of the image on the grating (wraps in range 0-1.0)"),
label=_localized['tex'])
label=_localized['phase'])
self.params['texture resolution']=Param(texRes, valType='code', allowedVals=['32','64','128','256','512'],
updates='constant', allowedUpdates=[],
hint=_("Resolution of the texture for standard ones such as sin, sqr etc. For most cases a value of 256 pixels will suffice"),
Expand Down
2 changes: 1 addition & 1 deletion psychopy/app/builder/components/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# only use _localized values for label values, nothing functional:
_localized = {'image': _('Image'), 'mask': _('Mask'),
'texture resolution': _('Texture resolution'),
'flipVert': _('Flip vert'), 'flipHoriz': _('Flip horiz'),
'flipVert': _('Flip vertically'), 'flipHoriz': _('Flip horizontally'),
'interpolate': _('Interpolate')
}

Expand Down
3 changes: 2 additions & 1 deletion psychopy/app/builder/components/ioLabs.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ def __init__(self, exp, parentName, name='bbox',
self.order = ['forceEndRoutine', 'active', #NB name and timing params always come 1st
'lights', 'store', 'storeCorrect', 'correctAns']

self.params['correctAns'].hint = _("What is the 'correct' response? NB, keys are labelled 0 to 7 on a 8-button box")
self.params['correctAns'].hint = _("What is the 'correct' response? NB, buttons are labelled 0 to 7 on a 8-button box. Enter 'None' (no quotes) if withholding a response is correct. Might be helpful to add a correctAns column and use $thisTrial.correctAns")
self.params['store'].allowedVals = ['last button', 'first button', 'all buttons', 'nothing']
self.params['store'].hint = _('Choose which (if any) responses to store at end of a trial')
self.params['active'] = Param(active, valType='code', allowedTypes=[],
updates='constant', allowedUpdates=['constant','set every repeat'],
hint=_("Active buttons, such as '1,6', '(1,2,5,6)' or '0' (without quotes)"),
Expand Down
9 changes: 5 additions & 4 deletions psychopy/app/builder/components/keyboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
_localized = {'allowedKeys': _('Allowed keys'),
'discard previous': _('Discard previous'),
'store': _('Store'),
'forceEndRoutine': _('Force end of routine'),
'forceEndRoutine': _('Force end of Routine'),
'storeCorrect': _('Store correct'),
'correctAns': _('Correct answer')
}
Expand Down Expand Up @@ -46,17 +46,18 @@ def __init__(self, exp, parentName, name='key_resp', allowedKeys="'y','n','left'
hint=_("A comma-separated list of keys (with quotes), such as 'q','right','space','left' "),
label=_localized['allowedKeys'])

# hints say 'responses' not 'key presses' because the same hint is also used with button boxes
self.params['discard previous']=Param(discardPrev, valType='bool', allowedTypes=[],
updates='constant', allowedUpdates=[],
hint=_("Do you want to discard any keypresses occuring before the onset of this component?"),
hint=_("Do you want to discard all responses occuring before the onset of this component?"),
label=_localized['discard previous'])
self.params['store']=Param(store, valType='str', allowedTypes=[],allowedVals=['last key', 'first key', 'all keys', 'nothing'],
updates='constant', allowedUpdates=[],
hint=_("Choose which (if any) keys to store at end of trial"),
hint=_("Choose which (if any) responses to store at the end of a trial"),
label=_localized['store'])
self.params['forceEndRoutine']=Param(forceEndRoutine, valType='bool', allowedTypes=[],
updates='constant', allowedUpdates=[],
hint=_("Should the keypress force the end of the routine (e.g end the trial)?"),
hint=_("Should a response force the end of the Routine (e.g end the trial)?"),
label=_localized['forceEndRoutine'])
self.params['storeCorrect']=Param(storeCorrect, valType='bool', allowedTypes=[],
updates='constant', allowedUpdates=[],
Expand Down
1 change: 1 addition & 0 deletions psychopy/app/builder/components/microphone.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def __init__(self, exp, parentName, name='mic_1',
hint=_("Record two channels (stereo) or one (mono, smaller file)"),
label=_localized['stereo'])
self.params['stopType'].allowedVals = ['duration (s)']
self.params['stopType'].hint = _('The duration of the recording in seconds; blank = 0 sec')
def writeStartCode(self,buff):
# filename should have date_time, so filename_wav should be unique
buff.writeIndented("wavDirName = filename + '_wav'\n")
Expand Down
2 changes: 1 addition & 1 deletion psychopy/app/builder/components/movie.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
tooltip = _('Movie: play movie files')

# only use _localized values for label values, nothing functional:
_localized = {'movie': _('Movie file'), 'forceEndRoutine': _('Force end Routine')}
_localized = {'movie': _('Movie file'), 'forceEndRoutine': _('Force end of Routine')}

class MovieComponent(VisualComponent):
"""An event class for presenting movie-based stimuli"""
Expand Down
2 changes: 1 addition & 1 deletion psychopy/app/builder/components/polygon.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
tooltip = _('Polygon: any regular polygon (line, triangle, square...circle)')

# only use _localized values for label values, nothing functional:
_localized = {'nVertices': _('N vertices'),
_localized = {'nVertices': _('Num. vertices'),
'fillColorSpace': _('Fill color-space'), 'fillColor': _('Fill color'),
'lineColorSpace': _('Line color-space'), 'lineColor': _('Line color'),
'lineWidth': _('Line width'),
Expand Down
1 change: 1 addition & 0 deletions psychopy/app/builder/components/sound.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def __init__(self, exp, parentName, name='sound_1', sound='A',volume=1,
self.exp.requirePsychopyLibs(['sound'])
#params
self.params['stopType'].allowedVals = ['duration (s)']
self.params['stopType'].hint = _('The maximum duration of a sound in seconds')
self.params['stopVal'].hint = _("When does the component end? (blank to use the duration of the media)")
self.params['sound']=Param(sound, valType='str', allowedTypes=[],
updates='constant', allowedUpdates=['constant','set every repeat'],
Expand Down
Loading

0 comments on commit fe6cc50

Please sign in to comment.