This example demonstrates the use of rEDP for tuning the background of a pattern.
First, create a clean environment and load the packages we need. We will work in our $TEMP
directory. You do have one defined, don't you...
rm(list=ls()) library(rPeaks) library(rEDP) tmp <- Sys.getenv("TEMP") tmp <- gsub("\\\\", "/", tmp) tmp <- paste0(tmp,'/') print(tmp)
Next, create the data we need
make.test.ed.data(dir=tmp)
bl <- tune.edp.baseline.dm(dat.path=tmp, main=NA)
We see we got a plot of the background fit. it does not look too bad. Now let's look at what tune.edp.baseline.dm
returned.
print(str(bl))
We see that we got a list of five items. The first two items are the starting and ending radii for the fit, in pixels. The second two items are the size of the window (always odd, and expressed as a string) and the order of the fit (always even, between 2 and 8, and expressed as a string.) Finally, we get a data frame containing the radius (px), raw intensity, and background subtracted intensity as columns. This gives us lots of control...
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.