Compare commits

..

31 Commits

Author SHA1 Message Date
Wehling-Benatelli
e434bda993 [change] corrected for required versions 2024-08-30 15:01:28 +02:00
c0c3cbbd7b refactor: remove unused methods 2024-08-30 15:01:28 +02:00
76d4ec290c refactor: restructure data objects 2024-08-30 15:01:18 +02:00
63dac0fff6 refactor: restructure data objects 2024-08-30 15:00:44 +02:00
b15cfe2e1d bugfix: corrected for ValueError 2024-08-30 15:00:44 +02:00
29a1e4ebe6 refactor: move Project definition to individual file 2024-08-30 14:59:28 +02:00
50cabb0038 refactor: remove unused code; rewrite too complex functions 2024-08-30 14:59:28 +02:00
8dd5789b0c refactor: remove unnecessary additional declaration 2024-08-30 14:59:28 +02:00
c4aeab0d89 suggestion: add new dataclasses; remove unused code 2024-08-30 14:59:19 +02:00
ef69fc429f refactor: removed unused code 2024-08-30 14:58:53 +02:00
c8f9c1c33a refactor: rename writephases; add write hash to write_phases 2024-08-30 14:58:53 +02:00
59f2c4b46f refactor: remove unused code; restructure writephases 2024-08-30 14:58:53 +02:00
8eb958c91b change: add docu and test case 2024-08-30 14:58:52 +02:00
6b7f297d7a [update] adding possibility to display other waveform data (e.g. denoised/synthetic) together with genuine data for comparison 2024-08-30 14:58:38 +02:00
70d5c2d621 [minor] mpl.figure.canvas.draw -> draw_idle 2024-08-30 12:03:14 +02:00
7393201b90 [minor] inform if station coordinates were not found in metadata 2024-08-30 12:03:14 +02:00
d02f74ab10 [bugfix] added missing Parameter object in call for picksdict_from_picks 2024-08-30 12:03:14 +02:00
0a5f5f0817 [minor] removed unneeded imports 2024-08-30 12:03:05 +02:00
db976e5ea9 [bugfix] removing redundancy and wrong bullsh.. try-except code 2024-08-30 12:02:22 +02:00
c021ca19d7 [minor] switch default cmap for array_map to 'viridis' 2024-08-30 12:02:22 +02:00
356988e71d [update] further improved Pickfile selection dialog, now providing methods "overwrite" or "merge" 2024-08-30 12:02:22 +02:00
ad62284e0e [update] improve pickfile selection, give the ability to select only specific files 2024-08-30 12:02:06 +02:00
0fb0b0f11c [bugfix] re-implement ability of get_bool to return unidentifiable input 2024-08-30 11:59:50 +02:00
e3dd4a4e28 bugfix: remove unused functions; correct for wrong formatting (PEP) 2024-08-30 11:59:49 +02:00
2bbb84190c feat: add type hints and tests for plot utils 2024-08-30 11:56:59 +02:00
fb32d5e0c5 bugfix: add tests to key_for_set_value 2024-08-30 11:55:14 +02:00
f043401cc0 bugfix: rename is_iterable and add doc tests 2024-08-30 11:55:14 +02:00
eb15382b5f bugfix: refactor get_owner and get_hash; add tests 2024-08-30 11:55:13 +02:00
7fbc3bc5ae bugfix: add new tests and refactor get_none 2024-08-30 11:55:01 +02:00
221743fe20 bugfix: correct erroneous and add new doctests 2024-08-30 11:49:22 +02:00
554afc5a81 bugfix: update check4rotate 2024-08-29 16:12:19 +02:00
3 changed files with 27 additions and 19 deletions

View File

