Commit 0ba7dee1 authored by jbferet's avatar jbferet
Browse files

fixed conflict with function check_data

parent 99965dd2
...@@ -68,7 +68,7 @@ change_resolution_HDR <- function(HDR, window_size) { ...@@ -68,7 +68,7 @@ change_resolution_HDR <- function(HDR, window_size) {
# @param Spectral summary of spectral information: which spectral bands selected from initial data # @param Spectral summary of spectral information: which spectral bands selected from initial data
# #
# @return updated DataMatrix and Spectral # @return updated DataMatrix and Spectral
check_data <- function(DataMatrix, Spectral) { check_invariant_bands <- function(DataMatrix, Spectral) {
# samples with inf value are eliminated # samples with inf value are eliminated
for (i in 1:ncol(DataMatrix)) { for (i in 1:ncol(DataMatrix)) {
elim <- which(DataMatrix[, i] == Inf) elim <- which(DataMatrix[, i] == Inf)
......
...@@ -53,7 +53,7 @@ perform_PCA <- function(ImPath, ImPathShade, Output.Dir, Continuum.Removal = TR ...@@ -53,7 +53,7 @@ perform_PCA <- function(ImPath, ImPathShade, Output.Dir, Continuum.Removal = TR
} }
DataSubset <- Subset$DataSubset DataSubset <- Subset$DataSubset
# clean reflectance data from inf and constant values # clean reflectance data from inf and constant values
CleanData <- check_data(DataSubset, Spectral) CleanData <- check_invariant_bands(DataSubset, Spectral)
DataSubset <- CleanData$DataMatrix DataSubset <- CleanData$DataMatrix
Spectral <- CleanData$Spectral Spectral <- CleanData$Spectral
...@@ -105,7 +105,7 @@ perform_PCA <- function(ImPath, ImPathShade, Output.Dir, Continuum.Removal = TR ...@@ -105,7 +105,7 @@ perform_PCA <- function(ImPath, ImPathShade, Output.Dir, Continuum.Removal = TR
# # # assume that 1st data cleaning is enough... # # # assume that 1st data cleaning is enough...
## Uncommented June 5, 2019 ## Uncommented June 5, 2019
# clean reflectance data from inf and constant values # clean reflectance data from inf and constant values
CleanData <- check_data(DataSubset, Spectral) CleanData <- check_invariant_bands(DataSubset, Spectral)
DataSubset <- CleanData$DataMatrix DataSubset <- CleanData$DataMatrix
Spectral <- CleanData$Spectral Spectral <- CleanData$Spectral
print("perform PCA#2 on the subset image") print("perform PCA#2 on the subset image")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment