RNLmodel {colourvision}  R Documentation 
Receptor noise limited colour vision models (Vorobyev & Osorio 1998; Vorobyev et al. 1998) extended to any number of photoreceptor types.
RNLmodel(model = c("linear", "log"), photo=ncol(C)1,
R1, R2=Rb, Rb, I, C,
noise = FALSE, v=NA, n=NA, e=NA,
interpolate = TRUE, nm = seq(300, 700, 1),
coord="colourvision")
model 
Linear (

photo 
Number of photoreceptor types. Model accepts any number of photoreceptor types ( 
R1 
Reflectance of observed objects. A data frame with first column corresponding to wavelength values and following columns with reflectance values. 
R2 
Reflectance to be compared against R1. 
Rb 
Background reflectance. A data frame with two columns only: first column corresponding to wavelength values and second column with reflectance values. 
I 
Irradiance spectrum. A data frame with two columns only: first column corresponding to wavelength values and second column with irradiance values. Irradiance values must be in quantum flux units. 
C 
Photoreceptor sensitivity curves, from lowest to longest lambdamax. A data frame: first column corresponding to wavelength values and following columns with photoreceptor sensitivity values (see function 
noise 
Logical. Whether receptor noise is provided ( 
e 
Receptor noise of each photoreceptor type. Used when 
n 
Relative number of each photoreceptor type in the retina. Usually increases with lambdamax. Used to calculate 
v 
Noisetosignal ratio of a single photoreceptor. Used to calculate 
interpolate 
Whether data files should be interpolated before further calculations. See 
nm 
A sequence of numeric values specifying where interpolation is to take place. See 
coord 
Whether colour locous coordinates should be calculated by the method ( 
The receptor noise limited model was originally developed to calculate \Delta S
between two reflectance curves directly, without finding colour locus coordinates (e.g. x,y
; Vorobyev and Osorio 1998). This function uses later formulae to find colour loci in a chromaticity diagram (similarly to Hempel de Ibarra et al. 2001; Renoult et al. 2015).
In lack of a direct measurement, receptor noise (e_i
) can be estimated by the relative abundance of photoreceptor types in the retina, and a measurement of a single photoreceptor noisetosignal ratio:
e_i=\frac{\nu}{\sqrt{\eta _i}}
where \nu
is the noisetosignal ratio of a single photoreceptor, and \eta
is the relative abundance of photoreceptor i in the retina. Alternatively, noise may be dependent of the intensity, but this possibility is not implement in colourvision
yet. Noise dependent of intensity usually holds for low light conditions only (Vorobyev et al. 1998).
ei 
Noise of photoreceptor channels. 
Qri_R1 
Photoreceptor photon catch values from 
Qri_R2 
Photoreceptor photon catch values from 
Ei_R1 
Photoreceptor outputs from the stimulus ( 
Ei_R2 
Photoreceptor outputs from R2 
Xi_R1 
Coordinates in the colour space for R1 
Xi_R2 
Coordinates in the colour space for R2. Equals zero when 
deltaS 
Euclidean distance from R1 to R2. It represents the conspicuousness of the stimulus ( 
Felipe M. Gawryszewski f.gawry@gmail.com
Gawryszewski, F.M. 2018. Colour vision models: Some simulations, a general ndimensional model, and the colourvision R package. Ecology and Evolution, 10.1002/ece3.4288.
Hempel de Ibarra, N., M. Giurfa, and M. Vorobyev. 2001. Detection of coloured patterns by honeybees through chromatic and achromatic cues. J Comp Physiol A 187:215224.
Renoult, J. P., A. Kelber, and H. M. Schaefer. 2017. Colour spaces in ecology and evolutionary biology. Biol Rev Camb Philos Soc, doi: 10.1111/brv.12230
Vorobyev, M., and D. Osorio. 1998. Receptor noise as a determinant of colour thresholds. Proceedings of the Royal Society B 265:351358.
Vorobyev, M., D. Osorio, A. T. D. Bennett, N. J. Marshall, and I. C. Cuthill. 1998. Tetrachromacy, oil droplets and bird plumage colours. J Comp Physiol A 183:621633.
photor
, RNLthres
, CTTKmodel
, EMmodel
, GENmodel
#1
## Photoreceptor sensitivity spectra
##with lambda max at 350nm, 450nm and 550nm:
C<photor(lambda.max=c(350,450,550))
##Grey background
##with 7 percent reflectance from 300 to 700nm:
Rb < data.frame(300:700, rep(7, length(300:700)))
## Read CIE D65 standard illuminant:
data("D65")
##Reflectance data of R1 and R2
R1.1<logistic(x=seq(300,700,1), x0=500, L=50, k=0.04)
R1.2<logistic(x=seq(300,700,1), x0=400, L=50, k=0.04)
w<R1.1[,1]
R1.1<R1.1[,2]+10
R1.2<R1.2[,2]+10
R1<data.frame(w=w, R1.1=R1.1, R1.2=R1.2)
R2<logistic(x=seq(300,700,1), x0=550, L=50, k=0.04)
R2[,2]<R2[,2]+10
## Run model
model<RNLmodel(photo=3, model="log",
R1=R1, R2=R2, Rb=Rb, I=D65, C=C,
noise=TRUE, e = c(0.13, 0.06, 0.12))
#plot
plot(model)
#2
#Pentachromatic animal
## Photoreceptor sensitivity spectra
##with lambda max at 350,400,450,500,and 550nm:
C<photor(lambda.max=c(350,400,450,500,550))
##Grey background
##with 7 percent reflectance from 300 to 700nm:
Rb < data.frame(300:700, rep(7, length(300:700)))
## Read CIE D65 standard illuminant:
data("D65")
##Reflectance data of R1
R1<logistic(x=seq(300,700,1), x0=500, L=50, k=0.04)
R1[,2]<R1[,2]+10
#RNL model
RNLmodel(photo=5, model="log",
R1=R1, R2=Rb, Rb=Rb, I=D65, C=C,
noise=TRUE, e = c(0.13, 0.06, 0.12, 0.07, 0.08))