creating stationXML from scratch, WITH response

Hi

I am trying to incorporate new stations, ultimately into seiscomp3, via the creation of stationXML files.

this tutorial has been a lifesaver and works great:

https://docs.obspy.org/master/tutorial/code_snippets/stationxml_file_from_scratch.html

which obviously states WITHOUT RESPONSE. what is the best way to either include instrument responses in this and/or create separate response xml files?

I realise I’m getting ahead of myself and this has yet to be officially implemented, but I have installed the dev version of obspy which has the NRL client to create a response from RESP files (cool feature btw)

e.g.

from obspy.clients.nrl import NRL
nrl = NRL()

response = nrl.get_response(
sensor_keys=[‘Geo Space/OYO’, ‘HS-1-LT’, ‘3810 Ohms’,‘115000 Ohms’],
datalogger_keys=[‘REF TEK’, ‘RT 130 & 130-SMA’, ‘1’, ‘250’])

now, how do i complete the final step, and massage that response into my inventory, ultimately to write it out a stationxml file ala

inv.write(“ABCD.xml”, format=“stationxml”)

which thennnn i must import into SC3? i know it must be simple but i can’t piece it together.

thanks in advance

Hi Robert,

If you follow to the tutorial, just add the response to the channel
before tying it together:

cha.response = response

Best, Lukas

Hi Robert,

you just have to attach the response object to the channel:

cha.response = response

Or if you only have an inventory object:

inv[0][0][0].response = response

You of course have to make sure to pick the correct channel.

There is also a discussion right now to add exactly what you did to the tutorial: Please consider to contribute. The NRL client is also already “officially implemented” - anything that ends up in the master branch should be considered implemented and will end up in the next release. Cheers! Lion

Hi Robert,

the best way to manage your station inventory for SeisComP3 is the new SMP [1]. In SMP you can create meta data from scratch and manage existing inventories. S Include is the option to directly import sensor and data logger information from NRL. In this way you get all required instrument information directly from the manufacturer and avoid typos etc.

For SeisComP3-related issues you may also use the SeisComP3 form [3] which is hosted by GFZ Potsdam, Germany.

Best regards,
Dirk

[1] https://smp.gempa.de/
[2] https://smp.gempa.de/help/recipes
[3] https://forum.seiscomp3.org/