[obspy-users] gain from inventory

Dirk d-roessler at web.de
Tue Mar 7 20:18:30 CET 2017


Thank you. That has helped.

Dirk

Am 02.03.2017 um 17:54 schrieb Peter Schmidt:
>
> Hi Dirk
>
>
> try something along:
>
>
> from obspy import read_inventory   # rather than using _read_sc3ml() 
> which is not intended as a public function
> sc3inv = read_inventory(invFile)
> for network in sc3inv.networks:
>     for station in network.stations:
>         for channel in station.channels:
>             response = channel.response
>             for stage in response.response_stages:
>                 gain = stage.stage_gain
>                 seedid = '%s.%s.%s.%s' % 
> (network.code,station.code,channel.location_code,channel.code)
>                 print "%s, stage %s: %f" % 
> (seedid,stage.stage_sequence_number,gain)
>
>
> For some more insight into the Inventory object returned from 
> read_inventory() I've attached a mapping of the class I made a while 
> ago (still some bits and pieces missing though and may contain errors)
>
>
> regP
>
>
> On 02/03/17 15:18, Dirk Rößler wrote:
>> Hi,
>>
>> I have an inventory object which I have obtained from reading 
>> SeisComP3 station inventory XML file:
>>
>> sc3inv = sc3._read_sc3ml(invFile)
>>
>> How can I extract the values for channel sensitivity and the 
>> instrument gain for every network, station, location, channel?
>>
>> Regards,
>> Dirk
>>
>>
>>
>>
>> _______________________________________________
>> obspy-users mailing list
>> obspy-users at lists.swapbytes.de
>> http://lists.swapbytes.de/mailman/listinfo/obspy-users
>
> -- 
> ********************************************************************************
> Peter Schmidt                                      Tel: +46-18-4712259
> Swedish National Seismic Network (SNSN)         Mobile: +46-73-3190975
> Dept. of Earth Sciences:geophysics              e-mail:peter.schmidt at geo.uu.se   
> Uppsala University
> Villavagen 16
> SE-75236 Uppsala
> ********************************************************************************
>
>
> _______________________________________________
> obspy-users mailing list
> obspy-users at lists.swapbytes.de
> http://lists.swapbytes.de/mailman/listinfo/obspy-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.swapbytes.de/pipermail/obspy-users/attachments/20170307/40e905a4/attachment-0001.html>


More information about the obspy-users mailing list