From d53a41d0f18918bdffd172ac6f30da191cddb74e Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Feret Date: Thu, 8 Feb 2024 17:35:57 +0100 Subject: [PATCH] new correction related to N structure parameter --- R/Lib_PROSPECT.R | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/R/Lib_PROSPECT.R b/R/Lib_PROSPECT.R index 069ffc8..2ba2daa 100644 --- a/R/Lib_PROSPECT.R +++ b/R/Lib_PROSPECT.R @@ -1,14 +1,14 @@ -# ============================================================================== -# prospect -# Lib_PROSPECT.R -# ============================================================================== -# PROGRAMMERS: -# Jean-Baptiste FERET -# Florian de Boissieu -# Copyright 2020/04 Jean-Baptiste FERET -# ============================================================================== -# This Library includes functions dedicated to PROSPECT simulation -# ============================================================================== +#' ############################################################################# +#' prospect +#' Lib_PROSPECT.R +#' ############################################################################# +#' PROGRAMMERS: +#' Jean-Baptiste FERET jb.feret@teledetection.fr +#' Florian de Boissieu florian.deboissieu@inrae.fr +#' Copyright 2020/04 Jean-Baptiste FERET +#' ============================================================================= +#' This Library includes functions dedicated to PROSPECT simulation +#' ============================================================================= #' core function running PROSPECT #' This function allows simulations using PROSPECT-D or PROSPECT-PRO depending @@ -122,7 +122,7 @@ PROSPECT <- function(SpecPROSPECT = NULL, Input_PROSPECT = NULL, # Case of zero absorption j <- which(r + t >= 1) - Tsub[j] <- t[j] / (t[j] + (1 - t[j]) * (N - 1)) + Tsub[j] <- t[j] / (t[j] + (1 - t[j]) * (Input_PROSPECT$N - 1)) Rsub[j] <- 1 - Tsub[j] # leaf reflectance and transmittance : combine top layer with next N-1 layers