10 Commits

6 changed files with 150 additions and 119 deletions

View File

@@ -686,10 +686,9 @@ class MainWindow(QMainWindow):
# add scroll area used in case number of traces gets too high # add scroll area used in case number of traces gets too high
self.wf_scroll_area = QtWidgets.QScrollArea(self) self.wf_scroll_area = QtWidgets.QScrollArea(self)
self.wf_scroll_area.setVisible(False) self.wf_scroll_area.setVisible(False)
self.no_data_label = QLabel('No Data') self.no_data_label = QLabel('No Data. If data were already loaded, try to select the event again in the eventbox.')
self.no_data_label.setStyleSheet('color: red') self.no_data_label.setStyleSheet('color: red')
self.no_data_label.setAlignment(Qt.AlignCenter) self.no_data_label.setAlignment(Qt.AlignCenter)
# create central matplotlib figure canvas widget # create central matplotlib figure canvas widget
self.init_wfWidget() self.init_wfWidget()
@@ -1032,6 +1031,21 @@ class MainWindow(QMainWindow):
fname = self.filename_from_action(action) fname = self.filename_from_action(action)
if not fname: if not fname:
return return
qmb = QMessageBox(self, icon=QMessageBox.Question,
text='Do you want to overwrite this data?',)
overwrite_button = qmb.addButton('Overwrite', QMessageBox.YesRole)
merge_button = qmb.addButton('Merge', QMessageBox.NoRole)
qmb.exec_()
if qmb.clickedButton() == overwrite_button:
merge_strategy = 'Overwrite'
elif qmb.clickedButton() == merge_button:
merge_strategy = 'Merge'
else:
return
if not event: if not event:
event = self.get_current_event() event = self.get_current_event()
data = Data(self, event) data = Data(self, event)

View File

