create_trace: Create Trace

View source: R/userFunctions.R

create_traceR Documentation

Create Trace

Description

Takes a top and bottom trace on an isolated image and creates line, with MA smoothing

Usage

create_trace(
  traceMatrix,
  start,
  end,
  topEnv,
  bottomEnv,
  thresh = 5,
  MARange = 6,
  region = 2,
  loopNumber = 4
)

Arguments

traceMatrix

The matrix of an isolated trace

start

Start line for the trace

end

End line for the trace

topEnv

The top envelope for the isolated trace Matrix

bottomEnv

The bottom envelope for the isolated trace Matrix

thresh

The threshold for the diff() as a cut off for allowed spikes

MARange

The amount in each direction that the moving average will look at (added to the region value)

region

The region that is smoothed by the moving average

loopNumber

How many times it will go through this process, (to catch the new peaks from smoothing)

Value

Matrix of the line, corrected for the matrix


Bott-binc/magnetoPackage2020 documentation built on Oct. 12, 2024, 7:49 p.m.