Merge branch 'develop'
16
QtPyLoT.py
@ -170,6 +170,11 @@ class MainWindow(QMainWindow):
|
|||||||
settings.setValue("data/dataRoot", dirname)
|
settings.setValue("data/dataRoot", dirname)
|
||||||
if settings.value('compclass', None) is None:
|
if settings.value('compclass', None) is None:
|
||||||
settings.setValue('compclass', SetChannelComponents())
|
settings.setValue('compclass', SetChannelComponents())
|
||||||
|
if settings.value('output/Format', None) is None:
|
||||||
|
outformat = QInputDialog.getText(self,
|
||||||
|
"Enter output format (*.xml, *.cnv, *.obs):",
|
||||||
|
"Format")
|
||||||
|
settings.setValue("output/Format", outformat)
|
||||||
settings.sync()
|
settings.sync()
|
||||||
|
|
||||||
# setup UI
|
# setup UI
|
||||||
@ -1040,9 +1045,16 @@ class MainWindow(QMainWindow):
|
|||||||
eventname = self.get_current_event_name()
|
eventname = self.get_current_event_name()
|
||||||
filename = 'PyLoT_'+eventname
|
filename = 'PyLoT_'+eventname
|
||||||
outpath = os.path.join(directory, filename)
|
outpath = os.path.join(directory, filename)
|
||||||
file_filter = "QuakeML file (*.xml);;VELEST observation file " \
|
|
||||||
"format (*.cnv);;NonLinLoc observation file (*.obs)"
|
|
||||||
title = 'Save pick data ...'
|
title = 'Save pick data ...'
|
||||||
|
outformat = settings.value('output/Format')
|
||||||
|
outformat = outformat[0:4]
|
||||||
|
if outformat == '.obs':
|
||||||
|
file_filter = "NonLinLoc observation file (*.obs)"
|
||||||
|
elif outformat == '.cnv':
|
||||||
|
file_filter = "VELEST observation file format (*.cnv)"
|
||||||
|
elif outformat == '.xml':
|
||||||
|
file_filter = "QuakeML file (*.xml)"
|
||||||
|
|
||||||
fname, selected_filter = QFileDialog.getSaveFileName(self,
|
fname, selected_filter = QFileDialog.getSaveFileName(self,
|
||||||
title,
|
title,
|
||||||
outpath,
|
outpath,
|
||||||
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 52 KiB |
BIN
icons/save.png
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
BIN
icons/saveas.png
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 41 KiB |
54411
icons_rc.py
@ -35,7 +35,7 @@ from PySide.QtGui import QAction, QApplication, QCheckBox, QComboBox, \
|
|||||||
from PySide.QtCore import QSettings, Qt, QUrl, Signal, Slot
|
from PySide.QtCore import QSettings, Qt, QUrl, Signal, Slot
|
||||||
from PySide.QtWebKit import QWebView
|
from PySide.QtWebKit import QWebView
|
||||||
from obspy import Stream, UTCDateTime
|
from obspy import Stream, UTCDateTime
|
||||||
from obspy.core.util import AttribDict
|
from obspy.core.util import AttribDict
|
||||||
from pylot.core.io.data import Data
|
from pylot.core.io.data import Data
|
||||||
from pylot.core.io.inputs import FilterOptions, PylotParameter
|
from pylot.core.io.inputs import FilterOptions, PylotParameter
|
||||||
from pylot.core.pick.utils import getSNR, earllatepicker, getnoisewin, \
|
from pylot.core.pick.utils import getSNR, earllatepicker, getnoisewin, \
|
||||||
@ -1361,11 +1361,11 @@ class PickDlg(QDialog):
|
|||||||
'S': ('m', 'm--', 'r-', 'rv', 'r^', 'r', 'm:')
|
'S': ('m', 'm--', 'r-', 'rv', 'r^', 'r', 'm:')
|
||||||
}
|
}
|
||||||
if self.getPicks(picktype):
|
if self.getPicks(picktype):
|
||||||
if phase is not None:
|
if phase is not None:
|
||||||
if (type(self.getPicks(picktype)[phase]) is dict
|
if (type(self.getPicks(picktype)[phase]) is dict
|
||||||
or type(self.getPicks(picktype)[phase]) is AttribDict):
|
or type(self.getPicks(picktype)[phase]) is AttribDict):
|
||||||
picks = self.getPicks(picktype)[phase]
|
picks = self.getPicks(picktype)[phase]
|
||||||
colors = phase_col[phase[0].upper()]
|
colors = phase_col[phase[0].upper()]
|
||||||
elif phase is None:
|
elif phase is None:
|
||||||
for phase in self.getPicks(picktype):
|
for phase in self.getPicks(picktype):
|
||||||
self.drawPicks(phase, picktype)
|
self.drawPicks(phase, picktype)
|
||||||
@ -2464,6 +2464,7 @@ class PropertiesDlg(QDialog):
|
|||||||
elif setting.startswith('Channel N'):
|
elif setting.startswith('Channel N'):
|
||||||
component = 'N'
|
component = 'N'
|
||||||
compclass.setCompPosition(value, component, False)
|
compclass.setCompPosition(value, component, False)
|
||||||
|
|
||||||
settings.sync()
|
settings.sync()
|
||||||
|
|
||||||
|
|
||||||
@ -2555,7 +2556,7 @@ class OutputsTab(PropTab):
|
|||||||
settings = QSettings()
|
settings = QSettings()
|
||||||
curval = settings.value("output/Format", None)
|
curval = settings.value("output/Format", None)
|
||||||
|
|
||||||
eventOutputLabel = QLabel("event ouput format")
|
eventOutputLabel = QLabel("event/picks ouput format")
|
||||||
self.eventOutputComboBox = QComboBox()
|
self.eventOutputComboBox = QComboBox()
|
||||||
eventoutputformats = OUTPUTFORMATS.keys()
|
eventoutputformats = OUTPUTFORMATS.keys()
|
||||||
self.eventOutputComboBox.addItems(eventoutputformats)
|
self.eventOutputComboBox.addItems(eventoutputformats)
|
||||||
|