public class DynamicalSystemSpikeGenerator extends java.lang.Object implements SpikeGenerator, Probeable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DYNAMICS
Default name for dynamics?
|
Constructor and Description |
---|
DynamicalSystemSpikeGenerator()
Uses default parameters to allow later configuration.
|
DynamicalSystemSpikeGenerator(DynamicalSystem dynamics,
Integrator integrator,
int voltageDim,
float spikeThreshold,
float minIntraSpikeTime) |
DynamicalSystemSpikeGenerator(DynamicalSystem dynamics,
Integrator integrator,
int voltageDim,
float spikeThreshold,
float minIntraSpikeTime,
float[] currentRange,
float transientTime)
Creates a SpikeGenerator that supports CONSTANT_RATE mode.
|
Modifier and Type | Method and Description |
---|---|
SpikeGenerator |
clone() |
boolean |
getConstantRateModeSupported() |
float[] |
getCurrentRange() |
DynamicalSystem |
getDynamics() |
TimeSeries |
getHistory(java.lang.String stateName)
Note that the units of TimeSeries' for a given state do not change over time (ie at different
time steps).
|
Integrator |
getIntegrator() |
float |
getMinIntraSpikeTime() |
SimulationMode |
getMode() |
float |
getSpikeThreshold() |
float |
getTransientTime() |
int |
getVoltageDim() |
java.util.Properties |
listStates() |
void |
reset(boolean randomize) |
InstantaneousOutput |
run(float[] time,
float[] current)
Runs the spike generation dynamics and returns a spike if membrane potential rises above spike threshold.
|
void |
setCurrentRange(float[] range) |
void |
setDynamics(DynamicalSystem dynamics) |
void |
setIntegrator(Integrator integrator) |
void |
setMinIntraSpikeTime(float min) |
void |
setMode(SimulationMode mode)
Sets the object to run in either the given mode or the closest mode that it supports
(all ModeConfigurables must support SimulationMode.DEFAULT, and must default to this mode).
|
void |
setSpikeThreshold(float threshold) |
void |
setTransientTime(float transientTime) |
void |
setVoltageDim(int dim) |
public static final java.lang.String DYNAMICS
public DynamicalSystemSpikeGenerator(DynamicalSystem dynamics, Integrator integrator, int voltageDim, float spikeThreshold, float minIntraSpikeTime)
dynamics
- A DynamicalSystem that defines the dynamics of spike generation.integrator
- An integrator with which to simulate the DynamicalSystemvoltageDim
- Dimension of output that corresponds to membrane potentialspikeThreshold
- Threshold membrane potential at which a spike is considered to have occurredminIntraSpikeTime
- Minimum time between spike onsets. If there appears to be a spike onset at the
beginning of a timestep, this value is used to determine whether this is just the continuation of a spike
onset that was already registered in the last timesteppublic DynamicalSystemSpikeGenerator(DynamicalSystem dynamics, Integrator integrator, int voltageDim, float spikeThreshold, float minIntraSpikeTime, float[] currentRange, float transientTime)
dynamics
- A DynamicalSystem that defines the dynamics of spike generation.integrator
- An integrator with which to simulate the DynamicalSystemvoltageDim
- Dimension of output that corresponds to membrane potentialspikeThreshold
- Threshold membrane potential at which a spike is considered to have occurredminIntraSpikeTime
- Minimum time between spike onsets. If there appears to be a spike onset at the
beginning of a timestep, this value is used to determine whether this is just the continuation of a spike
onset that was already registered in the last timestepcurrentRange
- Range of driving currents at which to simulate to find steady-state firing rates for CONSTANT_RATE modetransientTime
- Simulation time to ignore before counting spikes when finding steady-state ratespublic DynamicalSystemSpikeGenerator()
public DynamicalSystem getDynamics()
public void setDynamics(DynamicalSystem dynamics)
dynamics
- A DynamicalSystem that defines the dynamics of spike generation.public Integrator getIntegrator()
public void setIntegrator(Integrator integrator)
integrator
- An integrator with which to simulate the DynamicalSystempublic int getVoltageDim()
public void setVoltageDim(int dim)
dim
- Dimension of output that corresponds to membrane potentialpublic float getSpikeThreshold()
public void setSpikeThreshold(float threshold)
threshold
- Threshold membrane potential at which a spike is considered to have occurredpublic float getMinIntraSpikeTime()
public void setMinIntraSpikeTime(float min)
min
- Minimum time between spike onsets.public float[] getCurrentRange()
public void setCurrentRange(float[] range)
range
- Range of driving currents at which to simulate to find steady-state firing rates for CONSTANT_RATE modepublic float getTransientTime()
public void setTransientTime(float transientTime)
transientTime
- Simulation time to ignore before counting spikes when finding steady-state ratespublic boolean getConstantRateModeSupported()
public InstantaneousOutput run(float[] time, float[] current)
run
in interface SpikeGenerator
time
- Array of points in time at which input current is defined. This includes
at least the start and end times, and possibly intermediate times. (The SpikeGenerator
model can use its own time step -- these times are only used to define the input.)current
- Driving current at each given point in time (assumed to be constant
until next time point)SpikeGenerator.run(float[], float[])
public void reset(boolean randomize)
reset
in interface Resettable
randomize
- True indicates that the object should be reset to a
randomly selected initial state (the object must be aware of the
distribution from which to draw from). False indicates that the
object should be reset to a fixed initial state (which it must
also know). Some objects may not support randomization of the initial
state, in which case a fixed state will be used in either case.Resettable.reset(boolean)
public SimulationMode getMode()
getMode
in interface SimulationMode.ModeConfigurable
SimulationMode.ModeConfigurable.getMode()
public void setMode(SimulationMode mode)
SimulationMode.ModeConfigurable
setMode
in interface SimulationMode.ModeConfigurable
mode
- SimulationMode in which it is desired that the object runs.SimulationMode.ModeConfigurable.setMode(ca.nengo.model.SimulationMode)
public TimeSeries getHistory(java.lang.String stateName) throws SimulationException
Probeable
getHistory
in interface Probeable
stateName
- A state variable nameSimulationException
- if the Probeable does not have the requested stateProbeable.getHistory(java.lang.String)
public java.util.Properties listStates()
listStates
in interface Probeable
Probeable.listStates()
public SpikeGenerator clone() throws java.lang.CloneNotSupportedException
clone
in interface SpikeGenerator
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if clone can't be made