peakfind: peakfind

Description Usage Arguments Value References Examples

View source: R/peakfind.R

Description

The function allows you to roughly estimate A,u,sig parameters will fit in the Gaussian decomposition.

Usage

1
peakfind(x, smooth = TRUE, thres = 0.2, width = 3)

Arguments

x

is a waveform with a index at the begining mainly to .

smooth

is tell whether you want to smooth the waveform to reduce the effect of some obvious noise. Default is TRUE.

thres

is to determine if the detected peak is the real peak whose intensity should be higher than threshold*maximum intensity. Default is 0.2.

width

width of moving window.Default is 3, must be integer between 1 and n. This parameter ONLY work when the smooth is TRUE.

Value

return a list contains waveform index, rough estimates of A, u, sig.

References

Tan Zhou, and Sorin C. Popescu, 2017. Bayesian decomposition of full waveform LiDAR data with uncertainty analysis. Remote Sensing of Environment 200 (2017): 43-62.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
##import return waveform data
data(return)
ind<-c(1:nrow(return))
return<-data.frame(ind,return)
x<-return[1,] ###must be must be a dataset incluing intensity with index at the beginning.
peakfind(x) ## index, estimated A, u, and sig

##to get accurate estimates of A, u,g, you need to explore your dataset to optimized parameters.
##generally thres affects a lot, assigning smooth to TRUE is preferable in most of cases.
#for the whole dataset
dr<-apply(return,1,peakfind)
####to manage data and store in a data frame.
rpf<-do.call("rbind",lapply(dr,"[[",1))

tankwin08/waveformlidar documentation built on Sept. 26, 2020, 10:05 p.m.