当前位置: 首页>>代码示例>>Python>>正文


Python VisionEgg.start_default_logging方法代码示例

本文整理汇总了Python中VisionEgg.start_default_logging方法的典型用法代码示例。如果您正苦于以下问题:Python VisionEgg.start_default_logging方法的具体用法?Python VisionEgg.start_default_logging怎么用?Python VisionEgg.start_default_logging使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在VisionEgg的用法示例。


在下文中一共展示了VisionEgg.start_default_logging方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: main

# 需要导入模块: import VisionEgg [as 别名]
# 或者: from VisionEgg import start_default_logging [as 别名]
def main():
  """Launch VisionEgg and demo the WrappedText object"""
  import VisionEgg
  VisionEgg.start_default_logging(); VisionEgg.watch_exceptions()
  import VisionEgg.FlowControl

  screen = VisionEgg.Core.get_default_screen()

  message="""Hello.

This is a demonstration of the WrappedText object, which was created to allow users of VisionEgg to include large blocks of text in their programs. While this stimulus has many limitations, it should be useful for presenting on-screen instructions in experiments.

While you are welcome to modify this file to extend its functionality, I hope you consider sharing any such modifications with the VisionEgg community.

Eamon Caddigan,\nUniversity of Illinois\n15 November 2007"""

  wt = WrappedText(text=message, position=(50,screen.size[1]-50), 
    size=(screen.size[0]-100, screen.size[1]-100))

  viewport = VisionEgg.Core.Viewport(screen=screen, stimuli=[wt])

  # Frame-based presentation duration makes it easier to use pdb
  p = VisionEgg.FlowControl.Presentation(viewports=[viewport],
      go_duration=(VisionEgg.config.VISIONEGG_MONITOR_REFRESH_HZ*30,'frames'))
  p.go()

  screen.close() # Called explicitly to behave better in interactive shells
开发者ID:Complex501,项目名称:visionegg,代码行数:29,代码来源:WrappedText.py

示例2: __init__

# 需要导入模块: import VisionEgg [as 别名]
# 或者: from VisionEgg import start_default_logging [as 别名]
    def __init__(self):
        """We break up initialization a bit as we need to go back and forth with
        some information.  In this case, we need screen size before specifying
        the stimuli"""

        VisionEgg.start_default_logging()
        VisionEgg.watch_exceptions()
        # get screen size for setting fullscreen resolution
        # comment this block out if you don't want to use full-screen.
        screen = pygame.display.set_mode((0, 0))  # this opens up a pygame window
        WIDTH, HEIGHT = screen.get_size()
        pygame.quit()  # close this pygame window, or else it interferes w/ VE
        VisionEgg.config.VISIONEGG_SCREEN_W = WIDTH
        VisionEgg.config.VISIONEGG_SCREEN_H = HEIGHT

        self.screen = get_default_screen()
        self.keys = []
        self.presses = []
        self.releases = []
开发者ID:davclark,项目名称:cognac,代码行数:21,代码来源:SimpleVisionEgg.py

示例3: __init__

# 需要导入模块: import VisionEgg [as 别名]
# 或者: from VisionEgg import start_default_logging [as 别名]
    def __init__(self):
        """We break up initialization a bit as we need to go back and forth with
        some information.  In this case, we need screen size before specifying
        the stimuli"""
        
        # pasted in from where it used to be at the beginning of the script
        # used to be outside of any methods...
        VisionEgg.start_default_logging()
        VisionEgg.watch_exceptions()
        # get screen size for setting fullscreen resolution
        # comment this block out if you don't want to use full-screen.
        screen = pygame.display.set_mode((0,0))
        WIDTH, HEIGHT = screen.get_size()
        pygame.quit()
        VisionEgg.config.VISIONEGG_SCREEN_W = WIDTH
        VisionEgg.config.VISIONEGG_SCREEN_H = HEIGHT

        self.screen = get_default_screen()
        self.keys = []
        self.presses = []
        self.releases = []
开发者ID:davclark,项目名称:SimpleVisionEgg,代码行数:23,代码来源:SimpleVisionEgg.py

示例4:

# 需要导入模块: import VisionEgg [as 别名]
# 或者: from VisionEgg import start_default_logging [as 别名]
#!/usr/bin/env python
"""Sinusoidal grating calculated in realtime."""

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

import VisionEgg
VisionEgg.start_default_logging(); VisionEgg.watch_exceptions()

from VisionEgg.Core import *
from VisionEgg.FlowControl import Presentation
from VisionEgg.Gratings import *

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

screen = get_default_screen()

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

stimulus = SinGrating2D(position         = ( screen.size[0]/2.0, screen.size[1]/2.0 ),
                        anchor           = 'center',
                        size             = ( 300.0 , 300.0 ),
                        spatial_freq     = 10.0 / screen.size[0], # units of cycles/pixel
                        temporal_freq_hz = 1.0,
                        orientation      = 45.0 )
开发者ID:Complex501,项目名称:visionegg,代码行数:32,代码来源:grating.py

示例5:

# 需要导入模块: import VisionEgg [as 别名]
# 或者: from VisionEgg import start_default_logging [as 别名]
#! /usr/env/python

import VisionEgg

VisionEgg.start_default_logging()
VisionEgg.watch_exceptions()

from VisionEgg.Core import get_default_screen, Viewport
from VisionEgg.FlowControl import Presentation, FunctionController, TIME_SEC_ABSOLUTE, FRAMES_ABSOLUTE
from VisionEgg.Textures import *
from VisionEgg.Text import *
import serial
import pickle
import time
import random
import copy

from pygame.locals import *
import sys
import os

sys.path.append(os.path.split(os.getcwd())[0])


import subject
from experiments import printWord, printText
from mongoTools import MongoAdmin
import shuffler


###COLLECT SUBJECT INFO
开发者ID:victorpitron,项目名称:OpenPsyc,代码行数:33,代码来源:VertMag.py

示例6: alpha

# 需要导入模块: import VisionEgg [as 别名]
# 或者: from VisionEgg import start_default_logging [as 别名]
#!/usr/bin/env python
"""
Textures with alpha (transparency).

"""

import VisionEgg as ve
ve.start_default_logging(); ve.watch_exceptions()

import VisionEgg.Core as vec
from VisionEgg.FlowControl import Presentation
import VisionEgg.Textures as vet

import Image, ImageDraw # Python Imaging Library (PIL)

import OpenGL.GL as gl # PyOpenGL

import os
import numpy # Numeric

screen = vec.get_default_screen()
texel_scale = 5

# create background texture from image file
bg_filename = os.path.join(ve.config.VISIONEGG_SYSTEM_DIR,"data","panorama.jpg")
bg_texture = vet.Texture(bg_filename)
bg = vet.TextureStimulus(texture = bg_texture,
                         size    = bg_texture.size,
                         shrink_texture_ok=False,
                         mipmaps_enabled=False,
                         )
开发者ID:Complex501,项目名称:visionegg,代码行数:33,代码来源:alpha_texture.py


注:本文中的VisionEgg.start_default_logging方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。