Removed re-calc to evenly spaced shift from Raman2df().

The first test showed that such an approach would not work
(see comment in Raman2df()).
master
Taha Ahmed 13 years ago
parent 9d67dbfad2
commit 6a312409c3

@ -36,12 +36,10 @@ Raman2df <- function(datafilename) {
ff <- ff[order(ff$shift), ]
# And fix the row.names
row.names(ff) <- seq(1, dim(ff)[1])
# Re-calculate the spectrum with evenly spaced points
# (so that the peak-finding algorithms of diffractometry package may be used)
ff$cshift <- approx(x = ff$shift, y = ff$counts,
method = "linear", n = length(ff$shift))$x
ff$ccounts <- approx(x = ff$shift, y = ff$counts,
method = "linear", n = length(ff$shift))$y
# Do not re-calculate the spectrum with evenly spaced points here!
# You must first remove cosmic peaks, and as long as that is done
# manually, re-calculation to evenly spaced shifts must also be
# done manually.
##
return(ff)
}

Loading…
Cancel
Save