maxamp: maxamp

Description Usage Arguments Value Examples

View source: R/maxamp.R

Description

The function allows you to find the maximum amplitude of waveform above the ground (not the whole waveform) if this waveform come from vegetation with more than 1 peaks. Otherwise it will give the last peak's corresponding intensity. The identified maximum intensity can be used to calculate the height from waveform ending or waveform begining.

Usage

1
maxamp(y, smooth = TRUE, thres = 0.2, width = 3)

Arguments

y

is the waveform intensities. If you have other information, you should delete these intensites before you run this function .

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 the largest amplitude above the ground for the waveform with more than two peaks and ground amplitude for the waveform with one peak.

Examples

1
2
3
4
5
6
7
data(return)
x<- return[1,]

rx<- maxamp(x)
###for more complicated waveforms
x1<- return[182,]
rx1<- maxamp(x1)

waveformlidar documentation built on Aug. 1, 2020, 5:07 p.m.