preProcess_removeTrend: Level a breech face impression surface matrix by a...

Description Usage Arguments Value Examples

Description

Level a breech face impression surface matrix by a conditional statistic

Usage

1
preProcess_removeTrend(x3p, statistic = "mean", ...)

Arguments

x3p

an x3p object containing the surface matrix of a cartridge case scan

statistic

either "mean" or "quantile"

...

arguments to be set in the quantreg::rq function if statistic = "quantile" is set. In this case, tau = .5 and method = "fn" are recommended

Value

an x3p object containing the leveled cartridge case scan surface matrix.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#Process fadul1.1 "from scratch" (takes > 5 seconds to run)
## Not run: 
nbtrd_link <- "https://tsapps.nist.gov/NRBTD/Studies/CartridgeMeasurement/"
fadul1.1_link <- "DownloadMeasurement/2d9cc51f-6f66-40a0-973a-a9292dbee36d"

fadul1.1 <- x3ptools::read_x3p(paste0(nbtrd_link,fadul1.1_link))
fadul1.1_extCropped <- preProcess_crop(x3p = fadul1.1,
                                       region = "exterior",
                                       radiusOffset = -30)

fadul1.1_intCroped <- preProcess_crop(x3p = fadul1.1_extCropped,
                                      region = "interior",
                                      radiusOffset = 200)

fadul1.1_leveled <- preProcess_removeTrend(x3p = fadul1.1_intCroped,
                                           statistic = "quantile",
                                           tau = .5,
                                           method = "fn")

x3pListPlot(list("Original" = fadul1.1,
                 "Ext. Cropped" = fadul1.1_extCropped,
                 "Ext. & Int. Cropped" = fadul1.1_intCroped,
                 "Cropped and Leveled" = fadul1.1_leveled))

## End(Not run)

cmcR documentation built on April 5, 2021, 5:09 p.m.