Jump to: navigation, search

Description of the class of RGC parameters.

Return to RGC programming page.


[edit] Introduction

The rgcParameters class is used to manage parameters impacting the whole simulation. It is a Matlab class and a subclass of the handle class. You can create a new instance with:

 rgc = rgcParameters;

It has set/get/Display methods to manage its fields.

[edit] Public fields

  • noise : structure managing the noisy frames if you are using a noise initialization. You should probably not modify it. Use rgcComputeSpikesNoiseInit instead.
  • name : Simulation name
  • data : absorptions data. This is just a matrix and not the structure returned by scene2Absorptions.
  • dT_default : default time step between frames (ms).
  • trDur : Input response function duration (ms), same for all layers.
  • coneSpacingDefault : Used only when no sensor is specified.
  • meanV : The mean of the random base current
  • stdV : The standard-deviation of the random base current

[edit] Methods

In this list, "rgcP" refers to an object of the rgcParameters class, and "field" refers to the name of a field of rgcP.

  • value = rgcP.get('field') : to get the value of a field (value = get(rgcP, 'field') also works)
  • rgcP.set('field',value) : to set the value of a field (set(rgcP, 'field', value) also works)
  • rgcP.Display('field',args) : to display information about a field (Display(rgcP,'field',args) also works)
  • rgcP2 = rgcP.Copy() : to get a copy of the rgcParameters object (rgcP2 = Copy(rgcP) also works)
  • res = rgcP.isSensor() : 1 if there is a sensor structure associated to the object (isSensor(rgcP) also works)
  • res = rgcP.isOi() : 1 if there is an oi structure associated to the object (isOi(rgcP) also works)
  • layer = rgcP.getLayer(n) : to get the n-th layer (getLayer(rgcP,n) also works)
  • obj = rgcP.addOneLayer(type,angle) : to add 1 layer of a certain type (see rgcLayer) (addOneLayer(rgcP,type,angle) also works)
  • obj = rgcP.addNLayers(n,type,angle) : to add n layers of a certain type (see rgcLayer) (addNLayers(rgcP,n,type,angle) also works)
  • rgcP.removeLayers(nList) : to remove the layers in nList (removeLayers(rgcP, nList) also works)
  • rgcP.switchLayers(i,j) : to switch layers i and j (probably useless now) (switchLayers(rgcP,i,j) also works)

[edit] Examples

For examples on adding layers, and managing layer types, see this section of rgcLayer

Basic example

 scene = sceneCreate('default'); % creating iset scene
 scene = sceneSet(scene, 'fov', 0.3); % reduce the field of view to avoid huge computation time
 rgcP = rgcParameters; % creating the rgcParameters object
 rgcP.addOneLayer('default'); % adding a default layer
 spikes = rgcComputeEverything(scene,rgcP); % computing spikes

rgcParameter is a subclass of the handle class. That means that when you create an object you basically get a pointer, and therefore when you pass it as an argument, it is as if it were passed as a reference as you can see in this example:

 rgcP = rgcParameters;
 rgcP2 = rgcP;
 rgcP.get('number of layers')
 % >> ans = 1
 rgcP2.get('number of layers')
 % >> ans = 1

If you want just a copy, you can do:

 rgcP3 = rgcP.Copy();
 rgcP.get('number of layers')
 % >> ans = 2
 rgcP3.get('number of layers')
 % >> ans = 1
Personal tools