SigTimeInterpolation: SigTimeInterpolation

Description Usage Arguments Value Author(s) Examples

View source: R/AdvancedFunctions.R

Description

Compute the linear interpolation of each wavelength of two measuremnts at a specific time occurred in between the two

Usage

1
2
3
4
SigTimeInterpolation(FirstTime, SecndTime, TimeBetween, FirstMeas, 


    SecndMeas)

Arguments

FirstTime

numeric value: time of acquiistion of the first vector

SecndTime

numeric value: time of acquiistion of the second vector

TimeBetween

numeric value: time at which the interpolation want to be done

FirstMeas

numeric vector: spectrum acquire at FirstTime

SecndMeas

numeric vector: spectrum acquire at SecndTime

Value

numeric vector containing spectrum linearly interpolated.

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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
  





data("FloX_data")


data("wl_FloX")





#Define first spectrum


spectrum1<-FloX_data$E[,2]


#Define second spectrum


spectrum2<-FloX_data$E[,3]


#Compute interpolated spectrum


spectrum_int<-SigTimeInterpolation(FirstTime = 10,SecndTime = 25,TimeBetween = 17,FirstMeas = spectrum1,SecndMeas = spectrum2)


#plot


x11()


par(mar=c(5,5,2,2))


plot(wl_FloX,spectrum1,type="l",xlab="WL [nm]",ylab="Digital Counts [-]",ylim = c(0,200000))


lines(wl_FloX,spectrum2,col="green")


lines(wl_FloX,spectrum_int,col="red")


legend("topleft",col=c("black","green","red"),lty=1,cex=1.2,legend=c("spectrum1 ","spectrum2","spectrum_int"),box.col="white")


box()

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