[SAC-HELP] dealing with big-endian and little-endian data with SAC and sacswap

Derek Schutt Derek.Schutt at colostate.edu
Wed Oct 13 08:12:03 PDT 2010


  Thanks Brian.   I appreciate your efforts.

-Derek

On 10/13/2010 08:18 AM, Brian Savage wrote:
> Derek,
>
> This is the second request for this feature recently and it should not 
> take much to add in this type of functionality. It will most likely be 
> designed as an option you would need to turn on, but this should.  I 
> will add this to my list of things to do.
>
> Brian
>
> On Oct 12, 2010, at 6:38 PM, Derek Schutt wrote:
>
>> 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
>>
>> _______________________________________________
>> sac-help mailing list
>> sac-help at iris.washington.edu
>> http://www.iris.washington.edu/mailman/listinfo/sac-help
>>
>
> _______________________________________________
> sac-help mailing list
> sac-help at iris.washington.edu
> http://www.iris.washington.edu/mailman/listinfo/sac-help
>


-- 
--------------------
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