Skip to contents

This function locates the null point in the First Order Region (FOR) spectrum, which separates the first-order Bragg peak from second-order energy or the noise floor.

Usage

seasonder_findFORNullsInFOR(
  FOR,
  start_point_P,
  doppler_bins,
  left_region = FALSE
)

Arguments

FOR

A numeric vector representing the power spectrum in the FOR region.

start_point_P

A numeric value representing the power threshold at which the search for the null point begins.

doppler_bins

A numeric vector containing the Doppler bins corresponding to the spectrum in FOR.

left_region

A logical value indicating whether the null is being searched for in the negative Bragg region. Default is FALSE.

Value

A numeric value representing the Doppler bin at the detected null position.

Details

The function follows these steps to determine the null point:

  1. If left_region is TRUE, the FOR spectrum and Doppler bins are reversed.

  2. The power spectrum is transformed to facilitate peak identification:

    • The absolute values of the power are taken and multiplied by -1.

    • The start_point_P threshold is also inverted.

  3. The function identifies the first local maximum in the transformed spectrum that exceeds start_point_P.

  4. The corresponding Doppler bin at the detected peak is returned as the null position.

The function relies on pracma::findpeaks to identify the peak.

See also