<commit_before>#!/usr/bin/env python
"""Sinusoidal color grating calculated in realtime."""

############################
#  Import various modules  #
############################

from VisionEgg.Core import *
from VisionEgg.Gratings import *

#####################################
#  Initialize OpenGL window/screen  #
#####################################

screen = get_default_screen()

######################################
#  Create sinusoidal grating object  #
######################################

stimulus = SinGrating2DColor(color1 = (0.0,1.0,0.0,0.0), # RGBA, Alpha ignored
                             color2 = (1.0,0.0,0.0,0.0), # RGBA, Alpha ignored
                             center           = ( screen.size[0]/2.0, screen.size[1]/2.0 ),
                             size             = ( 300.0 , 300.0 ),
                             spatial_freq     = 10.0 / screen.size[0], # units of cycles/pixel
                             temporal_freq_hz = 1.0,
                             orientation      = 45.0 )

###############################################################
#  Create viewport - intermediary between stimuli and screen  #
###############################################################

viewport = Viewport( screen=screen, stimuli=[stimulus] )

########################################
#  Create presentation object and go!  #
########################################

p = Presentation(go_duration=(5.0,'seconds'),viewports=[viewport])
p.go()<commit_msg>Trivial: Made colors match the Vision Egg icon<commit_after>#!/usr/bin/env python
"""Sinusoidal color grating calculated in realtime."""

############################
#  Import various modules  #
############################

from VisionEgg.Core import *
from VisionEgg.Gratings import *

#####################################
#  Initialize OpenGL window/screen  #
#####################################

screen = get_default_screen()

######################################
#  Create sinusoidal grating object  #
######################################

stimulus = SinGrating2DColor(color1 = (0.5, 0.25, 0.5, 0.0), # RGBA, Alpha ignored
                             color2 = (1.0, 0.5,  0.1, 0.0), # RGBA, Alpha ignored
                             center           = ( screen.size[0]/2.0, screen.size[1]/2.0 ),
                             size             = ( 300.0 , 300.0 ),
                             spatial_freq     = 20.0 / screen.size[0], # units of cycles/pixel
                             temporal_freq_hz = 1.0,
                             orientation      = 270.0 )

###############################################################
#  Create viewport - intermediary between stimuli and screen  #
###############################################################

viewport = Viewport( screen=screen, stimuli=[stimulus] )

########################################
#  Create presentation object and go!  #
########################################

p = Presentation(go_duration=(5.0,'seconds'),viewports=[viewport])
p.go()
{'fraction_non_alphanumeric': 0.35596026490066224, 'fraction_numerical': 0.029801324503311258, 'mean_word_length': 2.9697766097240472, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2718863', 'n_tokens_mistral': 811, 'n_tokens_neox': 734, 'n_words': 156}