@@ -11,7 +11,7 @@ PILOT has originally been developed in Mathworks' MatLab. In order to distribute
problems, it has been decided to redevelop the software package in Python. The great work of the ObsPy group allows easy problems, it has been decided to redevelop the software package in Python. The great work of the ObsPy group allows easy
handling of a bunch of seismic data and PyLoT will benefit a lot compared to the former MatLab version. handling of a bunch of seismic data and PyLoT will benefit a lot compared to the former MatLab version.
The development of PyLoT is part of the joint research project MAGS2 and AlpArray. The development of PyLoT is part of the joint research project MAGS2, AlpArray and AdriaArray.
## Installation ## Installation
@@ -27,28 +27,30 @@ Afterwards run (from the PyLoT main directory where the files *requirements.txt*
conda env create -f pylot.yml conda env create -f pylot.yml
or or
conda create --name pylot_38 --file requirements.txt conda create -c conda-forge --name pylot_311 python=3.11 --file requirements.txt
to create a new Anaconda environment called "pylot_38". to create a new Anaconda environment called *pylot_311*.
Afterwards activate the environment by typing Afterwards activate the environment by typing
conda activate pylot_38 conda activate pylot_311
#### Prerequisites: #### Prerequisites:
In order to run PyLoT you need to install: In order to run PyLoT you need to install:
- Python 3 - Python 3
- obspy
- pyside2
- pyqtgraph
- cartopy - cartopy
- joblib
- obspy
- pyaml
- pyqtgraph
- pyside2
(the following are already dependencies of the above packages): (the following are already dependencies of the above packages):
- scipy - scipy
- numpy - numpy
- matplotlib <= 3.3.x - matplotlib
#### Some handwork: #### Some handwork:
@@ -108,4 +110,4 @@ Others: A. Bruestle, T. Meier, W. Friederich
[ObsPy]: http://github.com/obspy/obspy/wiki [ObsPy]: http://github.com/obspy/obspy/wiki
April 2022 August 2024

View File

@@ -1,14 +1,12 @@
name: pylot_38 name: pylot_311
channels: channels:
- conda-forge - conda-forge
- defaults - defaults
dependencies: dependencies:
- cartopy=0.20.2 - cartopy=0.23.0=py311hcf9f919_1
- matplotlib-base=3.3.4 - joblib=1.4.2=pyhd8ed1ab_0
- numpy=1.22.3 - obspy=1.4.1=py311he736701_3
- obspy=1.3.0 - pyaml=24.7.0=pyhd8ed1ab_0
- pyqtgraph=0.12.4 - pyqtgraph=0.13.7=pyhd8ed1ab_0
- pyside2>=5.13.2 - pyside2=5.15.8=py311h3d699ce_4
- python=3.8.12 - pytest=8.3.2=pyhd8ed1ab_0
- qt>=5.12.9
- scipy=1.8.0

View File

@@ -5,12 +5,13 @@ import traceback
import cartopy.crs as ccrs import cartopy.crs as ccrs
import cartopy.feature as cf import cartopy.feature as cf
from cartopy.mpl.ticker import LongitudeFormatter, LatitudeFormatter
import matplotlib import matplotlib
import matplotlib.patheffects as PathEffects import matplotlib.patheffects as PathEffects
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import numpy as np import numpy as np
import obspy import obspy
from PySide2 import QtWidgets from PySide2 import QtWidgets, QtGui
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from mpl_toolkits.axes_grid1.inset_locator import inset_axes from mpl_toolkits.axes_grid1.inset_locator import inset_axes
from pylot.core.util.utils import identifyPhaseID from pylot.core.util.utils import identifyPhaseID
@@ -24,10 +25,10 @@ matplotlib.use('Qt5Agg')
class MplCanvas(FigureCanvas): class MplCanvas(FigureCanvas):
def __init__(self, parent=None, extern_axes=None, width=5, height=4, dpi=100): def __init__(self, extern_axes=None, projection=None, width=15, height=5, dpi=100):
if extern_axes is None: if extern_axes is None:
self.fig = plt.figure(figsize=(width, height), dpi=dpi) self.fig = plt.figure(figsize=(width, height), dpi=dpi)
self.axes = self.fig.add_subplot(111) self.axes = self.fig.add_subplot(111, projection=projection)
else: else:
self.fig = extern_axes.figure self.fig = extern_axes.figure
self.axes = extern_axes self.axes = extern_axes
@@ -63,20 +64,25 @@ class Array_map(QtWidgets.QWidget):
self.highlighted_stations = [] self.highlighted_stations = []
# call functions to draw everything # call functions to draw everything
self.projection = ccrs.PlateCarree()
self.init_graphics() self.init_graphics()
self.ax = self.canvas.axes
self.ax.set_adjustable('datalim')
self.init_stations() self.init_stations()
self.init_crtpyMap() self.init_crtpyMap()
self.init_map() self.init_map()
# set original map limits to fall back on when home button is pressed # set original map limits to fall back on when home button is pressed
self.org_xlim = self.canvas.axes.get_xlim() self.org_xlim = self.ax.get_xlim()
self.org_ylim = self.canvas.axes.get_ylim() self.org_ylim = self.ax.get_ylim()
# initial map without event # initial map without event
self.canvas.axes.set_xlim(self.org_xlim[0], self.org_xlim[1]) self.ax.set_xlim(self.org_xlim[0], self.org_xlim[1])
self.canvas.axes.set_ylim(self.org_ylim[0], self.org_ylim[1]) self.ax.set_ylim(self.org_ylim[0], self.org_ylim[1])
self._style = None if not hasattr(parent, '_style') else parent._style self._style = None if not hasattr(parent, '_style') else parent._style
def init_map(self): def init_map(self):
self.init_colormap() self.init_colormap()
self.connectSignals() self.connectSignals()
@@ -89,11 +95,11 @@ class Array_map(QtWidgets.QWidget):
# initialize figure elements # initialize figure elements
if self.extern_plot_axes is None: if self.extern_plot_axes is None:
self.canvas = MplCanvas(self) self.canvas = MplCanvas(projection=self.projection)
self.plotWidget = FigureCanvas(self.canvas.fig)
else: else:
self.canvas = MplCanvas(self, extern_axes=self.extern_plot_axes) self.canvas = MplCanvas(extern_axes=self.extern_plot_axes)
self.plotWidget = FigureCanvas(self.canvas.fig)
self.plotWidget = self.canvas
# initialize GUI elements # initialize GUI elements
self.status_label = QtWidgets.QLabel() self.status_label = QtWidgets.QLabel()
@@ -105,7 +111,7 @@ class Array_map(QtWidgets.QWidget):
self.setLayout(self.main_box) self.setLayout(self.main_box)
self.top_row = QtWidgets.QHBoxLayout() self.top_row = QtWidgets.QHBoxLayout()
self.main_box.addLayout(self.top_row, 1) self.main_box.addLayout(self.top_row, 0)
self.comboBox_phase = QtWidgets.QComboBox() self.comboBox_phase = QtWidgets.QComboBox()
self.comboBox_phase.insertItem(0, 'P') self.comboBox_phase.insertItem(0, 'P')
@@ -138,10 +144,10 @@ class Array_map(QtWidgets.QWidget):
self.top_row.addWidget(self.auto_refresh_box) self.top_row.addWidget(self.auto_refresh_box)
self.top_row.addWidget(self.refresh_button) self.top_row.addWidget(self.refresh_button)
self.main_box.addWidget(self.plotWidget, 1) self.main_box.addWidget(self.plotWidget, 10)
self.bot_row = QtWidgets.QHBoxLayout() self.bot_row = QtWidgets.QHBoxLayout()
self.main_box.addLayout(self.bot_row, 0.3) self.main_box.addLayout(self.bot_row, 0)
self.bot_row.addWidget(QtWidgets.QLabel(''), 5) self.bot_row.addWidget(QtWidgets.QLabel(''), 5)
self.bot_row.addWidget(self.map_reset_button, 2) self.bot_row.addWidget(self.map_reset_button, 2)
self.bot_row.addWidget(self.go2eq_button, 2) self.bot_row.addWidget(self.go2eq_button, 2)
@@ -153,14 +159,12 @@ class Array_map(QtWidgets.QWidget):
self.init_lat_lon_grid() self.init_lat_lon_grid()
def init_crtpyMap(self): def init_crtpyMap(self):
self.canvas.axes.cla() self.ax.add_feature(cf.LAND)
self.canvas.axes = plt.axes(projection=ccrs.PlateCarree()) self.ax.add_feature(cf.OCEAN)
self.canvas.axes.add_feature(cf.LAND) self.ax.add_feature(cf.COASTLINE, linewidth=1, edgecolor='gray')
self.canvas.axes.add_feature(cf.OCEAN) self.ax.add_feature(cf.BORDERS, alpha=0.7)
self.canvas.axes.add_feature(cf.COASTLINE, linewidth=1, edgecolor='gray') self.ax.add_feature(cf.LAKES, alpha=0.7)
self.canvas.axes.add_feature(cf.BORDERS, alpha=0.7) self.ax.add_feature(cf.RIVERS, linewidth=1)
self.canvas.axes.add_feature(cf.LAKES, alpha=0.7)
self.canvas.axes.add_feature(cf.RIVERS, linewidth=1)
# parallels and meridians # parallels and meridians
self.add_merid_paral() self.add_merid_paral()
@@ -168,12 +172,8 @@ class Array_map(QtWidgets.QWidget):
self.canvas.fig.tight_layout() self.canvas.fig.tight_layout()
def add_merid_paral(self): def add_merid_paral(self):
self.gridlines = self.canvas.axes.gridlines(draw_labels=False, alpha=0.6, color='gray', self.gridlines = self.ax.gridlines(draw_labels=False, alpha=0.6, color='gray',
linewidth=self.linewidth / 2, zorder=7) linewidth=self.linewidth / 2, zorder=7, crs=ccrs.PlateCarree())
# TODO: current cartopy version does not support label removal. Devs are working on it.
# Should be fixed in coming cartopy versions
# self.gridlines.xformatter = LONGITUDE_FORMATTER
# self.gridlines.yformatter = LATITUDE_FORMATTER
def remove_merid_paral(self): def remove_merid_paral(self):
if len(self.gridlines.xline_artists): if len(self.gridlines.xline_artists):
@@ -181,24 +181,24 @@ class Array_map(QtWidgets.QWidget):
self.gridlines.yline_artists[0].remove() self.gridlines.yline_artists[0].remove()
def org_map_view(self): def org_map_view(self):
self.canvas.axes.set_xlim(self.org_xlim[0], self.org_xlim[1]) self.ax.set_xlim(self.org_xlim[0], self.org_xlim[1])
self.canvas.axes.set_ylim(self.org_ylim[0], self.org_ylim[1]) self.ax.set_ylim(self.org_ylim[0], self.org_ylim[1])
# parallels and meridians # parallels and meridians
self.remove_merid_paral() #self.remove_merid_paral()
self.add_merid_paral() #self.add_merid_paral()
self.canvas.axes.figure.canvas.draw_idle() self.canvas.draw_idle()
def go2eq(self): def go2eq(self):
if self.eventLoc: if self.eventLoc:
lats, lons = self.eventLoc lats, lons = self.eventLoc
self.canvas.axes.set_xlim(lons - 10, lons + 10) self.ax.set_xlim(lons - 10, lons + 10)
self.canvas.axes.set_ylim(lats - 5, lats + 5) self.ax.set_ylim(lats - 5, lats + 5)
# parallels and meridians # parallels and meridians
self.remove_merid_paral() #self.remove_merid_paral()
self.add_merid_paral() #self.add_merid_paral()
self.canvas.axes.figure.canvas.draw_idle() self.canvas.draw_idle()
else: else:
self.status_label.setText('No event information available') self.status_label.setText('No event information available')
@@ -220,21 +220,32 @@ class Array_map(QtWidgets.QWidget):
# set mouse events ----------------------------------------------------- # set mouse events -----------------------------------------------------
def mouse_moved(self, event): def mouse_moved(self, event):
if not event.inaxes == self.canvas.axes: if not event.inaxes == self.ax:
return return
else:
cont, inds = self.sc.contains(event)
lat = event.ydata lat = event.ydata
lon = event.xdata lon = event.xdata
self.status_label.setText('Latitude: {:3.5f}, Longitude: {:3.5f}'.format(lat, lon)) text = f'Longitude: {lon:3.3f}, Latitude: {lat:3.3f}'
if cont:
indices = inds['ind']
text += ' | Station: ' if len(indices) == 1 else ' | Stations: '
text += ' - '.join([self._station_onpick_ids[index] for index in indices[:5]])
if len(indices) > 5:
text += '...'
self.status_label.setText(text)
def mouse_scroll(self, event): def mouse_scroll(self, event):
if not event.inaxes == self.canvas.axes: if not event.inaxes == self.ax:
return return
zoom = {'up': 1. / 2., 'down': 2.} zoom = {'up': 1. / 2., 'down': 2.}
if event.button in zoom: if event.button in zoom:
xlim = self.canvas.axes.get_xlim() xlim = self.ax.get_xlim()
ylim = self.canvas.axes.get_ylim() ylim = self.ax.get_ylim()
x, y = event.xdata, event.ydata x, y = event.xdata, event.ydata
@@ -246,24 +257,24 @@ class Array_map(QtWidgets.QWidget):
yb = y - 0.5 * ydiff yb = y - 0.5 * ydiff
yt = y + 0.5 * ydiff yt = y + 0.5 * ydiff
self.canvas.axes.set_xlim(xl, xr) self.ax.set_xlim(xl, xr)
self.canvas.axes.set_ylim(yb, yt) self.ax.set_ylim(yb, yt)
# parallels and meridians # parallels and meridians
self.remove_merid_paral() #self.remove_merid_paral()
self.add_merid_paral() #self.add_merid_paral()
self.canvas.axes.figure.canvas.draw_idle() self.ax.figure.canvas.draw_idle()
def mouseLeftPress(self, event): def mouseLeftPress(self, event):
if not event.inaxes == self.canvas.axes: if not event.inaxes == self.ax:
return return
self.map_x = event.xdata self.map_x = event.xdata
self.map_y = event.ydata self.map_y = event.ydata
self.map_xlim = self.canvas.axes.get_xlim() self.map_xlim = self.ax.get_xlim()
self.map_ylim = self.canvas.axes.get_ylim() self.map_ylim = self.ax.get_ylim()
def mouseLeftRelease(self, event): def mouseLeftRelease(self, event):
if not event.inaxes == self.canvas.axes: if not event.inaxes == self.ax:
return return
new_x = event.xdata new_x = event.xdata
new_y = event.ydata new_y = event.ydata
@@ -271,13 +282,13 @@ class Array_map(QtWidgets.QWidget):
dx = new_x - self.map_x dx = new_x - self.map_x
dy = new_y - self.map_y dy = new_y - self.map_y
self.canvas.axes.set_xlim((self.map_xlim[0] - dx, self.map_xlim[1] - dx)) self.ax.set_xlim((self.map_xlim[0] - dx, self.map_xlim[1] - dx))
self.canvas.axes.set_ylim(self.map_ylim[0] - dy, self.map_ylim[1] - dy) self.ax.set_ylim(self.map_ylim[0] - dy, self.map_ylim[1] - dy)
# parallels and meridians # parallels and meridians
self.remove_merid_paral() #self.remove_merid_paral()
self.add_merid_paral() #self.add_merid_paral()
self.canvas.axes.figure.canvas.draw_idle() self.ax.figure.canvas.draw_idle()
def onpick(self, event): def onpick(self, event):
btn_msg = {1: ' in selection. Aborted', 2: ' to delete a pick on. Aborted', 3: ' to display info.'} btn_msg = {1: ' in selection. Aborted', 2: ' to delete a pick on. Aborted', 3: ' to display info.'}
@@ -421,6 +432,9 @@ class Array_map(QtWidgets.QWidget):
picks_rel[st_id] = pick picks_rel[st_id] = pick
return picks_rel return picks_rel
def get_picks_rel_mean_corr(picks):
return get_picks_rel(picks, func=np.nanmean)
self.picks, self.uncertainties = get_picks(self.stations_dict) self.picks, self.uncertainties = get_picks(self.stations_dict)
self.picks_rel = get_picks_rel(self.picks) self.picks_rel = get_picks_rel(self.picks)
@@ -469,13 +483,20 @@ class Array_map(QtWidgets.QWidget):
stat_dict = self.stations_dict['{}.{}'.format(network, station)] stat_dict = self.stations_dict['{}.{}'.format(network, station)]
lat = stat_dict['latitude'] lat = stat_dict['latitude']
lon = stat_dict['longitude'] lon = stat_dict['longitude']
self.highlighted_stations.append(self.canvas.axes.scatter(lon, lat, s=self.pointsize, edgecolors=color, self.highlighted_stations.append(self.ax.scatter(lon, lat, s=self.pointsize, edgecolors=color,
facecolors='none', zorder=12, facecolors='none', zorder=12,
transform=ccrs.PlateCarree(), label='deleted')) transform=ccrs.PlateCarree(), label='deleted'))
def openPickDlg(self, ind): def openPickDlg(self, ind):
try:
wfdata = self._parent.get_data().getWFData() wfdata = self._parent.get_data().getWFData()
wfdata_comp = self._parent.get_data().getWFDataComp() except AttributeError:
QtWidgets.QMessageBox.warning(
self, "PyLoT Warning",
"No waveform data found. Check if they were already loaded in Waveform plot tab."
)
return
wfdata_comp = self._parent.get_data().getAltWFdata()
for index in ind: for index in ind:
network, station = self._station_onpick_ids[index].split('.')[:2] network, station = self._station_onpick_ids[index].split('.')[:2]
pyl_mw = self._parent pyl_mw = self._parent
@@ -521,7 +542,7 @@ class Array_map(QtWidgets.QWidget):
def draw_contour_filled(self, nlevel=50): def draw_contour_filled(self, nlevel=50):
levels = np.linspace(self.get_min_from_picks(), self.get_max_from_picks(), nlevel) levels = np.linspace(self.get_min_from_picks(), self.get_max_from_picks(), nlevel)
self.contourf = self.canvas.axes.contourf(self.longrid, self.latgrid, self.picksgrid_active, levels, self.contourf = self.ax.contourf(self.longrid, self.latgrid, self.picksgrid_active, levels,
linewidths=self.linewidth * 5, transform=ccrs.PlateCarree(), linewidths=self.linewidth * 5, transform=ccrs.PlateCarree(),
alpha=0.4, zorder=8, cmap=self.get_colormap()) alpha=0.4, zorder=8, cmap=self.get_colormap())
@@ -531,7 +552,7 @@ class Array_map(QtWidgets.QWidget):
def scatter_all_stations(self): def scatter_all_stations(self):
stations, lats, lons = self.get_st_lat_lon_for_plot() stations, lats, lons = self.get_st_lat_lon_for_plot()
self.sc = self.canvas.axes.scatter(lons, lats, s=self.pointsize * 3, facecolor='none', marker='.', self.sc = self.ax.scatter(lons, lats, s=self.pointsize * 3, facecolor='none', marker='.',
zorder=10, picker=True, edgecolor='0.5', label='Not Picked', zorder=10, picker=True, edgecolor='0.5', label='Not Picked',
transform=ccrs.PlateCarree()) transform=ccrs.PlateCarree())
@@ -539,7 +560,7 @@ class Array_map(QtWidgets.QWidget):
self._station_onpick_ids = stations self._station_onpick_ids = stations
if self.eventLoc: if self.eventLoc:
lats, lons = self.eventLoc lats, lons = self.eventLoc
self.sc_event = self.canvas.axes.scatter(lons, lats, s=5 * self.pointsize, facecolor='red', zorder=11, self.sc_event = self.ax.scatter(lons, lats, s=5 * self.pointsize, facecolor='red', zorder=11,
label='Event (might be outside map region)', marker='*', label='Event (might be outside map region)', marker='*',
edgecolors='black', edgecolors='black',
transform=ccrs.PlateCarree()) transform=ccrs.PlateCarree())
@@ -555,7 +576,7 @@ class Array_map(QtWidgets.QWidget):
for uncertainty in uncertainties]) for uncertainty in uncertainties])
cmap = self.get_colormap() cmap = self.get_colormap()
self.sc_picked = self.canvas.axes.scatter(lons, lats, s=sizes, edgecolors='white', cmap=cmap, self.sc_picked = self.ax.scatter(lons, lats, s=sizes, edgecolors='white', cmap=cmap,
c=picks, zorder=11, label='Picked', transform=ccrs.PlateCarree()) c=picks, zorder=11, label='Picked', transform=ccrs.PlateCarree())
def annotate_ax(self): def annotate_ax(self):
@@ -574,20 +595,20 @@ class Array_map(QtWidgets.QWidget):
if st in self.marked_stations: if st in self.marked_stations:
color = 'red' color = 'red'
self.annotations.append( self.annotations.append(
self.canvas.axes.annotate(' %s' % st, xy=(x + 0.003, y + 0.003), fontsize=self.pointsize / 4., self.ax.annotate(f'{st}', xy=(x + 0.003, y + 0.003), fontsize=self.pointsize / 4.,
fontweight='semibold', color=color, alpha=0.8, fontweight='semibold', color=color, alpha=0.8,
transform=ccrs.PlateCarree(), zorder=14, transform=ccrs.PlateCarree(), zorder=14,
path_effects=[PathEffects.withStroke( path_effects=[PathEffects.withStroke(
linewidth=self.pointsize / 15., foreground='k')])) linewidth=self.pointsize / 15., foreground='k')]))
self.legend = self.canvas.axes.legend(loc=1, framealpha=1) self.legend = self.ax.legend(loc=1, framealpha=1)
self.legend.set_zorder(100) self.legend.set_zorder(100)
self.legend.get_frame().set_facecolor((1, 1, 1, 0.95)) self.legend.get_frame().set_facecolor((1, 1, 1, 0.95))
def add_cbar(self, label): def add_cbar(self, label):
self.cbax_bg = inset_axes(self.canvas.axes, width="6%", height="75%", loc=5) self.cbax_bg = inset_axes(self.ax, width="6%", height="75%", loc=5)
cbax = inset_axes(self.canvas.axes, width='2%', height='70%', loc=5) cbax = inset_axes(self.ax, width='2%', height='70%', loc=5)
cbar = self.canvas.axes.figure.colorbar(self.sc_picked, cax=cbax) cbar = self.ax.figure.colorbar(self.sc_picked, cax=cbax)
cbar.set_label(label) cbar.set_label(label)
cbax.yaxis.tick_left() cbax.yaxis.tick_left()
cbax.yaxis.set_label_position('left') cbax.yaxis.set_label_position('left')

