V1 spatiotemporal filters

The <filters> parameter object defines the set of spatiotemporal frequency (STF) filters that will be applied to the visual stimulus via convolution. The convolutions provide a set of time-varying responses to each filter centered at each location in the visual stimulus grid. These raw signals are then integrated in various way to provide input channels for the MT units. An example is given next, followed by descriptions of each parameter below.

  <filters>
    config      SFxTF               # Configuration of STF channels,
                                    # 'SFxTF' - matrix of SF and TF values.

    type        Gabor               # type of linear filter
    n_dir       12                  # Number of directions
    sf_list     1.0 2.0  (cyc/deg)  # SF values (one or more values)
    tf_list     0.0   8.0    (Hz)   # TF values (one or more values)
    tf_list_sd  0.045 0.045  (Hz)   # Temporal SD values (matched to 'tf_list')
    #s_sd       0.18     (deg)      # SD space
    #t_sd       0.045    (s)        # SD time
    s_sd_f      0.22                # SD in space = this value times 1/SF
    #t_sd_f     0.45                # SD in time = this value times 1/TF
    scale_sqrt  1.0                 # [1.0] normalization factor

    write_par_table  zz.filt.list   # Write a table of filter parameters
  </filters>
The config parameter specifies the configuration of the STF channels. In this case it is set to "SFxTF", which indicates that a simple matrix will be formed by taking every SF value listed for sf_list against every TF value listed for tf_list. In this example, the SF values are 1.0 and 2.0, and the TF value is 8, thus two STF channels will be formed that differ in their preferred SF.

The number of direction channels is specified by n_dir and is set to 12 here. This must be an even number, which ensures there are 180 deg oppositely tuned channels. The preferred direction of the first channel will be 0 deg (defined to be rightward motion) and successive channels with increment their preferred direction in steps of 360/n_dir degrees, thus in 30 degree increments in this example.

The type of linear filter that will be constructed for each channel is set to "Gabor". This filter type is essentially a Gabor function in space (a 2D sine wave times a 2D Gaussian) that drifts over time and has a Gaussian temporal envelope. The standard deviations (SDs) of the Gaussians in space and time determine the bandwidths of spatial and temporal tuning, respectively. These SDs can be set either directly using the parameters s_sd and t_sd (or tf_list_sd to specify the SD for each TF value in tf_list) or by setting multiplicative factors that will cause the SDs to depend on the preferred SF and TF values. Specifically, if the spatial SD factor, s_sd_f, is set, then the spatial SD (s_sd) will be set equal to s_sd_f / SF. Likewise, if t_sd_f is set, then the temporal SD (t_sd) will be set equal to t_sd_f / TF, but this option does not work if TF=0 appears in the tf_list.

When s_sd_f is set, it will override any value set directly by s_sd. Likewise for t_sd. In the example above, the lines for s_sd and t_sd are commented out to show that they are not used.

TF zero channels. Currently, any STF channel with TF = 0 will have redundancy because directions that are 180 deg apart are essentially the same for static channels (the only possible difference could be the spatial phase). Probably, this redundancy will be eliminated going forward, because avoid wasting memory and computation.


Parameter summary and equations

Based on the parameters described above, and the stimulus dimensions, a set of filters is constructed such that each filter, f[i][j][k], has the following parameters:

and is defined for (i,j,k) in [ 0..(xn-1) , 0..(yn-1) , 0..(tn-1) ] as follows:
  c   = 1.0/(pow(2*PI,1.5)*ssd^2*tsd);  // constant for amplitude
  csd = 2*ssd^2;                        // constant for spatial scale
  nx  = cos(theta/180 * PI);            // constant for grating orientation
  ny  = sin(theta/180 * PI);            // constant for grating orientation

  xc  = (xn-1)/2;                       // constants for center position
  yc  = (yn-1)/2;                       //   E.g., for xn = 32, the center
  tc  = (tn-1)/2;                       //         position is 15.

  ph0 = PI/180.0 * phase;               // 'phase' is either 0 or 90 deg

  x = (i-xc)*sscale;                    // 'x' is spatial location in deg
  y = (j-yc)*sscale;                    // 'y' is spatial location in deg
  t = (k-tc)*tscale;                    // 't' is time in seconds

  frndotr = 2*PI * sf * (nx*x + ny*y);  // Angular position orthogonal to grating

  gs = exp(-(x^2 + y^2)/csd);           // Gaussian spatial window

  gt = exp(-t^2/(2*tsd^2));             // Gaussian temporal window

  f[i][j][k] = c*gs*gt*cos(frndotr - 2*PI * tf * t - ph0);

Once the filter is constructed, it is normalized by multiplying each entry by:
  sqrt( scale_sqrt * nc / ssq )

where,

  nc =  (sscale / 0.1)^2 * (tscale / 0.002)

  ssq =  SUM  f^2(i,j,k)
        i,j,k
Finally, the write_par_table parameter specifies a file name to which the filter parameters are written (text format) for each linear filter that is created. The file is appended, so it should be removed before re-running the model. To prevent writing such a file, comment out this parameter, or remove it.