gediWFMetrics: GEDI full waveform data processing

Description Usage Arguments Details Value See Also Examples

View source: R/C_processExtractMetrics.R

Description

GEDI full waveform data processing and metrics extraction

Usage

 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
56
57
58
59
60
61
62
63
64
65
66
67
68
gediWFMetrics(
  input,
  outRoot,
  writeFit = FALSE,
  writeGauss = FALSE,
  bounds = NULL,
  ground = FALSE,
  useInt = FALSE,
  useFrac = FALSE,
  rhRes = 5,
  laiRes = 10,
  laiH = 30,
  noRHgauss = FALSE,
  gTol = 0,
  fhdHistRes = 0.001,
  forcePsigma = FALSE,
  bayesGround = FALSE,
  dontTrustGround = FALSE,
  noRoundCoord = FALSE,
  noCanopy = FALSE,
  dcBias = 0,
  nSig = 0,
  hNoise = 0,
  linkNoise = NULL,
  linkFsig = NULL,
  linkPsig = NULL,
  trueSig = NULL,
  bitRate = NULL,
  maxDN = NULL,
  renoise = FALSE,
  newPsig = -1,
  oldPsig = 0.764331,
  addDrift = NULL,
  missGround = FALSE,
  minGap = NULL,
  photonCount = FALSE,
  pcl = FALSE,
  nPhotons = 2.1,
  photonWind = 200,
  noiseMult = 0.1,
  rhoVrhoG = 1,
  nPhotC = 2.1,
  nPhotG = -1,
  photHDF = FALSE,
  meanN = 0,
  thresh = 1e-14,
  varNoise = FALSE,
  varScale = NULL,
  statsLen = NULL,
  noiseTrack = FALSE,
  sWidth = NULL,
  psWidth = 0,
  msWidth = NULL,
  preMatchF = FALSE,
  postMatchF = FALSE,
  pFile = NULL,
  gWidth = 1.2,
  minGsig = 0.764331,
  minWidth = 0,
  medNoise = FALSE,
  varDrift = NULL,
  driftFac = NULL,
  rhoG = 0.4,
  rhoC = 0.57,
  pSigma = NULL,
  gold = FALSE,
  deconTol = NULL
)

Arguments

input

gedi.level1bSim (may be a list of objects). Simulated waveform input object(s).

outRoot

name. output filename root

writeFit

write fitted waveform

writeGauss

write Gaussian parameters

bounds

minX minY maxX maxY. only analyse data within bounds

ground

read true ground from file

useInt

use discrete intensity instead of count

useFrac

use fractional hits rather than counts

rhRes

r. percentage energy resolution of RH metrics

laiRes

res. lai profile resolution in metres

laiH

h. height to calculate LAI to

noRHgauss

do not fit Gaussians

gTol

tol. ALS ground tolerance. Used to calculate slope.

fhdHistRes

res. waveform intensity resolution to use when calculating FHD from histograms

forcePsigma

do not read pulse sigma from file

bayesGround

use Bayseian ground finding

dontTrustGround

don't trust ground in waveforms, if included

noRoundCoord

do not round up coords when outputting

noCanopy

do not calculate FHD histograms and LAI profiles

dcBias

n. mean noise level

nSig

sig. noise sigma

hNoise

n. hard threshold noise as a fraction of integral

linkNoise

linkM cov. apply Gaussian noise based on link margin at a cover

linkFsig

sig. footprint width to use when calculating and applying signal noise

linkPsig

sig. pulse width to use when calculating and applying signal noise

trueSig

sig. true sigma of background noise

bitRate

n. digitisation bit rate

maxDN

max. maximum DN

renoise

remove noise from truth before applying new noise level

newPsig

sig. new value for pulse width, when lengthening pulse

oldPsig

sig. old value for pulse width if not defined in waveform file, when lengthening pulse

addDrift

xi. apply detector background drift

missGround

assume ground is missed to assess RH metrics

minGap

gap. delete signal beneath min detectable gap fraction

photonCount

output point cloud from photon counting

pcl

convert to photon counting pulsecompressed

nPhotons

n. mean number of photons

photonWind

x. window length for photon counting search, metres

noiseMult

x. noise multiplier for photoncounting

rhoVrhoG

x. ratio of canopy to ground reflectance at this wavelength. Not different from rhoV and rhoG

nPhotC

n. mean number of canopy photons (replaces nPhotons and rhoVrhoG)

nPhotG

n. mean number of ground photons (replaces nPhotons and rhoVrhoG)

photHDF

write photoncounting

meanN

n. mean noise level, if using a predefined mean level

thresh

n. noise threshold, if using a predefined noise threshold

varNoise

use a variable noise threshold

varScale

x. variable noise threshold scale (multiple of stdev above mean to set threshold)

statsLen

