seasonder_CSSW_read_asign {SeaSondeR} | R Documentation |
Read Self Spectra Sign Information from a Connection
Description
This function reads a raw binary stream from a provided connection, expecting a specific format
that contains the sign bits for self spectra values. The data is divided into 3 groups corresponding
to: cs1a
, cs2a
, and cs3a
.
Usage
seasonder_CSSW_read_asign(connection, key)
Arguments
connection |
A binary connection to read raw bytes from. |
key |
A list containing:
|
Details
The function performs the following steps:
Reads
key$size
bytes from the specified connection.Verifies that the number of bytes read matches the expected size.
Checks that the total number of bytes is divisible by 3, allowing equal distribution among the groups.
Splits the raw byte vector into 3 groups based on the calculated number of bytes per group.
Converts each byte into its 8-bit binary representation (using
rawToBits
) and flattens the results for each group.
Value
A named list of 3 vectors, each containing bits as integers (0 or 1) for self spectra sign data.