The ANGERS dataset is available online and can be downloaded directly wih an R script. This dataset includes both reflectance and transmittance data, as well as a set of mesured chemical constituents, including CHL
,CAR
,EWT
, and LMA
.
# Libraries required
library(prospect)
library(data.table)
# repository where data are stored
gitlab_Rep <- 'https://gitlab.com/jbferet/myshareddata/raw/master/LOP/'
# download ANGERS data
dbName <- 'ANGERS'
# files available
fileName <- list('DataBioch.txt','ReflectanceData.txt','TransmittanceData.txt')
DataBioch <- Refl <- Tran <- list()
DataBioch <- fread(paste(gitlab_Rep,dbName,'/',fileName[[1]],sep=''))
Refl<- fread(paste(gitlab_Rep,dbName,'/',fileName[[2]],sep=''))
Tran <- fread(paste(gitlab_Rep,dbName,'/',fileName[[3]],sep=''))
# Get the wavelengths corresponding to the reflectance and transmittance measurements
lambda <- unlist(Refl[,1], use.names=FALSE)
Refl <- matrix(unlist(Refl[,-1], use.names=FALSE),nrow = length(lambda))
Tran <- matrix(unlist(Tran[,-1], use.names=FALSE),nrow = length(lambda))
# Get the number of samples
nbSamples <- ncol(Refl)
Once the datasets are imported, PROSPECT-D can be inverted using the full spectral domain available, corresponding to the domain from 400 nm to 2450 nm.
CAB, CAR, ANT, EWT, and LMA will be estimated.
# Estimate all parameters for PROSPECT-D
Parms2Estimate = 'ALL'
CHL_ALL <- CAR_ALL <- ANT_ALL <- EWT_ALL <- LMA_ALL <- N_ALL <- c()
InitValues <- data.frame(CHL=40, CAR=10, ANT=0.1, BROWN=0, EWT=0.01, LMA=0.01, N=1.5)
# Adjust spectral domain for SpecPROSPECT to fit leaf optical properties
SubData <- FitSpectralData(SpecPROSPECT=SpecPROSPECT,lambda=lambda,Refl,
Tran =Tran,UserDomain = c(lambda[1],lambda[length(lambda)]))
SubSpecPROSPECT = SubData$SpecPROSPECT
Sublambda = SubData$lambda
SubRefl = SubData$Refl
SubTran = SubData$Tran
print('PROSPECT inversion using full spectral range')
for (i in 1:nbSamples[[1]]){
print(i)
res <- Invert_PROSPECT(SubSpecPROSPECT, Refl = SubRefl[,i], Tran = SubTran[,i],
PROSPECT_version = 'D',Parms2Estimate = Parms2Estimate,
InitValues = InitValues)
CHL_ALL[i] <- res$CHL
CAR_ALL[i] <- res$CAR
ANT_ALL[i] <- res$ANT
EWT_ALL[i] <- res$EWT
LMA_ALL[i] <- res$LMA
N_ALL[i] <- res$N
}
CHL
, CAR
, EWT
and LMA
The results obtained with prospect
are consistent with results obtained with the Matlab function fmincon, although slightly longer to process.
CHL
, CAR
, EWT
and LMA
from ANGERS using PROSPECT-D inversion and full spectral information available.
PROSPECT-D can be inverted using the optimal spectral domain defined for each of the constituents. CAB, CAR, ANT, EWT, and LMA can be estimated. However, no optimal spectral domain has been investigated for ANT so far, so the VNIR domain from 400 nm to 800 nm is used in this case…
# Estimate all parameters for PROSPECT-D
Parms2Estimate = c('CHL','CAR','ANT','EWT','LMA')
# Parms2Estimate = c('LMA')
InitValues <- data.frame(CHL=40, CAR=8, ANT=0.1, BROWN=0, EWT=0.01, LMA=0.01, N=1.5)
print('PROSPECT inversion using optimal setting')
ParmEst <- Invert_PROSPECT_OPT(SpecPROSPECT, lambda=lambda, Refl = Refl,
Tran = Tran, PROSPECT_version = 'D',
Parms2Estimate = Parms2Estimate, InitValues = InitValues)
CHL_OPT <- ParmEst$CHL
CAR_OPT <- ParmEst$CAR
ANT_OPT <- ParmEst$ANT
EWT_OPT <- ParmEst$EWT
LMA_OPT <- ParmEst$LMA
CHL
, CAR
, EWT
and LMA
CHL
, CAR
, EWT
and LMA
from ANGERS using PROSPECT-D inversion and optimal subdomains for each of these constituents.