len. length to calculate noise stats over for varNoise

noiseTrack

use noise tracking

sWidth

sig. smoothing width, after densoising

psWidth

sigma. smoothing width, before denoising

msWidth

sig. smoothing width, after noise stats, before denoising

preMatchF

matched filter before denoising

postMatchF

matched filter after denoising

pFile

file. read pulse file, for deconvoltuion and matched filters

gWidth

sig. Gaussian parameter selection smoothing width

minGsig

sig. minimum Gaussian sigma to fit

minWidth

n. minimum feature width in bins

medNoise

use median stats rather than mean

varDrift

correct detector drift with variable factor

driftFac

xi. fix drift with constant drift factor

rhoG

rho. ground reflectance

rhoC

rho. canopy reflectance

pSigma

sig. pulse width to smooth by if using Gaussian pulse

gold

deconvolve with Gold's method

deconTol

deconvolution tolerance

Details

a) Metrics descriptions

a.1) Metrics available to GEDI

a.2) Metrics unavailable to GEDI

a.3) System settings

b) Signal processing description

Value

Returns a list of metrics derived from the simulated full waveform. A text file (txt) containing the metrics will be saved in the output folder (outRoot). Please see the details section for checking the definition of the metrics.

See Also

i) Hancock, S., Armston, J., Hofton, M., Sun, X., Tang, H., Duncanson, L.I., Kellner, J.R. and Dubayah, R., 2019. The GEDI simulator: A large-footprint waveform lidar simulator for calibration and validation of spaceborne missions. Earth and Space Science. https://doi.org/10.1029/2018EA000506

ii) gediSimulator: https://bitbucket.org/StevenHancock/gedisimulator/src/master/

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
56
57
58
59
60
61
62
63
libsAvailable = require(lidR) && require(plot3D)
if (libsAvailable) {
outdir = tempdir()

# Specifying the path to ALS data (zip)
alsfile_Amazon_zip <- system.file("extdata", "Amazon.zip", package="rGEDI")
alsfile_Savanna_zip <- system.file("extdata", "Savanna.zip", package="rGEDI")

# Unzipping ALS data
alsfile_Amazon_filepath <- unzip(alsfile_Amazon_zip,exdir = outdir)
alsfile_Savanna_filepath <- unzip(alsfile_Savanna_zip,exdir = outdir)

# Reading and plot ALS file (las file)
als_Amazon<-readLAS(alsfile_Amazon_filepath)
als_Savanna<-readLAS(alsfile_Savanna_filepath)

# Extracting plot center geolocations
xcenter_Amazon = mean(als_Amazon@bbox[1,])
ycenter_Amazon = mean(als_Amazon@bbox[2,])
xcenter_Savanna = mean(als_Savanna@bbox[1,])
ycenter_Savanna = mean(als_Savanna@bbox[2,])

# Simulating GEDI full waveform
wf_Amazon<-gediWFSimulator(input=alsfile_Amazon_filepath,
                          output=file.path(outdir,"gediWF_amazon_simulation.h5"),
                          coords = c(xcenter_Amazon, ycenter_Amazon))

wf_Savanna<-gediWFSimulator(input=alsfile_Savanna_filepath,
                           output=file.path(outdir,"gediWF_Savanna_simulation.h5"),
                           coords = c(xcenter_Savanna, ycenter_Savanna))

# Extracting GEDI full waveform derived metrics without adding noise to the full waveform
wf_amazon_metrics<-gediWFMetrics(input=wf_Amazon,outRoot=file.path(outdir, "amazon"))
wf_savanna_metrics<-gediWFMetrics(input=wf_Savanna,outRoot=file.path(outdir, "savanna"))

metrics<-rbind(wf_amazon_metrics,wf_savanna_metrics)
rownames(metrics)<-c("Amazon","Savanna")
head(metrics)

# Extracting GEDI full waveform derived metrics after adding noise to the waveform
wf_amazon_metrics_noise<-gediWFMetrics(input=wf_Amazon,
                        outRoot=file.path(outdir, "amazon"),
                        linkNoise= c(3.0103,0.95),
                        maxDN= 4096,
                        sWidth= 0.5,
                        varScale= 3)

wf_savanna_metrics_noise<-gediWFMetrics(
                       input=wf_Savanna,
                       outRoot=file.path(outdir, "savanna"),
                       linkNoise= c(3.0103,0.95),
                       maxDN= 4096,
                       sWidth= 0.5,
                       varScale= 3)

close(wf_Amazon)
close(wf_Savanna)

metrics_noise<-rbind(wf_amazon_metrics_noise,wf_savanna_metrics_noise)
rownames(metrics_noise)<-c("Amazon","Savanna")
head(metrics_noise)

}

rGEDI documentation built on Jan. 19, 2021, 3:01 p.m.