Skip to content

vlt.neuro.vision.contrast.naka_rushton_fit

   naka_rushton Naka-Rushton fit (for contrast curves)

    [RM,C50] = vlt.neuro.vision.contrast.naka_rushton_fit(C,DATA)

    Finds the best fit to the Naka-Rushton function
      R(c) = Rm*c/(C50+c)
    where C is contrast (0-1), Rm is the maximum response, and C50 is the
    half-maximum contrast.

    [RM,C50,N] = vlt.neuro.vision.contrast.naka_rushton(C,DATA)

    Finds the best fit to the Naka-Rushton function
      R(c) = Rm*c^n/(C50+c^n)
    where C is contrast (0-1), Rm is the maximum response, and C50 is the
    half-maximum contrast.

    [RM,C50,N,S] = vlt.neuro.vision.contrast.naka_rushton(C,DATA)
    Finds the best fit to the Naka-Rushton function
      R(c) = Rm*c^n/(C50^(s*n)+c^(s*n))
    where C is contrast (0-1), Rm is the maximum response, and C50 is the
    half-maximum contrast, and s is a saturation factor.

    References:
      Naka_Rushton fit was first described in 
      Naka, Rushton, J.Physiol. London 185: 536-555, 1966
      and used to fit contrast data of cortical cells in  
      Albrecht and Hamilton, J. Neurophys. 48: 217-237, 1982
      The saturation form was described in Peirce 2007 J Vision

  This function also takes additional arguments in the form of name-value
  pairs:
  |-----------------------------------------------------------------|
  | Parameter (default)       | Description                         |
  |---------------------------|-------------------------------------|
  | init_rmax (max of r)      | Initial rmax search point           |
  | min_rmax (0)              | Minimum rmax value                  |
  | max_rmax (Inf)            | Maximum rmax value                  |
  | initc50 (contrast value   | Initial C50 search point            |
  |    with response closest  |                                     |
  |    to the empirical max/2)|                                     |
  | min_c50 (low/2)           | Minimum C50 value (low is the lowest|
  |                           |    contrast tested                  |
  | max_c50 (1)               | Maximum value of C50                |
  | init_N (1)                | Initial value for N                 |
  | min_N (0.1)               | Minimum value of N                  |
  | max_N (5)                 | Maximum value of N                  |
  | init_S (1)                | Initial value for S                 |
  | min_S (1)                 | Minumum value of S                  |
  | max_S (2.5)               | Maximum value of S                  |
  -------------------------------------------------------------------

  Example:
    c = [0:0.05:1];
    rmax_in = 10; c50_in = 0.45; N_in = 1.5; s_in = 1;
    r = rmax_in * vlt.fit.naka_rushton_func(c,c50_in,N_in,s_in);
    [rmax,c50,N,s] = vlt.neuro.vision.contrast.naka_rushton_fit(c,r);
    r_fit = rmax * vlt.fit.naka_rushton_func(c,c50,N,s);
    figure;
    plot(c,r,'-o');
    hold on;
    plot(c,r_fit,'r-x');
    xlabel('Contrast'); ylabel('Response'); box off;