@ -59,7 +59,7 @@ except ImportError:
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.figure import Figure
from pylot.core.analysis.magnitude import LocalMagnitude, MomentMagnitude
from pylot.core.analysis.magnitude import LocalMagnitude, MomentMagnitude, calcsourcespec
from pylot.core.io.data import Data
from pylot.core.io.inputs import FilterOptions, PylotParameter
from autoPyLoT import autoPyLoT
@ -76,12 +76,12 @@ from pylot.core.util.utils import fnConstructor, get_login, \
full_range, readFilterInformation, pick_color_plt, \
pick_linestyle_plt, identifyPhaseID, excludeQualityClasses, \
transform_colors_mpl, transform_colors_mpl_str, getAutoFilteroptions, check_all_obspy, \
check_all_pylot, get_bool, get_none
check_all_pylot, get_bool, get_None, get_pylot_eventfile_with_extension
from pylot.core.util.gui import make_pen
from pylot.core.util.widgets import FilterOptionsDialog, PylotCanvas, WaveformWidgetPG, PropertiesDlg, HelpForm, createAction, PickDlg, \
ComparisonWidget, TuneAutopicker, PylotParaBox, AutoPickDlg, CanvasWidget, AutoPickWidget, \
CompareEventsWidget, ProgressBarWidget, AddMetadataWidget, SingleTextLineDialog, LogWidget, PickQualitiesFromXml, \
SpectrogramTab, SearchFileByExtensionDialog
SourceSpecWindow, ChooseWaveFormWindow, SpectrogramTab, SearchFileByExtensionDialog
from pylot.core.util.array_map import Array_map
from pylot.core.util.structure import DATASTRUCTURE
from pylot.core.util.thread import Thread, Worker

View File

@ -8,7 +8,6 @@ import platform
import re
import subprocess
import warnings
from typing import Literal, Tuple, Type
from functools import lru_cache
import numpy as np
@ -107,7 +106,7 @@ def gen_Pool(ncores=0):
print('gen_Pool: Generated multiprocessing Pool with {} cores\n'.format(ncores))
pool = multiprocessing.Pool(ncores, maxtasksperchild=100)
pool = multiprocessing.Pool(ncores)
return pool
@ -361,7 +360,7 @@ def get_bool(value):
>>> get_bool('Stream')
'Stream'
"""
if type(value) is bool:
if type(value) == bool:
return value
elif value in ['True', 'true']:
return True
@ -902,6 +901,19 @@ def trim_station_components(data, trim_start=True, trim_end=True):
return data
def merge_stream(stream):
gaps = stream.get_gaps()
if gaps:
# list of merged stations (seed_ids)
merged = ['{}.{}.{}.{}'.format(*gap[:4]) for gap in gaps]
stream.merge(method=1)
print('Merged the following stations because of gaps:')
for merged_station in merged:
print(merged_station)
return stream, gaps
def check4gapsAndRemove(data):
"""
check for gaps in Stream and remove them
@ -922,12 +934,12 @@ def check4gapsAndRemove(data):
return data
def check_for_gaps_and_merge(data):
def check4gapsAndMerge(data):
"""
check for gaps in Stream and merge if gaps are found
:param data: stream of seismic data
:type data: `~obspy.core.stream.Stream`
:return: data stream, gaps returned from obspy get_gaps
:return: data stream
:rtype: `~obspy.core.stream.Stream`
"""
gaps = data.get_gaps()
@ -938,7 +950,7 @@ def check_for_gaps_and_merge(data):
for merged_station in merged:
print(merged_station)
return data, gaps
return data
def check4doubled(data):
@ -1206,7 +1218,6 @@ def identifyPhase(phase):
return False
@lru_cache
def identifyPhaseID(phase):
"""
Returns phase id (capital P or S)

View File

@ -1,12 +1,9 @@
# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: win-64
cartopy=0.20.2
matplotlib-base=3.3.4
numpy=1.22.3
obspy=1.3.0
pyqtgraph=0.12.4
pyside2=5.13.2
python=3.8.12
qt=5.12.9
scipy=1.8.0
cartopy>=0.20.2
numpy<2
obspy>=1.3.0
pyqtgraph>=0.12.4
pyside2>=5.13.2
scipy>=1.8.0