afm_trim: Trim extreme values from afm maps

Description Usage Arguments Value Examples

Description

This function will floor extreme values from an afm map. You can inspect the distribution of values in an afm map with 'afm_hist()' and then trim extreme values either by quantile or specific cutoff. By default the cutoffs will be set to the upper 97.5 you can set the minimum and maximum values specifically using the 'min' and 'max' arguments. The trimmed data will be added to your afm_scan object under 'maps' as eg. Height_Sensor_matrix_trimmed. The trimmed data should never be used for calculation, only to improve image quality.

Usage

1
2
afm_trim(data = NULL, matrix = NULL, lower = 0.025, upper = 0.975,
  min = NULL, max = NULL)

Arguments

data

an "afm_scan" data object

matrix

the name of the afm map you want to trim

lower

the lower quantile (default 0.025)

upper

the upper quantile (default 0.975)

min

the minimum value cutoff (overrides quantile)

max

the maximum value cutoff (overrides quantile)

Value

an "afm_scan" data object with the trimmed matrix added under 'maps'

Examples

1
2
load("data/half_um_scan.rda")
afm_trim(half_um_scan, matrix = "Height_Sensor_matrix")

will-r-chase/afmr documentation built on May 9, 2019, 4:11 p.m.