Assess Stability of STS-VIR + FlameNIR spectrometers

Objective

  • Assess heat effect

Procedure

  • Use integration sphere as cover
  • Take spectra at 1’ intervals during 1h
knitr::opts_chunk$set(warning=FALSE, message=FALSE,fig.path='figure/ThermalStab-')
require(lubridate)
require(ggplot2)
require(rgdal)
require(raster)
require(plyr)

1. Data input and handling

dirdat1 <- "/media/alobo/LACIE500/Spectroradiometry/ADRIA/Tests/QualityTests/20160722_time_measures"
files1 <- list.files(path=dirdat1,pattern="*.txt")
spectres <- cbind(read.csv(file.path(dirdat1,files1[1]),header=FALSE,sep=" "),files1[1],0)
names(spectres) <- c("wavelength","radiance","file","time")
head(spectres)
for (i in 2:length(files1)){
    delme <- cbind(read.csv(file.path(dirdat1,files1[i]),header=FALSE,sep=" "),files1[i],i)
    names(delme) <- c("wavelength","radiance","file","time")
    spectres <- rbind(spectres,delme)
}
rm(delme)
ref <- spectres$radiance[spectres$file=="0001.txt"]
spectres$ref <- rep(ref,length(files1))

2. Plots

2.1 Radiance vs. Wavelength (observations and linear models)

ggplot(data=spectres[spectres$wavelength<=850,]) +
    geom_line(aes(x=wavelength, y=radiance, group=file),alpha=I(0.1))+
    stat_smooth(aes(x=wavelength,y=radiance, group=file,color=time),
                method=lm, alpha=0.01,level=0) + 
    scale_colour_gradientn(colours=rev(rainbow(4))) +
    ggtitle("STS-VIS Stability \n Dark readings during 1h at 1' lapse")
ggplot(data=spectres[spectres$wavelength>850,]) +
    geom_line(aes(x=wavelength, y=radiance, group=file)) +
    stat_smooth(aes(x=wavelength,y=radiance, group=file, color=time),
                method=lm, alpha=0.01,level=0) + 
    scale_colour_gradientn(colours=rev(rainbow(4))) +
    ggtitle("Flame-NIR Stability \n Dark readings during 1h at 1' lapse")
ggplot(data=spectres[spectres$wavelength<=850,]) +
    #geom_line(aes(x=wavelength, y=radiance, group=file),alpha=I(0.1))+
    stat_smooth(aes(x=wavelength,y=radiance, group=file,color=time),
                method=lm, alpha=0.01,level=0) + 
    scale_colour_gradientn(colours=rev(rainbow(4))) +
    ggtitle("STS-VIS Stability \n Dark readings during 1h at 1' lapse")
ggplot(data=spectres[spectres$wavelength>850,]) +
    #geom_line(aes(x=wavelength, y=radiance, group=file)) +
    stat_smooth(aes(x=wavelength,y=radiance, group=file, color=time),
                method=lm, alpha=0.01,level=0) + 
    scale_colour_gradientn(colours=rev(rainbow(4))) +
    ggtitle("Flame-NIR Stability \n Dark readings during 1h at 1' lapse")

plot of chunk unnamed-chunk-3plot of chunk unnamed-chunk-3plot of chunk unnamed-chunk-3plot of chunk unnamed-chunk-3

2.2 Radiance vs. Radiance at t=0 (scatterplots and linear models)

ggplot(data=spectres[spectres$wavelength<=850,]) +
    geom_point(aes(x=ref, y=radiance, group=file,color=time),size=1,show_guide=FALSE)+
    #stat_smooth(aes(x=ref,y=radiance, group=file),
    #           method=lm, alpha=0.01,level=0.95) +
    xlab("Radiance at t_0'") + ylab("Radiance at t_i'") +
    scale_colour_gradientn(colours=rev(rainbow(4))) +
    ggtitle("STS-VIS Stability \n Dark readings during 1h at 1' lapse")
ggplot(data=spectres[spectres$wavelength>850,]) +
    geom_point(aes(x=ref, y=radiance, group=file,color=time),size=1,show_guide=FALSE) +
    #stat_smooth(aes(x=ref,y=radiance, group=file),
    #           method=lm, alpha=0.01,level=0.95) +
    xlab("Radiance at t_0'") + ylab("Radiance at t_i'") +
    scale_colour_gradientn(colours=rev(rainbow(4))) +
    ggtitle("Flame-NIR Stability \n Dark readings during 1h at 1' lapse")
ggplot(data=spectres[spectres$wavelength<=850,]) +
    # geom_point(aes(x=ref, y=radiance, group=file,color=file)) +
    stat_smooth(aes(x=ref,y=radiance, group=file, color=time),
                show_guide=FALSE, method=lm, alpha=0.01,level=0.95) +
    xlab("Radiance at t_0'") + ylab("Radiance at t_i'") +
    scale_colour_gradientn(colours=rev(rainbow(4))) +
    ggtitle("SS-VIS Stability: Linear Model fits \n Dark readings during 1h at 1' lapse")
ggplot(data=spectres[spectres$wavelength>850,]) +
    # geom_point(aes(x=ref, y=radiance, group=file,color=file)) +
    stat_smooth(aes(x=ref,y=radiance, group=file, color=time), 
                show_guide=FALSE, method=lm, alpha=0.01,level=0.95) +
    xlab("Radiance at t_0'") + ylab("Radiance at t_i'") +
    scale_colour_gradientn(colours=rev(rainbow(4))) +
    ggtitle("Flame-NIR Stability: Linear Model fits \n Dark readings during 1h at 1' lapse")

plot of chunk unnamed-chunk-4