ch.unizh.ini.friend.stimulus
Class GratingStimulus
java.lang.Object
ch.unizh.ini.friend.stimulus.AbstractStimulus
ch.unizh.ini.friend.stimulus.ConcreteStimulus
ch.unizh.ini.friend.stimulus.GratingStimulus
- All Implemented Interfaces:
- Updateable, Stimulus, Cloneable
public class GratingStimulus
- extends ConcreteStimulus
A grating stimulus, which consists of a set of BarStimulus
with a specified spatial period.
- Since:
- $Revision: 1.8 $
- Author:
- tobi
Field Summary |
protected static float |
PERIOD
the default spatial period of the grating: 2.0f. |
protected static float |
SCREEN_MULTIPLE
size of the grating stimulus as a multiple of the screen size |
Constructor Summary |
GratingStimulus()
Creates a new instance of GratingStimulus with default spatial period PERIOD . |
GratingStimulus(float period)
Creates a new instance of GratingStimulus with specified spatial period. |
Methods inherited from class ch.unizh.ini.friend.stimulus.AbstractStimulus |
addShape, brightenBackground, brightenForeground, clearShapes, compute, darkenBackground, darkenForeground, expand, fatten, flipContrast, getBackgroundExcitationDensity, getForegroundExcitationDensity, getShapes, getTransformedShapes, getTransforms, isVisible, lengthen, removeShape, rotate, rotateCCW, rotateCW, setBackgroundExcitationDensity, setForegroundExcitationDensity, setShapes, setTransforms, setVisible, shorten, shrink, thin, toString |
PERIOD
protected static final float PERIOD
- the default spatial period of the grating: 2.0f.
Compare this dimension with the screen dimensions.
- See Also:
- Constant Field Values
SCREEN_MULTIPLE
protected static final float SCREEN_MULTIPLE
- size of the grating stimulus as a multiple of the screen size
- See Also:
- Constant Field Values
GratingStimulus
public GratingStimulus()
- Creates a new instance of GratingStimulus with default spatial period
PERIOD
.
GratingStimulus
public GratingStimulus(float period)
- Creates a new instance of GratingStimulus with specified spatial period. The number of bars is computed so that the
grating covers the screen even when mouse reference position moves to the edge of the screen.
- Parameters:
period
- Period of grating in units of TangentScreen.SCREEN_DIMENSION
. A period of 1 means
a black and white grating pair every screen dimension units.
main
public static void main(String[] args)