[sac-dev] XML SAC files

George Helffrich george at gly.bris.ac.uk
Fri Jul 27 04:54:51 PDT 2007


Dear All -

	In order to 1) bring SAC to a more modern view of the data world; and 
2) to provide a facility to package together more than one SAC trace in 
a single data file, I implemented a facility to read and write XML 
files in the Mac version of SAC.

	All modern operating systems have built-in facilities to read XML on 
account of its varied use by web browsers, system property list 
management, etc.  Thus the underlying parsing facilities are available 
without adding much code to SAC.

	The DTD I defined incorporates keeps header information in ASCII, but 
there are different types of data formats for the trace data: 
uncompressed ASCII, or compressed (base-64) in different endianness 
formats.  Based on experiments I've made, the "compressed" data format 
leads to about 50% larger files than native binary form for single 
traces.  With today's disk capabilities spiraling out of any imaginable 
limit, this does not seem to be a serious drawback of using an XML data 
format.

	If you want to try this on a Mac, download the latest MacSAC and try a 
demonstration of the facility.  Copy over a SAC macro file to your 
computer using a web browser, pointing it at the link

http://www1.gly.bris.ac.uk/MacSAC/korea.mac

and save this file somewhere, e.g. in the file /tmp/korea.mac.  Then 
start SAC, open a graphics device, and issue these commands:

read ds http://www1.gly.bris.ac.uk/MacSAC/korea.sds
macro /tmp/korea.mac

You will see a display of all 753 stations of Japan's HiNet network 
that recorded the Korean nuclear test of Oct. 9, 2006.

								George Helffrich
								george at geology.bristol.ac.uk



More information about the sac-dev mailing list