This page describes how to read data recorded from jAER to .aedat files into matlab.
These matlab scripts are in the working copy folder https://svn.code.sf.net/p/jaer/code/scripts/matlab .
Use the function loadaerdat.m
Use the function saveaerdat.m
You need to bitand and bitshift if you want to do this in matlab, or you can use the EventExtractor that goes with each chip class. Using the java class is faster but may fragment matlab memory.
* For matlab example, see the function
http://svn.code.sf.net/p/jaer/code/scripts/matlab/retina/extractRetina128EventsFromAddr.m
* For java class usage, examine the following example
chip=ch.unizh.ini.caviar.chip.retina.Tmpdiff128; extractor=chip.getEventExtractor; % get the extractor object from this chip. % now you can use the extractor to extract a packet of events or you can use the methods directly x=extractor.getXFromAddress(raw); % raw is a raw AE address y=extractor.getYFromAddress(raw) type=extractor.getTypeFromAddress(raw)
You can use a function like this one, which is correct for tmpdiff128. Note how the x address is flipped because that is how it is rendered in java to make it rightside up (Java puts the origin at UL corner and increases x rightwards and y downwards.)
function raw=getraw(x,y,pol) raw=(y)*256+(127-x)*2+pol; %extractor.getAddressFromCell(x,y,pol);
This is the best way to control biases and the AEViewer now from an external process. See [Interfacing to jAER].