View File

@@ -1084,8 +1084,9 @@ def check4rotated(data, metadata=None, verbosity=1):
azimuths.append(metadata.get_coordinates(tr_id, t_start)['azimuth']) azimuths.append(metadata.get_coordinates(tr_id, t_start)['azimuth'])
dips.append(metadata.get_coordinates(tr_id, t_start)['dip']) dips.append(metadata.get_coordinates(tr_id, t_start)['dip'])
except (KeyError, TypeError) as err: except (KeyError, TypeError) as err:
logging.error(f"{type(err)=} occurred: {err=} Rotating not possible, not all azimuth and dip information " logging.warning(f"Rotating not possible, not all azimuth and dip information "
f"available in metadata. Stream remains unchanged.") f"available in metadata. Stream remains unchanged.")
logging.debug(f"Rotating not possible, {err=}, {type(err)=}")
return wfs_in return wfs_in
except Exception as err: except Exception as err:
print(f"Unexpected {err=}, {type(err)=}") print(f"Unexpected {err=}, {type(err)=}")

View File

@@ -1,12 +1,7 @@
# This file may be used to create an environment using: Cartopy==0.23.0
# $ conda create --name <env> --file <this file> joblib==1.4.2
# platform: win-64 obspy==1.4.1
cartopy=0.20.2 pyaml==24.7.0
matplotlib-base=3.3.4 pyqtgraph==0.13.7
numpy=1.22.3 PySide2==5.15.8
obspy=1.3.0 pytest==8.3.2
pyqtgraph=0.12.4
pyside2=5.13.2
python=3.8.12
qt=5.12.9
scipy=1.8.0