Libgursipfile
From Theory of Measurements Wiki
A simple library for reading and writing complex valued time series data files. Only files with 16 bit integers in big endian format are supported. A fortran interface is also available. The code should be portable, but it is yet in testing phase.
Compiling
You will need a C and f90 compiler, then follow the basic mantra:
./configure ; make ; make install
Usage
In addition to the C and fortran language interfaces, there are two command line tools: gursipdump and gursipconvert. Gursipdump simply displays the contents of a GDF file in ascii form, gursipconvert does the inverse, ie. reads in ascii and saves it in GDF binary format. These tools make it possible to easily export and import GDF files into any other environment, without having to use the C or fortran interfaces.
> gursipdump Usage: gursipdump [-options] filename Prints gursip file in ascii form. Bug reports to: j@sgo.fi
> gursipconvert Usage: gursipconvert inputfile outputfile Convert ascii form env(t) into a gursip form 16 bit data file. All values must be within range -1..1, this will be then scaled to fit the dynamic range of 16 bit signed integers. Bug reports to: j@sgo.fi
Example
Create 1000 uniform random IQ samples in ASCII form using perl and pipe them to gursipconvert, which creates the binary file random.gdf:
perl -e 'for($i=0; $i<1000;$i++){print rand()." ".rand()."\n";}' | gursipconvert - random.gdf
