![]() |
das2C
das core C utilities (v3)
|
Das streams are a self-describing, streamable format that allows for the transmission of large and complex data sets between different systems and programming environments. Unlike common file formats, streaming data formats do not provide total lengths embedded in array headers, and they do not provide arrays as a single continuous block of memory, instead everything is record oriented, including the number of records! Stream processors are able to perform calculations on data as it passes from input to output. Handling data as streams allows for processing effectively infinite datasets on modest hardware. Stream data processing is the heart of Das.
Das systems have been around for a while. This a short video provides a historical overview of das processing.
The initial version, now called das1 was designed by Larry Granroth at U. Iowa in 1996 and provided web forms for driving server-side processing that creating static plots which were then displayed in a browser. Processing was broken in to readers which generated data streams and plotters which provided graphical output. Readers were space-mission specific, but plotters were not. This basic division continues through das3.
Work on the now widely deployed das2 system began in 2002 with the goal of bringing mission agnostic interactive display and analysis tools to the desktop. A precise description of das v2.2 streams can be found in the das v2.2.2 Iterface Control Document on github. The most successful outgrowth of das2 is the feature-rich Autoplot Java application.
This edition of das2C adds support for das3 streams via the new dataset.c and codec.c modules. It also provides support for the fault-tolerant das federated catalog via node.c, and many more new features. Supporting more complex datasets and reduction algorithms required a new data model which is depicted in the diagram below. Keeping the following container hierarchy in mind will help while buried deep in code.
External projects providing other new das3 tools include:
In addition to the C library, a small collection of stream processing programs are included in the utilities folder. These are:
A das stream is typically read by:
or, if you want to break with the stream processing mentality and just spool all data in RAM:
The following example is a minimal stream reader that prints information about all datasets found in a das stream file.
Here's an example of building the program via gcc:
gcc -o test_prog test_prog.c libdas3.a -lfftw -lssl -lcrypto -lexpat -lpthread -lz -lm
cl.exe /nologo /Fe:test_prog.exe test_prog.c das3.lib fftw3.lib zlib.lib libssl.lib \
libcrypto.lib expatMD.lib Advapi32.lib User32.lib \
Crypt32.lib ws2_32.lib pthreadVC3.lib
In all likelihood you'll need to use "-L" or "/LIBPATH" to provide the location of the libraries above unless you've copied them to the current directory.
Here's an example for reading one of the das2 streams out of the included test directory:
./test_prog test/das2_ascii_output1.d2t
Das2C is used by the following external projects:
Hopefully das2C is useful for your projects as well.