Retrieve Self-Spectra Power Matrices for Specified Antenna, Range, and Doppler Intervals
Source:R/SeaSondeRCS.R
seasonder_getSeaSondeRCS_SelfSpectra.Rd
This function returns a list of power spectra extracted from a SeaSondeRCS object for each combination of the specified antennae, range intervals, and Doppler intervals. It allows users to focus on subregions of the self-spectra data. Additionally, the resulting nested list can be collapsed into a single-level list.
Usage
seasonder_getSeaSondeRCS_SelfSpectra(
seasonder_cs_object,
antennae,
dist_ranges = NULL,
doppler_ranges = NULL,
dist_in_km = FALSE,
collapse = FALSE,
smoothed = FALSE
)
Arguments
- seasonder_cs_object
A SeaSondeRCS object containing spectral data.
- antennae
A vector specifying the antenna(s) from which to extract self-spectra. If not named, the antennae will be automatically named as "A1", "A2", etc.
- dist_ranges
Optional. A list (or vector) of range cell indices or ranges of interest. If not provided, it defaults to using the full range available.
- doppler_ranges
Optional. A list (or vector) of Doppler bin indices or ranges of interest. If not provided, defaults to the complete Doppler range.
- dist_in_km
Logical; if
TRUE
, the distance ranges provided in kilometers are converted into range cell numbers.- collapse
Logical; if
TRUE
, the nested list structure of the output is flattened into a single list.- smoothed
Logical; if
TRUE
, smoothed self-spectra data is used (viaseasonder_SmoothSS
); otherwise, raw self-spectra data is used.
Value
A (potentially nested) list of self-spectra power matrices corresponding to each combination
of antenna, range interval, and Doppler interval. If collapse = TRUE
, the list is flattened.
Details
The function operates as follows:
If
doppler_ranges
is not provided, it sets a default list with the full Doppler range, using the total number of Doppler cells.If
dist_ranges
is not provided, it sets a default list with the full range, using the total number of range cells.If any of
antennae
,dist_ranges
, ordoppler_ranges
are not named, they are automatically named using a default naming scheme.Based on the
smoothed
flag, the function retrieves either smoothed self-spectra data viaseasonder_SmoothSS
or raw self-spectra data viaseasonder_getSeaSondeRCS_antenna_SSdata
.If
dist_in_km
isTRUE
, the distance ranges provided in kilometers are converted to range cell numbers usingseasonder_rangeCellsDists2RangeNumber
.For each self-spectra matrix, the function slices the matrix over the specified range and Doppler intervals.
Finally, if
collapse = TRUE
, the nested list is flattened into a single-level list.