fGaussianConvolMultiWl: fGaussianConvolMultiWl

Description Usage Arguments Value Author(s) Examples

View source: R/ConvolutionFunction.R

Description

Function to compute the gaussian convolution on multiple spectral range

Usage

1
2
3
4
fGaussianConvolMultiWl(Wl = Wl, Ref = Ref, CWl.v = CWl.v, FWHM.v = FWHM.v, 


    convol = "Gaussian", weights = NULL)

Arguments

Wl

numeric array: wavelenghts spectrometer to be deconvolved

Ref

numeric array: Reflectance

CWl.v

numeric array: array with the Central Wavelengths

FWHM.v

numeric array: array with the Full-Width at Half Maximum of the central Wavelength

convol

Character: Type of convolution. Default is "Gaussian", alternative "User"

weights

data frame: each column contains the weights of the user-defined convolution function

Value

data frame with the central Wavelength and the result of the gaussian convolution (mean and standard deviation)

Author(s)

Tommaso Julitta, Mirco Migliavacca, Thomas Wutzler

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
data("reflOO")


#Define the center wavlength of the region to be convolved


CWl.v<-c(400,500,600,700)


#Define the corresponding Full Widht at Half Maximum


FWHM.v<-c(8,8,8,8)


#Extract the convoluted values


res<-fGaussianConvolMultiWl(Wl=reflOO$Wl, Ref=reflOO$Ref, CWl.v=CWl.v, FWHM.v=FWHM.v)


#Plot results


plot(reflOO$Wl, reflOO$Ref, ylim=c(0,0.7),xlim=c(400,900), type="l",xlab = "Wl [nm]", ylab= "Reflectance [-]")


points(res$CWl.v, res$RefConvol, col="red")


legend("topleft",col=c("red"),pch=1,cex=1.2,legend=c("Convolved values"),box.col="white")


box()

tommasojulitta/FieldSpectroscopyDP documentation built on March 12, 2020, 1:42 p.m.