Skip to contents

This function estimates the noise level in the self-spectra of a SeaSondeR cross‐spectral object. The noise level is determined by averaging the spectral power over a predefined frequency range where no first-order Bragg signal is expected. This value is later used in setting signal-to-noise thresholds for FOR detection.

Usage

seasonder_computeNoiseLevel(seasonder_cs_object, antenna = 3, smoothed = FALSE)

Arguments

seasonder_cs_object

A SeaSondeRCS object containing spectral data and FOR parameters.

antenna

A numeric value specifying the antenna from which to extract self-spectra (default is 3).

smoothed

Logical; if TRUE, the function uses a smoothed version of the self-spectra.

Value

The updated SeaSondeRCS object with the computed noise level stored in its attributes.

Details

The noise level is computed via the following steps:

  1. Determine Noise Reference Limits:

    • Retrieves the normalized Doppler frequency limits for noise reference from the FOR parameters (using seasonder_getFOR_parameters).

    • Converts these normalized limits into Doppler bin indices using seasonder_SwapDopplerUnits.

    • If any of the resulting bin indices are missing, they are replaced with appropriate default boundaries (i.e., upper limit set to the total number of Doppler cells and lower limit set to 1).

  2. Extract Spectral Data for Noise Estimation:

    • The function extracts the self-spectra from the specified antenna (using seasonder_getSeaSondeRCS_SelfSpectra), limiting the extraction to the Doppler bins within the computed noise reference range (both negative and positive regions).

  3. Compute the Average Noise Level:

    • The spectral data from both the negative and positive Doppler regions are concatenated, and the row-wise mean is calculated to estimate the average noise level.

  4. Store the Noise Level:

    • The computed average noise level is stored in the object's NoiseLevel attribute by calling seasonder_setSeaSondeRCS_NoiseLevel.

    • A processing step message is logged using SeaSondeRCS_computeNoiseLevel_step_text.

The resulting noise level is essential for setting accurate thresholds during FOR detection.

See also