Hello,I'd like to set up an experiment in which random images will be flickered on the screen for 2 seconds and the participant will have to identify them.Now, the issue that I try to avoid here is having the image appear immediately, that is, "flashing" on the screen.Ideally, I'd like to have the trial start with a black screen, then have the first stimulus appear gradually ("fade in" from black), stay on the screen for 2 seconds and then "fade out" to black.Is this possible to do with PsychoPy?My apologies if I'm too vague here, let me know if you need me to explain this better and thank you in advance.SH--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psychopy-user...@googlegroups.com.
To post to this group, send email to psychop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/psychopy-users/-/UAjqIcVoD6MJ.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psychopy-user...@googlegroups.com.
To post to this group, send email to psychop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/psychopy-users/-/KL5Kb-Yr8vEJ.
To view this discussion on the web visit https://groups.google.com/d/msg/psychopy-users/-/QTJWjBGUU5cJ.
# Initiate stimuli etc.from __future__ import divisionfrom psychopy import visualwin = visual.Window()stim = visual.TextStim(win)# General versionfadeIn = 30 # Duration of fadein in framesfadeOut = 30 # Duration of fadeout in framesmaintain = 120 # Duration of maintenance in framesflickerInterval = 3 # Duration of on and off duration (3 --> 6 frames per cycle)for frame in range(fadeIn + fadeOut + maintain):if frame < fadeIn:alpha = frame / fadeIn # ramp upif frame > fadeIn + maintain:alpha = 1.0 - ((frame - fadeIn - maintain) / fadeOut) # ramp downelse:alpha = 1.0 # Maintain# Draw only on certain framesif frame / flickerInterval % 2 < 1:stim.setOpacity(alpha)stim.draw()win.flip()
# .... or version with numbers instead of variablesfor frame in range(180):if frame < 30:alpha = frame / 30 # ramp upif frame > 150:alpha = 1.0 - ((frame - 150) / 30) # ramp downelse:alpha = 1.0 # Maintain# Draw only on certain framesif frame / 3 % 2 < 1:stim.setOpacity(alpha)stim.draw()win.flip()
--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psychopy-user...@googlegroups.com.
To post to this group, send email to psychop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psychopy-users/82d20097-f73f-4e04-824d-19227f617212%40googlegroups.com?hl=en.
To view this discussion on the web visit https://groups.google.com/d/msgid/psychopy-users/4004272d-7811-48e7-a7a7-9b2dfefc0e2e%40googlegroups.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
-- 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.