Convert Normalized Doppler Frequencies to Doppler Bins
Source:R/SeaSondeRCS.R
seasonder_NormalizedDopplerFreq2Bins.Rd
This function converts a set of normalized Doppler frequencies into their corresponding Doppler bin indices within a SeaSondeR
object.
Value
An integer vector indicating the Doppler bin indices corresponding to the input normalized Doppler frequencies. Values that fall outside the valid bin range are assigned NA
.
Details
This function first retrieves the list of normalized Doppler frequencies from the given SeaSondeR
object using seasonder_getDopplerBinsFrequency
.
The bin boundaries are computed using the first-order difference of these frequencies.
The function then applies findInterval
to determine the corresponding bin index for each input Doppler frequency. The search process is affected by the following options:
rightmost.closed = TRUE
: The last bin interval is closed on the right, ensuring that the maximum normalized frequency is included in the last bin.all.inside = FALSE
: Values that fall outside the range of the computed boundaries are assigned values below 1 or above the maximum bin index.left.open = TRUE
: The left interval is open, meaning that values exactly equal to a boundary are assigned to the higher bin.
After findInterval
determines the bin indices, values that are out of range (bins < 1
or bins > nDoppler
) are set to NA
.
See also
seasonder_Bins2NormalizedDopplerFreq
for the inverse operation.