[add] network code added to station map

This commit is contained in:
Marcel Paffrath 2017-06-06 14:08:19 +02:00
parent 4077ec207c
commit 9007197786
2 changed files with 5 additions and 3 deletions

View File

@ -1 +1 @@
86c7-dirty 4077e-dirty

View File

@ -43,7 +43,7 @@ class map_projection(QtGui.QWidget):
return return
data = self._parent.get_data().getWFData() data = self._parent.get_data().getWFData()
for index in ind: for index in ind:
station=str(self.station_names[index]) station=str(self.station_names[index].split('.')[-1])
try: try:
pickDlg = PickDlg(self, parameter=self._parent._inputs, pickDlg = PickDlg(self, parameter=self._parent._inputs,
data=data.select(station=station), data=data.select(station=station),
@ -120,8 +120,9 @@ class map_projection(QtGui.QWidget):
lon=[] lon=[]
for station in parser.stations: for station in parser.stations:
station_name=station[0].station_call_letters station_name=station[0].station_call_letters
network=station[0].network_code
if not station_name in station_names: if not station_name in station_names:
station_names.append(station_name) station_names.append(network+'.'+station_name)
lat.append(station[0].latitude) lat.append(station[0].latitude)
lon.append(station[0].longitude) lon.append(station[0].longitude)
return station_names, lat, lon return station_names, lat, lon
@ -137,6 +138,7 @@ class map_projection(QtGui.QWidget):
picks=[] picks=[]
for station in station_names: for station in station_names:
try: try:
station=station.split('.')[-1]
picks.append(self.picks_dict[station][phase]['mpp']) picks.append(self.picks_dict[station][phase]['mpp'])
except: except:
picks.append(np.nan) picks.append(np.nan)