stimulator
Class Cycle

java.lang.Object
  extended by stimulator.Cycle

public class Cycle
extends java.lang.Object

Stimulus generator package. This class defines a single cycle: sequence info, timing info and stimulus maps and name. Copyright (c) 1999-2004, Michael Abramoff. All rights reserved.


Field Summary
static int DURING
           
static int ENDED
           
 long flickerDuration
           
static int IDLE
           
static int POST
           
static int PRE
           
 
Constructor Summary
Cycle()
           
Cycle(StimScreen screen, ij.process.ByteProcessor baseline, ij.process.ByteProcessor map, ij.process.ByteProcessor[] idleMap, int sequenceNumber, double pre, double during, double post, double idle, double flickerFrequency)
          Set up an epoch.
 
Method Summary
 java.awt.Image[] getImages()
          Get the stimulus Images (for flicker off and on) for the current state.
 long getLength()
           
 int getState()
          Gets the state this epoch is in at time t: one of ENDED, PRE, DURING, POST, or IDLE
 boolean isEnded()
           
 boolean isIdle()
           
 boolean sameState()
           
 long setStartTime()
          Set the display start time for this epoch.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENDED

public static final int ENDED
See Also:
Constant Field Values

PRE

public static final int PRE
See Also:
Constant Field Values

DURING

public static final int DURING
See Also:
Constant Field Values

POST

public static final int POST
See Also:
Constant Field Values

IDLE

public static final int IDLE
See Also:
Constant Field Values

flickerDuration

public long flickerDuration
Constructor Detail

Cycle

public Cycle()

Cycle

public Cycle(StimScreen screen,
             ij.process.ByteProcessor baseline,
             ij.process.ByteProcessor map,
             ij.process.ByteProcessor[] idleMap,
             int sequenceNumber,
             double pre,
             double during,
             double post,
             double idle,
             double flickerFrequency)
Set up an epoch.

Parameters:
screen - the screen on which the epoch's maps will be displayed.
baseline - the baseline map shown when t
pre+during and t< pre+during+post
map - the stimulus map, shown when preidleMap - the idle maps shown when t<0 or t >= pre+during+post, depending on t
sequenceNumber - the number for this Epoch's sequence, i.e. that specific map.
pre - prestimulus in ms
during - stimulus in ms
post - poststimulus in ms
idle - idle period in ms
flickerFrequency - the flicker frequency in Hz.
Method Detail

setStartTime

public long setStartTime()
Set the display start time for this epoch.

Returns:
the start time in ms.

getLength

public long getLength()

getState

public int getState()
Gets the state this epoch is in at time t: one of ENDED, PRE, DURING, POST, or IDLE

Returns:
an int with one of ENDED, PRE, DURING, POST, or IDLE.

isIdle

public boolean isIdle()

isEnded

public boolean isEnded()

sameState

public boolean sameState()

getImages

public java.awt.Image[] getImages()
Get the stimulus Images (for flicker off and on) for the current state.

Returns:
a Image [] containing the source images for flicker off and on.