Skip to contents

This function validates and assigns the Doppler interpolation factor in the SeaSondeRCS object, updating the corresponding option in the MUSIC_data field.

Usage

seasonder_setSeaSondeRCS_MUSIC_doppler_interpolation(
  seasonder_cs_object,
  doppler_interpolation
)

Arguments

seasonder_cs_object

A SeaSondeRCS object containing radar data and metadata.

doppler_interpolation

An integer specifying the Doppler interpolation factor. Must be 1, 2, 3, or 4.

Value

The SeaSondeRCS object with the updated Doppler interpolation option.

Details

The function performs the following operations:

  1. Validates the value of doppler_interpolation using the function SeaSondeRCS_MUSIC_validate_doppler_interpolation.

  2. Updates the attribute MUSIC_options$doppler_interpolation of the SeaSondeRCS object with the validated value.

See also

SeaSondeRCS_MUSIC_validate_doppler_interpolation for Doppler interpolation factor validation.

Examples

# Create a valid SeaSondeRCS object for examples
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")
apm_obj <- seasonder_readSeaSondeRAPMFile(apm_file)
#> seasonder_createSeaSondeRAPM:  APM object created successfully.
cs_object <- seasonder_createSeaSondeRCS(cs_file, seasonder_apm_object = apm_obj)
#> new_SeaSondeRCS:  SeaSondeRCS object created successfully.
# Set the Doppler interpolation factor to 2 (internal alias)
cs_object <- seasonder_setSeaSondeRCS_MUSIC_doppler_interpolation(cs_object, 2)