Export First Order Region (FOR) Boundaries
Source:R/SeaSondeRCS_FOR.R
seasonder_SeaSondeRCSExportFORBoundaries.Rd
This function exports the boundaries of the First Order Region (FOR) for each range cell
from a SeaSondeRCS
object, providing the first and last Doppler bins for both
negative and positive Bragg regions.
Details
Purpose:
This function retrieves the computed FOR data from the SeaSondeRCS
object and extracts
the boundary Doppler bins for each range cell. The result is a data frame with the following columns:
range_cell
: The index of the range cell.first_neg_doppler_cell
: The first Doppler bin in the negative Bragg region.last_neg_doppler_cell
: The last Doppler bin in the negative Bragg region.first_pos_doppler_cell
: The first Doppler bin in the positive Bragg region.last_pos_doppler_cell
: The last Doppler bin in the positive Bragg region.
Steps:
Retrieve the FOR data using
seasonder_getSeaSondeRCS_FOR
.Iterate through each range cell and extract the Doppler bins for both negative and positive Bragg regions.
Determine the range (first and last bins) for each region.
Combine the results into a single data frame, omitting empty entries.
Use Case: This function is useful for exporting the computed FOR boundaries to a format that can be further analyzed or visualized.
See also
seasonder_getSeaSondeRCS_FOR
for retrieving the FOR data.
Examples
# Set sample file paths
cs_file <- system.file("css_data/CSS_TORA_24_04_04_0700.cs", package = "SeaSondeR")
apm_file <- system.file("css_data/MeasPattern.txt", package = "SeaSondeR")
# Read the antenna pattern file to create a SeaSondeRAPM object
apm_obj <- seasonder_readSeaSondeRAPMFile(apm_file)
#> seasonder_createSeaSondeRAPM: APM object created successfully.
# Create a SeaSondeRCS object from a spectral file
cs_obj <- seasonder_createSeaSondeRCS(cs_file, seasonder_apm_object = apm_obj)
#> new_SeaSondeRCS: SeaSondeRCS object created successfully.
boundaries <- seasonder_SeaSondeRCSExportFORBoundaries(cs_obj)
head(boundaries)
#> range_cell first_neg_doppler_cell last_neg_doppler_cell
#> 1 1 NA NA
#> 2 2 NA NA
#> 3 3 336 341
#> 4 4 322 345
#> 5 5 318 350
#> 6 6 325 352
#> first_pos_doppler_cell last_pos_doppler_cell
#> 1 NA NA
#> 2 NA NA
#> 3 NA NA
#> 4 674 685
#> 5 669 699
#> 6 670 707