Skip to content

Commit

Permalink
TEST: adjust Patch interpolate
Browse files Browse the repository at this point in the history
- a bug in upstream/master meant the reference profile was not right
- fix: adjust the profile to how it should be for a fixed version of PatchComponent
- revert to categ=advanced for sf and phase
- no need to fetch icons in getAllComponents
  • Loading branch information
jeremygray committed Jul 19, 2014
1 parent b30f022 commit 841d385
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions psychopy/app/builder/components/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
class PatchComponent(VisualComponent):
"""An event class for presenting image-based stimuli"""
def __init__(self, exp, parentName, name='patch', image='sin', mask='None', sf='None', interpolate='None', #'linear',
def __init__(self, exp, parentName, name='patch', image='sin', mask='None', sf='None', interpolate='linear',
units='from exp settings', color='$[1,1,1]', colorSpace='rgb',
pos=[0,0], size=[0.5,0.5], ori=0, phase=0.0, texRes='128',
startType='time (s)', startVal=0.0,
Expand Down Expand Up @@ -46,11 +46,11 @@ def __init__(self, exp, parentName, name='patch', image='sin', mask='None', sf='
self.params['sf']=Param(sf, valType='code', allowedTypes=[],
updates='constant', allowedUpdates=['constant','set every repeat','set every frame'],
hint=_("Spatial frequency of image repeats across the patch, e.g. 4 or [2,3]"),
label=_localized['sf'])
label=_localized['sf'], categ="Advanced")
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 patch (in range 0-1.0)"),
label=_localized['phase'])
label=_localized['phase'], categ="Advanced")
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
4 changes: 2 additions & 2 deletions psychopy/tests/test_app/test_builder/x.out.master.de55d49
Original file line number Diff line number Diff line change
Expand Up @@ -1134,9 +1134,9 @@ PatchComponent.pos.allowedVals: []
PatchComponent.pos.allowedUpdates: ['constant', 'set every repeat', 'set every frame']
PatchComponent.pos.updates: constant
PatchComponent.pos.valType: code
PatchComponent.interpolate.default: 'None'
PatchComponent.interpolate.default: 'linear'
PatchComponent.interpolate.staticUpdater: None
PatchComponent.interpolate.val: None
PatchComponent.interpolate.val: linear
PatchComponent.interpolate.allowedTypes: []
PatchComponent.interpolate.allowedVals: ['linear', 'nearest']
PatchComponent.interpolate.allowedUpdates: []
Expand Down
11 changes: 6 additions & 5 deletions psychopy/tests/test_app/test_builder/x.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,19 @@
# or compare against a prior run (x.out.master.de55d49)

# current target file is x.out.master.de55d49, which is the output of this script --out
# as run on pustream/master branch @ de55d49, with two edits to fix known changes
# introduced by refactoring in the current branch (nVertices 4, customizeEverything)
# as run on upstream/master branch @ de55d49, with edits to fix known changes
# introduced by refactoring in the current branch: nVertices 4, customizeEverything,
# Patch interpolation 'linear'

# need a wx.App?
# should not need a wx.App with fetchIcons=False
try:
allComp = getAllComponents()
allComp = getAllComponents(fetchIcons=False)
except:
import wx
tmpApp = wx.PySimpleApp()
try: from psychopy.app import localization
except: pass # not needed if can't import it
allComp = getAllComponents()
allComp = getAllComponents(fetchIcons=False)

exp = builder.experiment.Experiment()

Expand Down

0 comments on commit 841d385

Please sign in to comment.