View source: R/SeaSondeRCS_FOR.R
seasonder_findFORNullsInFOR | R Documentation |
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.
seasonder_findFORNullsInFOR(
FOR,
start_point_P,
doppler_bins,
left_region = FALSE
)
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 |
left_region |
A logical value indicating whether the null is being searched for in the negative Bragg region. Default is |
The function follows these steps to determine the null point:
If left_region
is TRUE
, the FOR spectrum and Doppler bins are reversed.
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.
The function identifies the first local maximum in the transformed spectrum that exceeds start_point_P
.
The corresponding Doppler bin at the detected peak is returned as the null position.
The function relies on pracma::findpeaks
to identify the peak.
A numeric value representing the Doppler bin at the detected null position.
seasonder_findFORNullsInSpectrum
for locating nulls in a full spectrum.
findpeaks
for peak detection.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.