Skip to contents

This function applies a smoothing operation to the self-spectra (SS) matrix of a specific antenna in a SeaSondeR cross-spectral object. The smoothing is performed using a sliding mean over a specified number of Doppler bins.

Usage

seasonder_SmoothSS(seasonder_cs_object, antenna, smoothing = NULL)

Arguments

seasonder_cs_object

A SeaSondeRCS object containing self-spectra data.

antenna

A character or numeric identifier of the antenna whose self-spectra will be smoothed.

smoothing

Optional. An integer specifying the number of Doppler bins used for smoothing. If NULL, the function retrieves the default smoothing factor (nsm) from seasonder_getFOR_parameters.

Value

A matrix with the same dimensions as the input self-spectra matrix, but with smoothed values.

Details

The smoothing process is performed using a centered sliding mean filter with a window of nsm bins. The window extends symmetrically before and after each bin, with adjustments based on whether nsm is even or odd:

  • If nsm is even, the window includes nsm/2 bins before and after the target bin.

  • If nsm is odd, the window includes (nsm - 1)/2 bins before and (nsm - 1)/2 + 1 bins after.

The function utilizes slide_mean to apply the smoothing operation row-wise across the self-spectra matrix.

This smoothing implementation mimics the one performed by the tool AnalyzeSpectra of CODAR's Radial Suite R8.

See also