The leaf optical properties used in Feret et al. 2020 are available online and can be downloaded directly wih an R script. They corespond to the LOPEX dataset, split into 4 specific datasets:
LOPEX_DRY_CAL and LOPEX_FRESH_CAL correspond to the dry and fresh samples extracted from the LOPEX dataset and used for the calibration of PROSPECT-PRO
LOPEX_DRY_VAL and LOPEX_FRESH_VAL correspond to the dry and fresh samples extracted from the LOPEX dataset and used for the validation of PROSPECT-PRO
These datasets include both reflctance and transmittance data, as well as a set of mesured checmical constituents, including EWT
, LMA
, PROT
and CBC
.
# Libraries required
library(prospect)
library(data.table)
# repository where data are stored
gitlab_Rep <- 'https://gitlab.com/jbferet/myshareddata/raw/master/LOP/'
# Datasets
dbName <- list('LOPEX_DRY_CAL','LOPEX_FRESH_CAL','LOPEX_DRY_VAL','LOPEX_FRESH_VAL')
# files available
fileName <- list('DataBioch.txt','ReflectanceData.txt','TransmittanceData.txt')
# download LOPEX data
DataBioch <- Refl <- Tran <- list()
i = 0
for (db in dbName){
DataBioch[[db]] <- fread(paste(gitlab_Rep,db,'/',fileName[[1]],sep=''))
Refl[[db]] <- fread(paste(gitlab_Rep,db,'/',fileName[[2]],sep=''))
Tran[[db]] <- fread(paste(gitlab_Rep,db,'/',fileName[[3]],sep=''))
}
Once the datasets are imported, PROSPECT-PRO can be inverted using the optimal spectral domains corresponding to each of the constituents of interest. EWT, PROT and CBC will be estimated, and their optimal spectral domain defined based on te results obtained by Feret et al. (RSE 2020).
OptDomain = list('EWT' = c(1700,2400),'PROT' = c(2125,2175), 'CBC' = c(2025,2350))
# ref: Feret et al., (RSE 2020)
#
Parms2Estimate = c('EWT','PROT','CBC','N')
EWT_mod <- PROT_mod <- CBC_mod <- list()
# perform PROSPECT inversion using the optimal spectral domains for EWT, PROT and CBC
for (parm in Parms2Estimate){
if (parm == 'EWT' | parm == 'PROT' | parm == 'CBC'){
for (db in dbName){
lambda <- unlist(Refl[[db]][,1], use.names=FALSE)
Refl_tmp <- matrix(unlist(Refl[[db]][,-1], use.names=FALSE),nrow = length(lambda))
Tran_tmp <- matrix(unlist(Tran[[db]][,-1], use.names=FALSE),nrow = length(lambda))
# Fit spectral data to match PROSPECT with user optical properties
SubData <- FitSpectralData(SpecPROSPECT=SpecPROSPECT,lambda=lambda,Refl=Refl_tmp,
Tran=Tran_tmp,UserDomain = OptDomain[[parm]])
SubSpecPROSPECT = SubData$SpecPROSPECT
Sublambda = SubData$lambda
SubRefl = SubData$Refl
SubTran = SubData$Tran
# Invert PROSPECT with optimal spectral information
for (i in 1:ncol(SubRefl)){
print(i)
res <- Invert_PROSPECT(SubSpecPROSPECT,Refl = SubRefl[,i],
Tran = SubTran[,i],PROSPECT_version = 'PRO',
Parms2Estimate = Parms2Estimate)
# only save results for variable of interest
if (parm=='EWT'){EWT_mod[[db]][i] <- res$EWT}
if (parm=='PROT'){PROT_mod[[db]][i] <- res$PROT}
if (parm=='CBC'){CBC_mod[[db]][i] <- res$CBC}
}
}
}
}
PROT
, CBC
, EWT
and LMA
The reults obtained here are very close to those obtained with Matlab, using the same algorithm.
PROT
, CBC
, EWT
and LMA
as PROT
+CBC
using PROSPECT-PRO inversion
For the sake of comparison, the comparison of the results obtained with Matlab and R are presented in Fig. 2.
the performances are identical. The parameterization of the inversion may not be appropriate and fail to converge. In this case, the inversion returns NA
s and the Tolerance
parameter of the iterative optimization is adjusted to a higher value in order to converge. Tolerance
is increased automatically as long as the convergence is not reached, to a certain extent. If convergence is not obtained for Tolerance = 1e-2
, then the inversion returns NA
s.
PROT
, CBC
, EWT
and LMA
as PROT
+CBC
using PROSPECT-PRO inversion