[obspy-users] Obspy 1.0.0 sac header issues

Tobias Megies megies at geophysik.uni-muenchen.de
Wed Mar 23 14:24:53 CET 2016


Hi Chuck,

as a side note, it's quick to get an overview over all issues related to
a specific submodule, e.g. io.sac:

https://github.com/obspy/obspy/issues?utf8=%E2%9C%93&q=label%3A.io.sac

I'm attaching a diff of the current maintenance changes for 1.0.1, in
case your interested in the details..

cheers,
Tobias


On 03/23/2016 02:06 PM, Lion Krischer wrote:
> Hi Chuck,
> 
> we are aware of all these issue and most are already fixed. We will
> release ObsPy 1.0.1 very soon. Sorry for any caused inconveniences.
> 
> 
> https://github.com/obspy/obspy/pull/1285
> https://github.com/obspy/obspy/pull/1317
> https://github.com/obspy/obspy/issues/1345
> 
> 
> If you checkout the latest master or our maintenance branch the issues
> should mostly be gone.
> 
> Thanks for the report!
> 
> Lion
> 
> 
> On 23/03/16 12:47, Charles Ammon wrote:
>> Hi,
>>
>> I am finally getting around (being forced) to change a set of scripts to
>> adjust to the latest updates to obspy and came across a number of issues.
>>
>> The first issue has been discussed in February 2016, and is related to
>> setting sac-header location fields (stla, stlo, evla, evlo). Initially,
>> all these items have values of -12345 (this is a SAC default for unset
>> header values). When I set one of the items, say stlo, it appears that
>> obspy tries to compute the distance and azimuth using the existing
>> -12345 values, which throws an exception from the distance-azimuth
>> calculation ('out of bounds', because -12345 is not in the geographic
>> range). Unless you are handling/suppressing the exception, it can toss
>> you out of the current section of your code.
>>
>> To work around that problem/feature, set lcalda = False, set the
>> location fields and then set lcalda = True. I am not sure rushing off to
>> compute the distance and azimuth is the right thing to do in a header
>> access implementation unless none of the key lats and lons equal -12345.
>> This could be checked in the code if you want to keep the current
>> approach. Or, am I missing something?
>>
>> Also, I am perplexed by why i cannot store a value in the 'evdp' header
>> field. The documentation states that this is "not used", but it is an
>> essential piece of the header. From the documentation:
>>
>> |"Event depth below surface (meters). [not currently used]"
>> http://docs.obspy.org/packages/autogen/obspy.io.sac.sactrace.SACTrace.html#obspy.io.sac.sactrace.SACTrace
>> |
>>
>> If I don't store an earthquake depth in 'evdp' where is depth
>> information supposed to be stored? What am I missing here?
>>
>> Chuck Ammon
>>
>> ================================i====================================
>> Charles J. Ammon, Department of Geosciences
>> Penn State University / 440 Deike Bldg / University Park, PA 16802
>> VOICE: (814) 865 2310 / FAXES: (814) 863 7823 or (814) 863 8724
>> http://eqseis.geosc.psu.edu/~cammon/
>> <http://eqseis.geosc.psu.edu/%7Ecammon/>
>> http://www.personal.psu.edu/faculty/c/j/cja12/
>>
>>
>>
>> _______________________________________________
>> obspy-users mailing list
>> obspy-users at lists.swapbytes.de
>> http://lists.swapbytes.de/mailman/listinfo/obspy-users
>>
> _______________________________________________
> obspy-users mailing list
> obspy-users at lists.swapbytes.de
> http://lists.swapbytes.de/mailman/listinfo/obspy-users
> 

-- 
Dipl.-Geophys. Tobias Megies

Geophysikalisches Observatorium
Ludwigshöhe 8
82256 Fürstenfeldbruck

Ludwig-Maximilians-Universität
Department für Geo- und Umweltwissenschaften
Sektion Geophysik
Theresienstrasse 41/IV
80333 München

Tel: +49 (0) 89 2180-73981
     +49 (0) 89 2180-4326
Mail: tobias.megies at geophysik.uni-muenchen.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sac.diff
Type: text/x-patch
Size: 12650 bytes
Desc: not available
URL: <http://lists.swapbytes.de/pipermail/obspy-users/attachments/20160323/9175ad81/attachment-0001.bin>


More information about the obspy-users mailing list