jAER project on SourceForge

ch.unizh.ini.jaer.chip.cochlea
Class CochleaAMSNoBiasgen.Extractor

java.lang.Object
  extended by net.sf.jaer.chip.TypedEventExtractor
      extended by ch.unizh.ini.jaer.chip.cochlea.CochleaAMSNoBiasgen.Extractor
All Implemented Interfaces:
java.io.Serializable, EventExtractor2D
Enclosing class:
CochleaAMSNoBiasgen

public class CochleaAMSNoBiasgen.Extractor
extends TypedEventExtractor
implements java.io.Serializable

Extract cochlea events. The event class returned by the extractor is CochleaAMSEvent. The address are mapped as follows

 TX0 - AE0 
 TX1 - AE1
 ...
 TX7 - AE7
 TY0 - AE8
 TY1 - AE9
 AE15:10 are unused and are unconnected - they should be masked out in software.
 
1514131211109876543210
xxxxxxTH1TH0CH5CH4CH3CH2CH1CH0EARLPFBPF

See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sf.jaer.chip.TypedEventExtractor
chip, fliptype, flipx, flipy, hexArrangement, out, rotate, typemask, typeshift, xmask, xshift, ymask, yshift
 
Constructor Summary
CochleaAMSNoBiasgen.Extractor(AEChip chip)
           
 
Method Summary
 void extractPacket(AEPacketRaw in, EventPacket out)
          Extracts the meaning of the raw events.
 byte getTypeFromAddress(int addr)
          Overrides default extract to define type of event the same as the Y address.
 short getXFromAddress(int addr)
          Overrides default extractor so that cochlea channels are returned, numbered from x=0 (base, high frequencies, input end) to x=63 (apex, low frequencies).
 short getYFromAddress(int addr)
          Overrides default extractor to spread all outputs from a tap (left/right, ganglion cell, LPF/HPF) into a single y address that can be displayed in the 2d histogram.
 
Methods inherited from class net.sf.jaer.chip.TypedEventExtractor
extractPacket, getAddressFromCell, getSubsampleThresholdEventCount, getTypemask, getTypeshift, getUsedBits, getXmask, getXshift, getYmask, getYshift, isFliptype, isFlipx, isFlipy, isSubsamplingEnabled, matchesAddress, reconstructRawPacket, setFliptype, setFlipx, setFlipy, setSubsampleThresholdEventCount, setSubsamplingEnabled, setTypemask, setTypeshift, setXmask, setXshift, setYmask, setYshift
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CochleaAMSNoBiasgen.Extractor

public CochleaAMSNoBiasgen.Extractor(AEChip chip)
Method Detail

extractPacket

public void extractPacket(AEPacketRaw in,
                          EventPacket out)
Extracts the meaning of the raw events. This form is used to supply an output packet. This method is used for real time event filtering using a buffer of output events local to data acquisition. An AEPacketRaw may contain multiple events, not all of them have to sent out as EventPackets. An AEPacketRaw is a set(!) of addresses and corresponding timing moments. A first filter (independent from the other ones) is implemented by subSamplingEnabled and getSubsampleThresholdEventCount. The latter may limit the amount of samples in one package to say 50,000. If there are 160,000 events and there is a sub sample threshold of 50,000, a "skip parameter" set to 3. Every so now and then the routine skips with 4, so we end up with 50,000. It's an approximation, the amount of events may be less than 50,000. The events are extracted uniform from the input.

Specified by:
extractPacket in interface EventExtractor2D
Overrides:
extractPacket in class TypedEventExtractor
Parameters:
in - the raw events, can be null
out - the processed events. these are partially processed in-place. empty packet is returned if null is supplied as input.

getXFromAddress

public short getXFromAddress(int addr)
Overrides default extractor so that cochlea channels are returned, numbered from x=0 (base, high frequencies, input end) to x=63 (apex, low frequencies).

Specified by:
getXFromAddress in interface EventExtractor2D
Overrides:
getXFromAddress in class TypedEventExtractor
Parameters:
addr - raw address.
Returns:
channel, from 0 to 63.

getTypeFromAddress

public byte getTypeFromAddress(int addr)
Overrides default extract to define type of event the same as the Y address.

Specified by:
getTypeFromAddress in interface EventExtractor2D
Overrides:
getTypeFromAddress in class TypedEventExtractor
Parameters:
addr - the raw address.
Returns:
the type

getYFromAddress

public short getYFromAddress(int addr)
Overrides default extractor to spread all outputs from a tap (left/right, ganglion cell, LPF/HPF) into a single y address that can be displayed in the 2d histogram. The y returned goes like this from 0-15: left LPF(4) right LPF(4) left BPF(4) right BPF(4). Eech group of 4 ganglion cells goes from Vth1 to Vth4.

Specified by:
getYFromAddress in interface EventExtractor2D
Overrides:
getYFromAddress in class TypedEventExtractor
Parameters:
addr - the raw address
Returns:
the Y address

jAER project on SourceForge