Open dlebauer opened 7 years ago
On April 15 we captured hyperspectral images of target objects at 15 min intervals throughout the day. See also https://github.com/terraref/computing-pipeline/issues/289
Here is a picture of the calibration targets:
This is how you can get started extracting data from the VNIR files:
(you will want to get some files close in time to where you have validation measurements)
library(ncdf4) library(dplyr) hsi_calibration_dir <- '/data/terraref/sites/ua-mac/Level_1/hyperspectral/2017-04-15' hsi_calibration_files <- dir(hsi_calibration_dir, recursive = TRUE, full.names = TRUE) fileinfo <- bind_rows(lapply(hsi_calibration_files, file.info)) %>% mutate(size_gb = size/1073741824) calibration_nc <- nc_open(hsi_calibration_files[200]) a <- calibration_nc$var$rfl_img #calibration_nc$dim$x$len 1600 #calibration_nc$dim$y$len x_length <- round(calibration_nc$dim$x$len / 10) y_length <- round(calibration_nc$dim$y$len * 3/4) xstart <- ceiling(calibration_nc$dim$x$len / 2) - floor(x_length / 2) + 1 ystart <- ceiling(calibration_nc$dim$y$len / 2) - floor(y_length / 2) + 1 rfl <- ncvar_get(calibration_nc, 'rfl_img', #start = c(1, xstart, ystart), #count = c(955, x_length, y_length) start = c(1, 100, 100), count = c(calibration_nc$dim$wavelength$len, 160, 1324) ) x <- ncvar_get(calibration_nc, 'x', start = 100, count = 160) y <- ncvar_get(calibration_nc, 'y', start = 100, count = 1324) lambda <- calibration_nc$dim$wavelength$vals for(i in 1 + 0:10*95){ image(rfl[i,,], xlab = 'x (m)', ylab = 'y (m)', col = rainbow(n=100), main = paste('wavelength', udunits2::ud.convert(lambda[i],'m','nm'))) }
On April 15 we captured hyperspectral images of target objects at 15 min intervals throughout the day. See also https://github.com/terraref/computing-pipeline/issues/289
Here is a picture of the calibration targets:
This is how you can get started extracting data from the VNIR files:
(you will want to get some files close in time to where you have validation measurements)