flag_scatter: Identify emission scatter.

Description Usage Arguments Value

Description

Identifies sharp spikes in spectra that are composed of relatively few points. Intensity data is filtered with a 3rd order Savitzky–Golay filter using 7 and 21 points. If the first or second derivative at an observed point is 5 times greater when using fewer points, it is flagged as unusually sharp. A continuous cluster of points that occurs within a specified wavelength of the excitation is identified as a spike. If more than one unique excitation is provided, the median spike width is used across all emissions. All integer multiples of the excitation wavelength are also assessed.

Usage

1
2
flag_scatter(excitations, emissions, intensities, order = 3, n1 = 7,
  n2 = 21, r1 = 5, r2 = 5, m1 = 50, m2 = 20)

Arguments

excitations

Vector of excitation wavelengths or a single excitation value.

emissions

Vector of emission wavelengths.

intensities

Vector of emission intensities.

order

Polynomial order to use in Savitzky-Golay filter.

n1

Number of points to use in first Savitzky–Golay.

n2

Number of points to use in second Savitzky–Golay.

r1

Threshold ratio between first derivative of filtered values (first filter divided by second).

r2

Threshold ratio between second derivative of filtered values (first filter divided by second).

m1

Minimum value of first derivative calculated with the first filter.

m2

Minimum value of second derivative calculated with the first filter.

Value

A vector of booleans corresponding to each intensity where TRUE indicates a scatter spike.


ssokolen/fluoroscripts documentation built on May 30, 2019, 8:43 a.m.