Package VisionEgg :: Module Gratings :: Class SinGrating3D |
[frames] | no frames]

# Class SinGrating3D

source code

             object --+
                      |
    ClassWithParameters --+
                          |
              Core.Stimulus --+
                              |
         LuminanceGratingCommon --+
                                  |
                                 SinGrating3D

    Sine wave grating stimulus texture mapped onto quad in 3D

    This is a general-purpose, realtime sine-wave luminace grating
    generator. This 3D version doesn't support an orientation
    parameter.  This could be implemented, but for now should be done
    by orienting the quad in 3D.

    Parameters
    ==========
    bit_depth                   -- precision with which grating is calculated and sent to OpenGL (UnsignedInteger)
                                   Inherited from LuminanceGratingCommon
                                   Default: 8
    color1                      -- (AnyOf(Sequence3 of Real or Sequence4 of Real))
                                   Default: (1.0, 1.0, 1.0)
    color2                      -- optional color with which to perform interpolation with color1 in RGB space (AnyOf(Sequence3 of Real or Sequence4 of Real))
                                   Default: (determined at runtime)
    contrast                    -- (Real)
                                   Default: 1.0
    depth                       -- (Real)
                                   Default: (determined at runtime)
    depth_test                  -- perform depth test? (Boolean)
                                   Default: True
    ignore_time                 -- (Boolean)
                                   Default: False
    lowerleft                   -- vertex position (units: eye coordinates) (AnyOf(Sequence3 of Real or Sequence4 of Real))
                                   Default: (0.0, 0.0, -1.0)
    lowerright                  -- vertex position (units: eye coordinates) (AnyOf(Sequence3 of Real or Sequence4 of Real))
                                   Default: (1.0, 0.0, -1.0)
    mask                        -- optional masking function (Instance of <class 'VisionEgg.Textures.Mask2D'>)
                                   Default: (determined at runtime)
    max_alpha                   -- (Real)
                                   Default: 1.0
    num_samples                 -- (UnsignedInteger)
                                   Default: 512
    on                          -- draw stimulus? (Boolean)
                                   Default: True
    pedestal                    -- (Real)
                                   Default: 0.5
    phase_at_t0                 -- (Real)
                                   Default: 0.0
    recalculate_phase_tolerance -- (Real)
                                   Default: (determined at runtime)
    size                        -- defines coordinate size of grating (in eye coordinates) (Sequence2 of Real)
                                   Default: (1.0, 1.0)
    spatial_freq                -- frequency defined relative to coordinates defined in size parameter (units; cycles/eye_coord_unit) (Real)
                                   Default: 4.0
    t0_time_sec_absolute        -- (Real)
                                   Default: (determined at runtime)
    temporal_freq_hz            -- (Real)
                                   Default: 5.0
    upperleft                   -- vertex position (units: eye coordinates) (AnyOf(Sequence3 of Real or Sequence4 of Real))
                                   Default: (0.0, 1.0, -1.0)
    upperright                  -- vertex position (units: eye coordinates) (AnyOf(Sequence3 of Real or Sequence4 of Real))
                                   Default: (1.0, 1.0, -1.0)

Instance Methods
__init__(self, **kw) Instantiate and get ready to draw. | source code
__del__(self) | source code
draw(self) Draw the stimulus. | source code
Inherited from `LuminanceGratingCommon`: `calculate_bit_depth_dependencies` Inherited from `ClassWithParameters`: `__getstate__`, `__setstate__`, `get_specified_type`, `is_constant_parameter`, `set`, `verify_parameters` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Class Variables
| parameters_and_defaults = `VisionEgg.ParameterDefinition({'on':`...``
Inherited from `ClassWithParameters`: `__safe_for_unpickling__`, `constant_parameters_and_defaults`

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(self, **kw) (Constructor) | source code
    Instantiate and get ready to draw.

    Set parameter values and create anything needed to draw the
    stimulus including OpenGL state variables such display lists
    and texture objects.
Overrides: Core.Stimulus.__init__ (inherited documentation)

### draw(self) | source code
    Draw the stimulus. (Called by Viewport instance.)

    This method is called every frame.  This method actually
    performs the OpenGL calls to draw the stimulus.
Overrides: Core.Stimulus.draw (inherited documentation)

Class Variable Details

  ### parameters_and_defaults Value:
      VisionEgg.ParameterDefinition({'on':(True, ve_types.Boolean, "draw sti
      mulus?"), 'mask':(None, ve_types.Instance(VisionEgg.Textures.Mask2D),
      "optional masking function"), 'contrast':(1.0, ve_types.Real), 'pedest
      al':(0.5, ve_types.Real), 'depth':(None, ve_types.Real), 'size':((1.0,
       1.0), ve_types.Sequence2(ve_types.Real), "defines coordinate size of
      grating (in eye coordinates)"), 'spatial_freq':(4.0, ve_types.Real, "f
      requency defined relative to coordinates defined in size parameter (un
      its; cycles/eye_coord_unit)"), 'temporal_freq_hz':(5.0, ve_types.Real)
      ...