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 14 years ago
parent 9d67dbfad2
commit 6a312409c3

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

Loading…
Cancel
Save