desp: Apply despiking to a given subset

Description Usage Arguments Value

Description

This is a low level function not intended to be used on its own. It is utilized by despike that should be used instead.

Usage

1
desp(b1, b2 = b1, rb1, rb2 = rb1, z, c)

Arguments

z

A numeric value. MAD scale factor.

c

A numeric value. mad scale factor. Default is 3 * mad constant (i.e. 3 * 1.4826 = 4.4478).

block_1

The double-differenced var time series with appropriate block size.

block_2

Serves for computing despiking threshold and can be from the same block as block_1 (default) or from the whole year (more conservative when less data available).

ref_block_1

var values from appropriate block for finding false-flagged spikes by comparison with scaled median absolute deviation.

ref_block_2

var values for computing median and mad from the same block as ref_block_1 (default) or whole year (more conservative when less data available).

Value

A logical vector. TRUE values flag spikes.


grahamstewart12/tidyflux documentation built on June 4, 2019, 7:44 a.m.