If this template helps then use it. If not then just delete and start from scratch.
Mac OSX 10.15
PsychoPy version2020.1.2
**Standard Standalone? (Y) If not then what?:Standalone
**What are you trying to achieve?: Create a NoiseStim (with NoiseComponent) and use the output as the input for a ImageStim Component. The noise will be a phase scrambled version of an image. The original image must be a power of 2 (E.G. 512 X 512). I can create that either with builder (preferred) or short code segment. But then I would like to crop the output of that to 416 x 315 pixels. In code (or builder) I can do something like this:
distractor = visual.NoiseStim(
win=win, name=‘distractor’,units=‘pix’,
noiseImage=‘Stimuli/cowLeftCropped.jpg’, mask=None,
ori=0, pos=[0,0], size=(512,512), sf=None,
phase=0.0,
color=[1,1,1], colorSpace=‘rgb’, opacity=1, blendmode=‘avg’, contrast=1.0,
texRes=128, filter=None,
noiseType=‘Image’, noiseElementSize=0.0625,
noiseBaseSf=8.0, noiseBW=1,
noiseBWO=30, noiseOri=0.0,
noiseFractalPower=0.0,noiseFilterLower=1.0,
noiseFilterUpper=8.0, noiseFilterOrder=0.0,
noiseClip=3.0, imageComponent=‘Phase’, interpolate=False, depth=-2.0)
distractor.buildNoise()
But then how do I crop it and present it. If there was a buildnoise.save function I could save a cropped file (if there was a .crop) and present it later since I want the same phase scrambled “distractor” on each trial. I do not know how to crop it or same it. There is a PIL crop save functions but I do not know how to get an noiseStim a PIL stim or visa veras.
Thank you.