DCSubtraction: DCSubtraction

Description Usage Arguments Value Author(s) Examples

Description

Remove the dark current signal from the signal itself. Preferably remove the dark spectrum from the signal spectrum. In case no dark spectrum is acquired it use the average value of the optically black pixels

Usage

1
DCSubtraction(signal, DarkSignal, type = 1, BlackPixels = 1:4)

Arguments

signal

numeric data.frame or vector: in case of data frame the number of colums refer to the number of spectra acquired

DarkSignal

numeric data.frame or vector: in case of data frame the number of colums refer to the number of dark spectra acquired

type

numeric value: 1 in case dark spectra have been acquired; 2 in case optically black pixels have to be used

BlackPixels

numeric vector: vector containing the number of the optically black pixels

Value

numeric data.frame or vector: spectra with durk current removed

Author(s)

Tommaso Julitta, Mirco Migliavacca, Thomas Wutzler

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
  


data("snr_data")


data("rad_cal")





dataDCsubtracted<-DCSubtraction(signal = snr_data$data_lamp,DarkSignal = snr_data$data_dc)


x11();plot(rad_cal$wl,snr_data$data_lamp[,1],type="l",ylim=c(0,16000),ylab="Digital Counts",xlab="WL [nm]")


lines(rad_cal$wl,snr_data$data_dc[,1],col="red");lines(rad_cal$wl,dataDCsubtracted[,1],col="blue")


legend("topleft",col=c("black","red","blue"),lty=1,cex=1.2,legend=c("Signal","dark current","Signal DC subtracted"),box.col="white")


box()

tommasojulitta/FieldSpectroscopyCC documentation built on May 31, 2019, 6:19 p.m.