estres: Estimate Signal Resolution

View source: R/signal.R

estresR Documentation

Estimate Signal Resolution

Description

Estimate the resolution (approximate sampling rate) of a signal based on its domain values.

Usage

estres(x, tol = NA, ref = NA_character_)

Arguments

x

A numeric vector giving the domain values of the signal.

tol

The tolerance allowed when determining if the estimated resolution is valid (i.e., actually matches the given domain values). Noise in the sampling rate will be allowed up to this amount. If NA (the default), then the resolution is simply calculated as the smallest difference between sorted domain values.

ref

If 'abs', then comparison is done by taking the absolute difference. If 'x', then relative differences are used. If missing, then the funciton will try to determine which gives a better fit to the domain values.

Value

A single number named "absolute" or "relative" giving the approximate constant sampling rate matching the given domain values. NA if a sampling rate could not be determined.

Author(s)

Kylie A. Bemis

Examples

x <- seq_rel(501, 600, by=1e-3)

estres(x)

kuwisdelu/matter documentation built on Dec. 8, 2024, 8:09 p.m.