Description Usage Arguments Value Author(s) Examples
Compute the Signal to Noise Ratio of a spectrometer
1 2 3 4 | SignalToNoiseRatio(specStats, avgLamp = specStats$meanLamp, sdLamp = specStats$sdLamp,
avgDC = specStats$meanDC, sdDC = specStats$sdDC)
|
specStats |
alternative parameterization data.frame with columns meanLight, sdLight, meanDark, sdDark |
avgLamp |
numeric vector: mean spectrum of n scans of stable lamp |
sdLamp |
numeric vector: sd of the spectra acquired with a stable lamp |
avgDC |
numeric vector: mean spectrum of dark current measurements acquired with the same integration time as the measurements over the lamp |
sdDC |
numeric vector: sd of the dark current spectra acquired with with the same integration time as the measurements over the lamp |
numeric vector: ratio of signal and noise for each wavelength
Tommaso Julitta, Mirco Migliavacca, Thomas Wutzler
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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
data("snr_data")
#perform statistics on spectra
lamp_mean<-StatsOnSpectra(wl=snr_data$wl,spectra=snr_data$data_lamp,fun='mean')
#calculate mean of the lamp signal
lamp_sd<-StatsOnSpectra(wl=snr_data$wl,spectra=snr_data$data_lamp,fun='sd')
#calculate standard deviation of the lamp signal
dc_mean<-StatsOnSpectra(wl=snr_data$wl,spectra=snr_data$data_dc,fun='mean')
#calculate mean of the dark current signal
dc_sd<-StatsOnSpectra(wl=snr_data$wl,spectra=snr_data$data_dc,fun='sd')
#calculate standard deviation of the dark current signal
SNR<-SignalToNoiseRatio(avgLamp =lamp_mean,sdLamp = lamp_sd,avgDC = dc_mean,sdDC = dc_sd)
#plot results
x11();plot(snr_data$wl,SNR,type="l",ylab="SNR",xlab="WL [nm]")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.