Introduction

This example demonstrates the use of rEDP for tuning the background of a pattern.

Set up an environment

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)

Create some data

Next, create the data we need

make.test.ed.data(dir=tmp)

Test the background routine

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...



jrminter/rEDP documentation built on April 29, 2020, 6:25 p.m.