|
The Physiologist's Friend Simulation API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.unizh.ini.friend.simulation.AbstractAcceptsInput
ch.unizh.ini.friend.simulation.cells.AbstractCell
ch.unizh.ini.friend.simulation.cells.Photoreceptor
public class Photoreceptor
This class implements the notion of a photoreceptor.
Field Summary | |
---|---|
static float |
ADAPTATION_TIME_CONSTANT
adaptation time constant of photoreceptor in seconds: 0.5f |
protected float |
gain
The gain of the high-pass output. |
protected Filter |
highPass
A high-pass filter that is used to compute the transient gain. |
protected ConvexPolygon |
shape
The shape of this photoreceptor. |
protected Stimulus |
stimulus
The stimulus for this photoreceptor (and likely the whole simulation). |
static float |
TRANSIENT_GAIN
the transient gain of the photoreceptor, as a multiple of the DC gain: 5.0f |
Fields inherited from class ch.unizh.ini.friend.simulation.cells.AbstractCell |
---|
newValue, value |
Fields inherited from class ch.unizh.ini.friend.simulation.AbstractAcceptsInput |
---|
inputs |
Constructor Summary | |
---|---|
Photoreceptor(ConvexPolygon shape,
Stimulus stimulus)
Creates a new photoreceptor with a given shape and attached to a given stimulus and a certain gain in higher frequencies. |
Method Summary | |
---|---|
void |
compute(float dt)
Computes the new state of this photoreceptor. |
float |
excitation()
Calculate the exitation of the given object (photoreceptor) from the stimulus. |
float |
getGradedOutput()
returns the graded output from the cell |
static ArrayList |
getHexagonalArrayListInstance(int a,
float r,
float spacing,
Stimulus stimulus,
Collection shapes)
Returns a hexagonal arranged list of hexagonal photoreceptors. |
RetinotopicLocation |
getRetinotopicLocation()
return the RetinotopicLocaton of the cell |
void |
setRetinotopicLocation(RetinotopicLocation p)
set the location |
Methods inherited from class ch.unizh.ini.friend.simulation.cells.AbstractCell |
---|
output, update |
Methods inherited from class ch.unizh.ini.friend.simulation.AbstractAcceptsInput |
---|
averageInputs, cloneObject, connectOneToAll, connectOneToOne, getCollectionInstance, getInput, getInputs, integrateInputs, setInput, setInputs |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final float ADAPTATION_TIME_CONSTANT
public static final float TRANSIENT_GAIN
protected ConvexPolygon shape
protected Stimulus stimulus
protected float gain
protected Filter highPass
Constructor Detail |
---|
public Photoreceptor(ConvexPolygon shape, Stimulus stimulus)
shape
- The shape of the photoreceptor.stimulus
- The stimulus used to stimulate this photoreceptor.Method Detail |
---|
public static ArrayList getHexagonalArrayListInstance(int a, float r, float spacing, Stimulus stimulus, Collection shapes)
spacing
plus twice the radius r
,
and the y spacing is smaller by cos(Pi/6)
.
This results in an array with one of the principal axes horizontal, the other
two ases are at +/-60 degrees.
a
- The number of photoreceptors making one side of the list. E.g. a=2 returns a 7-photoreptor array.r
- The radius of the enclosing circle arround one photoreceptor.spacing
- The additional distance between the photoreceptors.stimulus
- The stimulus to attach to the photoreceptors.shapes
- A collection the shapes of the photoreceptors are added to.
public void compute(float dt)
gain
times the high-pass filtered
input.
compute
in interface Updateable
dt
- The time that has passed since the last invocation.public float excitation()
public float getGradedOutput()
getGradedOutput
in interface GradedCell
public RetinotopicLocation getRetinotopicLocation()
getRetinotopicLocation
in interface Retinotopic
public void setRetinotopicLocation(RetinotopicLocation p)
setRetinotopicLocation
in interface Retinotopic
p
- to set the cell to. This is generally returned from another cell
and is set during construction.
|
http://www.ini.unizh.ch/~tobi/friend | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |