seasonder_validateCSFileData | R Documentation |
This function performs multiple validation checks on a provided CS file in the SeaSondeR system. It checks the file for various conditions to determine if it meets the SeaSondeR standards.
seasonder_validateCSFileData(filepath, header)
filepath |
A character string indicating the path to the CS file to validate. |
header |
A list containing header information of the CS file. |
The function performs the following validation checks:
Verifies that the file size is greater than 10 bytes.
Validates the nCsFileVersion
field in the header to ensure it's between 1 and 32.
Depending on the nCsFileVersion
, verifies the appropriate file size, and the extent of various version headers (nV1Extent
, nV2Extent
, etc.).
Validates the nRangeCells
and nDopplerCells
fields to ensure they are within permissible ranges.
Depending on the nCsKind
value, validates the file size against expected sizes based on nRangeCells
, nSpectraChannels
, and nDopplerCells
.
NULL invisibly. The function mainly serves to validate and will stop execution and log an error using seasonder_logAndAbort
if any condition fails.
This function utilizes the rlang
package to manage conditions and provide detailed and structured condition messages:
Condition Classes:
seasonder_validate_cs_file_error
: An error class that indicates a validation requirement was not met.
Condition Cases:
Failure on any validation test.
Cross Spectra File Format Version 6. CODAR. 2016
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.