get_grooves_middle: Use the center of a crosscut

Description Usage Arguments Value Examples

View source: R/get_grooves_middle.R

Description

Use the center of a crosscut

Usage

1
get_grooves_middle(x, value, middle = 75, return_plot = F)

Arguments

x

numeric vector of locations in microns

value

numeric vector of surface measurements in microns

middle

middle percent to use for the identification

return_plot

return plot?

Value

list of groove vector and plot of crosscut, if return_plot is true

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
## Not run: 
# Set the data up to be read in, cleaned, etc.
library(bulletxtrctr)
library(x3ptools)

example_data <- bullet_pipeline(
  location = list(Bullet1 = c(hamby252demo$bullet1[3])),
  stop_at_step = "crosscut",
  x3p_clean = function(x) x %>%
      x3p_scale_unit(scale_by = 10^6) %>%
      rotate_x3p(angle = -90) %>%
      y_flip_x3p()
)

get_grooves_middle(example_data$ccdata[[1]]$x,
  example_data$ccdata[[1]]$value,
  return_plot = T
)
cc_locate_grooves(example_data$ccdata[[1]],
  method = "middle",
  return_plot = T
)

## End(Not run)

heike/grooveFinder documentation built on Dec. 31, 2019, 12:33 p.m.