|
|
@ -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)
|
|
|
|
}
|
|
|
|
}
|
|
|
|