ObsPy has some issues in reading WIN format data. The issues are:
bugs in decoding 0.5 bytes and 3 bytes compression data
not treated properly with missing data and variable sampling rates
too slow
We tried to fix the first issue, that is bugs in decoding 0.5 and 3 bytes compression data.
The patch for obspy/io/win/core.py is available here.
This patch resolve the first issue, but the rest issues still remain.
New module for reading WIN data in ObsPy
Fixing the original ObsPy code did not solve all the problems. So, we decided to create a new yet another module. Features of our new module are:
reading the WIN format data and outputs the ObsPy Stream object
resolves above three issues in the original module
Calling shared libraries from Python is a typical technique to wrap the native libraries and improve execution times. Uehira et al. (2010) introduced shared libraries into the WIN system. The “libwinsystem.so” shared library provides various functions for reading or writing the WIN format data. Using this library for decoding the WIN compressed data in our module was effective in solving the first and third issues. To deal with second issue, when the gap of time stamps or sampling rates was found, our module separates waveform data properly.
Our new module is available here.
NOTE 1:
Our module requires the WIN system (version 3 or later). The source code of the WIN system can be download from here. Then, compile and install the WIN system. Typical installation procedure is follows:
% tar zxvf WIN_pkg-3.0.6.tar.gz
% cd WIN_pkg-3.0.6
% ./configure --prefix=/usr/local/win
% make
# make install
If you change the install directory for WIN system, please edit the library path in the line 22 of win_read.py.
NOTE 2:
We continue to revise this module. If you find bugs in our module, please let me know.