Dear Obspy Forum,
I am working on creating the XML file for a seismic station wich has a CEA-DASE sensor and a Generic datalogger. This is the code (following the web page).
inv = Inventory(
networks=[],
source=“moi”)
net = Network(
code=“BO”,
stations=[],
description=“test”,
start_date=obspy.UTCDateTime(2019, 1, 1))
sta = Station(
code=“BBOB”,
latitude=-16.14100,
longitude=-68.1324,
elevation=3875.0,
creation_date=obspy.UTCDateTime(2019, 1, 1),
site=Site(name=“Banderani”))
cha = Channel(
code=“SHZ”,
location_code="–",
latitude=-16.14100,
longitude=-68.1324,
elevation=3875.0,
depth=0.0,
azimuth=0.0,
dip=-90.0,
sample_rate=50)
nrl = NRL()
response = nrl.get_response( # doctest: +SKIP
sensor_keys=[‘CEA-DASE’, ‘CP H/ZM-500 short period’],
datalogger_keys=[‘Generic’, ‘Unity’])
cha.response = response
sta.channels.append(cha)
net.stations.append(sta)
inv.networks.append(net)
inv.write(“BBOB.xml”, format=“stationxml”, validate=True)
Unfortunately I got an error that says:
//////////////////////////////////
Traceback (most recent call last): File “F:\Grant_2019\inches.py”, line 56, in
datalogger_keys=[‘Generic’, ‘Unity’])
File “C:\Python27\lib\site-packages\obspy\clients\nrl\client.py”, line 214, in get_response
sensor_resp = self.get_sensor_response(sensor_keys)
value = super(NRLDict, self).getitem(name)
KeyError: 1
///////////////////////////////////////////////////
I aaplied the NRL codes from web page (http://www.seis.sc.edu/~crotwell/nrlBrowser/) but also I got the error.
I think it depends the way I write the “datalogger_keys=[‘Generic’, ‘Unity’])”.
Would you mind give a hand, thank you for yor time.
Best Regards
tonino