RgcLayer

From VISTA LAB WIKI

Jump to: navigation, search

A description of the class for RGC layers.

Return to RGC programming page.

Contents

[edit] Introduction

rgcLayer is a Matlab class, subclass of the handle class. You should not instance it directly, instead attach it to a rgcP object of the rgcParameters class with:

 rgcP.addOneLayer('layerType');

[edit] Public fields

  • name : layer name
  • cellSpacing : spacing between cells in um.
  • layerCenter : center of the layer in (um), center of the image is [0 0]
  • currentRgcV, currentSpkTS, currentLinTS, currentRgcT, currentConnec : used to remember the state of the layer. use rgcLayer.resetCurrentState(); to reset these values
  • RFstd, RFpos, RFsCoeffs, rfSizeParam : spatial RF properties, see subsection below
  • centerBDiv, centerF, centerNormF, centerGamma, surroundBDiv, surroundF, surroundNormF, surroundGamma : center and surround responses parameters
  • gammaBDiv, gammaF, gammaNormF, gammaGamma : parameters of a gamma function used in the feedback response.
  • parent : rgcParameters parent simulation
  • cutoff, wRange, nRange : Connection properties (see explanations below)
  • ActThreshParam = 50 : parameter for the spike triggering
  • tShift, linF : coupling and feedback parameters see figures in RGC programming.

[edit] Methods

  • get : to get the value of a field
  • set : to set the value of a field
  • Display : to display information about a field
  • resetCurrentState : to reset layer memory after some computation, probably has to be done if you've changed a simulation parameter.
  • Copy : to copy the rgcLayer object
  • getBorderSize : gives the size of the border affected by the RF convlution (in um)
  • overrideLayerSize : to override teh size of a layer and set it to a smaller value
  • resetSize : to reset to the default size.
  • disableCoupling : raises the cutoff value for the connexion matrix so that no connexions will be computed (the function checks this before computing, so it won't even go through the loop). Put the hasCoupling flag to 0. Does NOT recompute the connexion matrix is one is already there
  • enableCoupling : puts the cutoff value back to default. Puts the hasCoupling flag to 1. Does NOT recompute the connexion matrix is one is already there.
  • You can set the hasFeedbck to 0 or 1 to disable/enable feedback in neurons.

[edit] Layer Types

You can create several types of layer, using rgcParameters.addOneLayer(type), type can be either a string or a cell of strings to combine several types.

types implemented so far are:

  • 'default': default
  • 'hr': high resolution
  • 'lr': low resolution
  • 'rotation': rotates the RF of the angle given in second argument
  • 'edgesdetector': detection of edges in all directions
  • 'vertedgedetector': vertical edge detector
  • 'cornerdetector': corner detector

You can combine types in a cell array as long as they are not contradictory

It is better to assign the data to the parent rgcParameters object before the layers, or at least to set its coneSpacingDefault field to the coneSpacing that you are actually using.

[edit] Layer type examples

 scene = sceneCreate('default');
 absorptions = scene2Absorptions(scene,[],[],100,2,[],0.5,1)
 rgcP = rgcParameters;
 rgcP.set('data',absorptions);
 rgcP.addOneLayer('default');
 rgcP.addOneLayer('lr');
 rgcP.addOneLayer({'lr','cornerdetector'});
 rgcP.addOneLayer({'lr','rotation','vertedgedetector'},pi/4);
 rgcP.Display('rf')

The order of these types do not matter, they are going to be done in the correct order. (As long as they are not contradictory)

[edit] Remarks

  • If you've changed the cellSpacing of the layer, then you're likely to get an error or a warning in rgcCreateConnectionMatrixByLayer. To avoid that you can use the rgcFindGoodDistanceParameters function, it will search the parameter space for values such that a cell is connected to at most cells that are 2 cells away.
 rgcFindGoodDistanceParameters(layer,1)
  • Using resetCurrentState, a typical usage of the resetCurrentState method is if you want to start a new experiment:
 rgcP = rgcParameters;
 rgcP.addOneLayer();
 scene = sceneCreate('slantedBar');
 scene = sceneSet(scene,'fov',0.3); % reduce the field of view to get a smaller (therefore faster) simulation
 spikes1 = rgcComputeEverything(scene,rgcP);
 % You see the transient at the beginning of the spikes:
 mplay(255*spikes1{1});
 spikes2 = rgcComputeEverything(scene,rgcP);
 % You don't see the transient anymore:
 mplay(255*spikes2{1});
 rgcP.getLayer(1).resetCurrentState();
 spikes3 = rgcComputeEverything(scene,rgcP);
 % You can see the transient again:
 mplay(255*spikes3{1});
Personal tools