This function exports the MUSIC detection table from a SeaSondeRCS
object to a CSV file.
Details
This function performs the following steps:
Generates a MUSIC table using
seasonder_exportMUSICTable
.Converts the resulting table to a data frame.
Writes the data frame to the specified CSV file using
data.table::fwrite
.
Examples
# Prepare a SeaSondeRCS object for examples, including APM
apm_file <- system.file("css_data/MeasPattern.txt", package = "SeaSondeR")
apm_obj <- seasonder_readSeaSondeRAPMFile(apm_file)
#> seasonder_createSeaSondeRAPM: APM object created successfully.
specs_path <- seasonder_defaultSpecsFilePath("CS")
cs_obj <- seasonder_createSeaSondeRCS(
system.file("css_data/CSS_TORA_24_04_04_0700.cs", package = "SeaSondeR"),
specs_path = specs_path,
seasonder_apm_object = apm_obj
)
#> new_SeaSondeRCS: SeaSondeRCS object created successfully.
cs_obj <- seasonder_initMUSICData(
cs_obj,
range_cells = c(rep(5,11), rep(4,11)),
doppler_bins = c(c(669:679),c(674:684))
)
cs_obj <- seasonder_runMUSIC(cs_obj)
#> seasonder_runMUSIC: MUSIC algorithm started.
#> seasonder_runMUSIC: MUSIC algorithm finished.
# Export MUSIC table to a temporary CSV file
tmpfile <- tempfile(fileext = ".csv")
seasonder_exportCSVMUSICTable(cs_obj, tmpfile)
print(tmpfile)
#> [1] "/tmp/Rtmpz2XTcl/file1ba85b9a7598.csv"