seasonder_validateCSHeaderStructure | R Documentation |
This function validates the structure of a header list that is expected to represent the metadata for a cross spectra file. It checks if the header is indeed a list and whether mandatory elements, such as the number of range cells and the number of Doppler cells, are present.
seasonder_validateCSHeaderStructure(header)
header |
A list representing the header metadata of a cross spectra file. |
Invisible NULL if the header structure is valid. Otherwise, an error is thrown.
The function primarily checks for two conditions:
Whether the provided header argument is a list.
Whether the nRangeCells and nDopplerCells are present in the header.
This function utilizes the rlang
package to manage conditions and provide
detailed and structured condition messages:
Condition Classes:
seasonder_CS_header_is_not_a_list
: Triggered when the header parameter is not a list.
seasonder_CS_missing_nRange_nDoppler_error
: Triggered when either nRangeCells or nDopplerCells is missing from the header.
header <- list(nRangeCells = 100, nDopplerCells = 256)
seasonder_validateCSHeaderStructure(header)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.