[SAC-HELP] dealing with big-endian and little-endian data with SAC and sacswap
Derek Schutt
Derek.Schutt at colostate.edu
Tue Oct 12 15:38:33 PDT 2010
It's been a while since I worried about this, and I've screwed things
up a bit.
I requested some data from the DMC, using Standing Order for Data
(SOD). It is big-endian. When I write a sac file on my x86 computer,
the sac file seems to be in little-endian format (the native format);
however, when I just write headers to the original sac file, the file
stays in the big-endian format.
I'd like all my data to be in one format, preferably the native,
little-endian, format. I can use sacswap to change format, but it
seems to work indiscriminantly on files, swapping them even if they are
in the native format.
So, I was wondering:
1) If there is any way to make sac write files in the same
byte-order that the file was read in
2) is there a more elegant way to work with sacswap, to get it to
only swap non-native byte order files. I think the mac version of
sacswap does do this.
I realize now I should have used the <littleEndian/> tag in my SOD
request, and it's actually not to hard to retrace my steps and run
sacswap on the files that need to be swapped. But I can't help if
there is a more elegant way to do this...
Thanks,
Derek
--
--------------------
Derek Schutt
Assistant Professor
Geosciences Department
309 Natural Resources Building
Campus Delivery 1482
Fort Collins, CO 80525-1482
http://warnercnr.colostate.edu/~schutt/CSU_web/index.htm
970-491-5786
More information about the sac-help
mailing list