View source: R/SeaSondeRCSSY.R
seasonder_CSSY_read_csign | R Documentation |
This function reads a raw binary stream from a provided connection, expecting a specific format
that contains the sign bits for complex spectral values. The data is divided into 6 groups corresponding
to: C13r
, C13i
, C23r
, C23i
, C12r
, and C12i
.
seasonder_CSSY_read_csign(connection, key)
connection |
A binary connection to read raw bytes from. |
key |
A list containing:
|
The function performs the following steps:
Reads key$size
bytes from the specified connection.
Checks if enough bytes were read.
Ensures that the total number of bytes is divisible by 6, allowing equal distribution among the groups.
Splits the raw byte vector into 6 groups based on the calculated number of bytes per group.
Converts each byte into its 8-bit representation (using rawToBits
) and flattens the result.
A named list of 6 vectors. Each vector represents one group (e.g., C13r
, C13i
, etc.)
and contains integers (0 or 1) corresponding to the bits (in little-endian order) extracted from the raw data.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.