RgcComputeEverything

From VISTA LAB WIKI

Revision as of 15:45, 10 August 2015 by Rjpatruno (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

A description of the rgcComputeEverything function. This function integrates scene2absorptions and rgcComputeSpikes. It should be the primary used function

Return to RGC programming

Contents

[edit] Introduction

The rgcComputeEverything function is a wrapper around the 2 main functions scene2Absorptions and rgcComputeSpikes, it enforces coherence between the parameters of the two functions. It computes the RGC network such that the result is not affected directly by the 0-padding used for the RF convolutions.

 [spikes absorptions rgcInterm] = rgcComputeEverything(scene,rgcP, [sensor], [oi], [nTimeFrames], [expT], [mLum], [fov], [coneSpacing], [monochromatic], [noisyFrames], [sameLayers], [alreadyComputedAbsorptions], spikeRateGain, saveSpikeData, spikeSavingFile, alreadyComputedLinTS, linTSSavingFile, spikeFlag, noNoiseAbso)

[edit] Output

  • spikes  : spikes ouput from the rgc network, it is a cell such that spikes{ii} are the spikes of the ii-th network
  • absorptions : cones absorptions, contains the fields
    • data : theactual absorptions
    • sensor, oi, scene : see below in arguments.
  • rgcInterm  : intermediate results, structure with the fields:
    • connecMatrix : connection matirces of the layers
    • rfImg : convolved RF images
    • linTS : linear time Series
    • rgcTS : total Time Series
    • imageFOV : scene field of view
    • networkFov.center : field of view corresponding to the size of the rgc network
    • networkFov.support : field of view corresponding to the size of the RF support of the rgc network
    • micronPerDegree : microns per degree for this system

[edit] Input

  • scene  : scene, this can be an RGB image (double values in [0 255]), or an ISET scene.
  • rgcP  : object from the rgcParameters class
  • sensor  : ISET sensor structure (optional)
  • oi  : ISET oi structure (default human optics)
  • nTimeFrames : number of spiking time steps (default = 100)
  • expT  : duration of each spiking timestep = exposition duration in ms (default = 1)
  • mLum  : mean luminance in cd/m^2 (default = 300)
  • fov  : field of view of the scene in deg (default = 0.5)
  • coneSpacing : cone spacing in um (default = 1.5)
  • monochromatic: 0 or 1 do we use a monochromatic sensor (default = 0)
  • noisyFrames : number of noisy frames used for noise initialisation (default = 0)
  • sameLayers  : do we have layers with same size and connection parameters, if yes, then sameLayers = 1 can speed up the computation. The fact that this is true won't be check, use it with caution. (default = 1)
  • alreadyComputedAbsorptions: if you already have computed the absorptions for these very parameters then you can pass them here to reduce computation. The fact that these are actually the right absorptions won't be check, use it with caution. (default = [])
  • spikeRateGain : the gain by which we multiply the spike rate. The bigger it is, the more spikes. (default = 100, but thsi should be tuned)
  • saveSpikeData : 0 or 1 : do you want to save the spikeData? ('spkHist','spikeIntegralTable','rgcTTable','spikeRate','linTS','spkTS','K', 'cpTRTS', 'fbTRTS', see the page on spike generation for details)
  • spikeSavingFile : if saveSpikeData = 1, it will be saved to this file.
  • alreadyComputedLinTS : not very robust. If you include linTS from a previous simulation, only the spiking will be computed, and not the preceding computations (oi and absorptions), this gains time. Use the same parameters for both simulations (including number of noise frames). Use the same rgcP object and don't reset it. Use only one layer.
  • linTSSavingFile : string. If a filename is input, the linTS will be saved.
  • spikeFlag : if 1, the spikes are computed. If 0, empty spikes are returned.(This gains time when you only need the absorptions, but maybe using scene2absorptions would be better!)
  • noNoiseAbso : if 1, the read noise is turned off from the absorptionscomputation. The shot noise remains in all cases.


[edit] Example

You can see the result of this function on the following example:

 scene = sceneCreate('slantedBar');
 rgcP = rgcParameters;
 rgcP.addOneLayer('default');
 [spikes absorptions rgcInterm] = rgcComputeEverything(scene,rgcP,[],[],100,1,[],0.3,1.5,0);
 mplay(255*spikes{1},3)

[edit] Remarks

  • When using this function, he size of the resulting network will be smaller than the size of the absorptions data. That's perfectly normal. If you want the centers of your RGC network to cover a particular fov, you should pass a bigger fov to the function. But unless you're using a layer with the overrideLayerSize() function (see rgcLayer), the RF support of the RGC network should be very close to the wanted fov (compare rgcInterm.imageFOV and rgcInterm.networkFov.support). See the image below:
  • If you are using several layers, then not asking for the rgcInterm output may save you a lot of memory.
Personal tools