Compute First Order Regions (FOR) Based on Selected Method
Source:R/SeaSondeRCS_FOR.R
seasonder_computeFORs.Rd
This function processes a SeaSondeRCS
object to compute the First Order Regions (FOR)
using the specified method. It allows the user to configure the processing method and parameters dynamically.
Arguments
- seasonder_cs_object
A
SeaSondeRCS
object containing the spectral data and FOR parameters.- method
Optional; A character string specifying the method to be used for FOR computation. Defaults to
NULL
, in which case the method stored in the object is used. Currently supported method:"SeaSonde"
.- FOR_control
Optional; A list of parameters for configuring the FOR computation process. Defaults to
NULL
, in which case the parameters already stored in the object are used.
Details
Steps:
Set Method:
If a method is provided, it updates the
SeaSondeRCS
object with the specified method.
Retrieve Method:
If no method is specified, the function retrieves the method stored in the object.
Set Parameters:
If
FOR_control
is provided, the function updates the object's FOR parameters.
Method Execution:
Based on the selected method, the corresponding processing function is called. Currently, the only supported method is
"SeaSonde"
, which callsseasonder_computeFORsSeaSondeMethod
.
Use Case: This function provides a flexible interface for computing FORs, allowing users to dynamically select methods and configure parameters without modifying the internal object structure.
See also
seasonder_computeFORsSeaSondeMethod
for processing FORs using the SeaSonde method.seasonder_setSeaSondeRCS_FOR_method
for setting the processing method.seasonder_setFOR_parameters
for configuring FOR parameters.
Examples
# Set sample file paths
seasonder_disableMessages()
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)
# Create a SeaSondeRCS object from a spectral file
cs_obj <- seasonder_createSeaSondeRCS(cs_file, seasonder_apm_object = apm_obj)
cs_obj <- seasonder_computeFORs(cs_obj, method = "SeaSonde")
# Retrieve existing FOR control parameters from the object
FOR_control <- seasonder_getSeaSondeRCS_FORConfig(cs_obj)
cs_obj <- seasonder_computeFORs(cs_obj, FOR_control = FOR_control)