Read 3D PDA data stream from 'Shimadzu' LCD files.
Usage
read_sz_lcd_3d(
path,
format_out = "matrix",
data_format = "wide",
read_metadata = TRUE,
metadata_format = "shimadzu_lcd",
scale = TRUE
)
Value
A 3D chromatogram from the PDA stream in matrix
or
data.frame
format, according to the value of format_out
.
The chromatograms will be returned in wide
or long
format
according to the value of data_format
.
Details
A parser to read PDA data from 'Shimadzu' .lcd
files. LCD files are
encoded as 'Microsoft' OLE documents. The parser relies on the
olefile package in Python to unpack the
files. The PDA data is encoded in a stream called PDA 3D Raw Data:3D Raw Data
.
The PDA data stream contains a segment for each retention time, beginning
with a 24-byte header.
The 24 byte header consists of the following fields:
4 bytes: segment label (
17234
).4 bytes: Little-endian integer specifying the wavelength bandwidth (?).
4 bytes: Little-endian integer specifying the number of wavelength values in the segment.
4 bytes: Little-endian integer specifying the total number of bytes in the segment.
8 bytes of
00
s
Each segment is divided into two sub-segments, which begin and end with an integer specifying the length of the sub-segment in bytes. All known values in this data stream are little-endian and the data are delta-encoded. The first hexadecimal digit of each value is a sign digit specifying the number of bytes in the delta and whether the value is positive or negative. The sign digit represents the number of hexadecimal digits used to encode each value. Even numbered sign digits correspond to positive deltas, whereas odd numbers indicate negative deltas. Positive values are encoded as little-endian integers, while negative values are encoded as two's complements. The value at each position is derived by subtracting the delta at each position from the previous value.