pylot/pylot/core/util/thread.py
Marc S. Boxberg 503ea419c4 release version: 0.1a
release notes:
==============
Features
- consistent manual phase picking through predefined SNR dependant zoom level
- uniform uncertainty estimation from waveform's properties for automatic and manual picks
- pdf representation and comparison of picks taking the uncertainty intrinsically into account
- Richter and moment magnitude estimation
- location determination with external installation of [NonLinLoc](http://alomax.free.fr/nlloc/index.html)
Known issues
- Magnitude estimation from manual PyLoT takes some time (instrument correction)
2016-10-04 09:38:05 +02:00

34 lines
811 B
Python

# -*- coding: utf-8 -*-
import sys
from PySide.QtCore import QThread, Signal
class AutoPickThread(QThread):
message = Signal(str)
finished = Signal()
def __init__(self, parent, func, data, param):
super(AutoPickThread, self).__init__()
self.setParent(parent)
self.func = func
self.data = data
self.param = param
def run(self):
sys.stdout = self
picks = self.func(self.data, self.param)
print("Autopicking finished!\n")
try:
for station in picks:
self.parent().addPicks(station, picks[station], type='auto')
except AttributeError:
print(picks)
sys.stdout = sys.__stdout__
self.finished.emit()
def write(self, text):
self.message.emit(text)