Skip to contents

This function sets the noise level estimation interval for a SeaSondeRCS object by updating the object's attribute and recalculating the reference noise normalized limits. It then updates the FOR parameters with the new noise limits.

Usage

seasonder_setNoiseLevelEstimationInterval(seasonder_cs_object, interval_value)

Arguments

seasonder_cs_object

A SeaSondeRCS object.

interval_value

A list containing the noise level estimation interval with two elements:

  • low_limit: A numeric value between 0 and 1 representing the lower limit.

  • high_limit: A numeric value between 0 and 1 representing the upper limit.

The low_limit should be less than high_limit.

Value

The updated SeaSondeRCS object with the new noise level estimation interval and reference noise normalized limits.

Details

The function updates the attribute "reference_noise_normalized_limits_estimation_interval" of the SeaSondeRCS object with interval_value. It then computes new reference noise normalized limits by calling seasonder_estimateReferenceNoiseNormalizedLimits with the provided lower and upper limits. Finally, it sets the new noise limits in the FOR parameters using seasonder_setFORParameter.

Examples

new_interval <- list(low_limit = 0.9, high_limit = 1.0)
# Prepare a SeaSondeRCS object with valid data
apm_file <- system.file("css_data/MeasPattern.txt", package = "SeaSondeR")
apm_obj <- seasonder_readSeaSondeRAPMFile(apm_file)
#> seasonder_createSeaSondeRAPM:  APM object created successfully.
cs_file <- system.file("css_data/CSS_TORA_24_04_04_0700.cs", package = "SeaSondeR")
cs_obj <- seasonder_createSeaSondeRCS(
  cs_file,
  specs_path = seasonder_defaultSpecsFilePath("CS"),
  seasonder_apm_object = apm_obj
)
#> new_SeaSondeRCS:  SeaSondeRCS object created successfully.
cs_obj <- seasonder_setNoiseLevelEstimationInterval(cs_obj, new_interval)
print(attr(cs_obj, "reference_noise_normalized_limits_estimation_interval"))
#> $low_limit
#> [1] 0.9
#> 
#> $high_limit
#> [1] 1
#> 
noise_limits <- seasonder_getFOR_parameters(cs_obj)$reference_noise_normalized_limits
print(noise_limits)
#> [1] 2.586848 2.874276