Merge branch 'develop' of ariadne.geophysik.rub.de:/data/git/pylot into develop
This commit is contained in:
		
						commit
						02a0abffd9
					
				
							
								
								
									
										8
									
								
								PyLoT.py
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								PyLoT.py
									
									
									
									
									
								
							@ -79,7 +79,7 @@ from pylot.core.io.location import create_creation_info, create_event
 | 
				
			|||||||
from pylot.core.util.widgets import FilterOptionsDialog, NewEventDlg, \
 | 
					from pylot.core.util.widgets import FilterOptionsDialog, NewEventDlg, \
 | 
				
			||||||
    PylotCanvas, WaveformWidgetPG, PropertiesDlg, HelpForm, createAction, PickDlg, \
 | 
					    PylotCanvas, WaveformWidgetPG, PropertiesDlg, HelpForm, createAction, PickDlg, \
 | 
				
			||||||
    ComparisonWidget, TuneAutopicker, PylotParaBox, AutoPickDlg, CanvasWidget, AutoPickWidget, \
 | 
					    ComparisonWidget, TuneAutopicker, PylotParaBox, AutoPickDlg, CanvasWidget, AutoPickWidget, \
 | 
				
			||||||
    CompareEventsWidget, ProgressBarWidget, AddMetadataWidget
 | 
					    CompareEventsWidget, ProgressBarWidget, AddMetadataWidget, FileExtensionDialog
 | 
				
			||||||
from pylot.core.util.array_map import Array_map
 | 
					from pylot.core.util.array_map import Array_map
 | 
				
			||||||
from pylot.core.util.structure import DATASTRUCTURE
 | 
					from pylot.core.util.structure import DATASTRUCTURE
 | 
				
			||||||
from pylot.core.util.thread import Thread, Worker
 | 
					from pylot.core.util.thread import Thread, Worker
 | 
				
			||||||
@ -941,7 +941,11 @@ class MainWindow(QMainWindow):
 | 
				
			|||||||
            return
 | 
					            return
 | 
				
			||||||
        refresh = False
 | 
					        refresh = False
 | 
				
			||||||
        events = self.project.eventlist
 | 
					        events = self.project.eventlist
 | 
				
			||||||
        fext = '.xml'
 | 
					        fed = FileExtensionDialog()
 | 
				
			||||||
 | 
					        if not fed.exec_():
 | 
				
			||||||
 | 
					            return
 | 
				
			||||||
 | 
					        fext = fed.file_extension.text()
 | 
				
			||||||
 | 
					        #fext = '.xml'
 | 
				
			||||||
        for event in events:
 | 
					        for event in events:
 | 
				
			||||||
            path = event.path
 | 
					            path = event.path
 | 
				
			||||||
            eventname = path.split('/')[-1]  # or event.pylot_id
 | 
					            eventname = path.split('/')[-1]  # or event.pylot_id
 | 
				
			||||||
 | 
				
			|||||||
@ -1 +1 @@
 | 
				
			|||||||
python ./autoPyLoT.py -i /home/marcel/.pylot/pylot_global.in -dmt processed -c 80
 | 
					python ./autoPyLoT.py -i /home/marcel/.pylot/pylot_alparray_mantle.in -dmt processed -c $NSLOTS
 | 
				
			||||||
 | 
				
			|||||||
@ -327,7 +327,7 @@ def picks_from_picksdict(picks, creation_info=None):
 | 
				
			|||||||
                filter_id = phase['filteroptions']
 | 
					                filter_id = phase['filteroptions']
 | 
				
			||||||
                filter_id = transformFilterString4Export(filter_id)
 | 
					                filter_id = transformFilterString4Export(filter_id)
 | 
				
			||||||
            except KeyError as e:
 | 
					            except KeyError as e:
 | 
				
			||||||
                warnings.warn(e.message, RuntimeWarning)
 | 
					                warnings.warn(str(e), RuntimeWarning)
 | 
				
			||||||
                filter_id = ''
 | 
					                filter_id = ''
 | 
				
			||||||
            pick.filter_id = filter_id
 | 
					            pick.filter_id = filter_id
 | 
				
			||||||
            try:
 | 
					            try:
 | 
				
			||||||
 | 
				
			|||||||
@ -1489,6 +1489,39 @@ class PylotCanvas(FigureCanvas):
 | 
				
			|||||||
        self.draw()
 | 
					        self.draw()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class FileExtensionDialog(QtGui.QDialog):
 | 
				
			||||||
 | 
					    def __init__(self, parent=None, default_extension='.xml'):
 | 
				
			||||||
 | 
					        super(FileExtensionDialog, self).__init__(parent)
 | 
				
			||||||
 | 
					        self.default_extension = default_extension
 | 
				
			||||||
 | 
					        self.setButtons()
 | 
				
			||||||
 | 
					        self.connectSignals()
 | 
				
			||||||
 | 
					        self.setupUi()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def setupUi(self):
 | 
				
			||||||
 | 
					        self.main_layout = QtGui.QVBoxLayout()
 | 
				
			||||||
 | 
					        self.sub_layout = QtGui.QHBoxLayout()
 | 
				
			||||||
 | 
					        #
 | 
				
			||||||
 | 
					        self.setLayout(self.main_layout)
 | 
				
			||||||
 | 
					        self.textLabel = QtGui.QLabel('Specify file extension: ')
 | 
				
			||||||
 | 
					        self.file_extension = QtGui.QLineEdit(self.default_extension)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        self.sub_layout.addWidget(self.textLabel)
 | 
				
			||||||
 | 
					        self.sub_layout.addWidget(self.file_extension)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        self.main_layout.addLayout(self.sub_layout)
 | 
				
			||||||
 | 
					        self.main_layout.addWidget(self._buttonbox)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def setButtons(self):
 | 
				
			||||||
 | 
					        self._buttonbox = QDialogButtonBox(QDialogButtonBox.Ok |
 | 
				
			||||||
 | 
					                                           QDialogButtonBox.Cancel)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def connectSignals(self):
 | 
				
			||||||
 | 
					        self._buttonbox.accepted.connect(self.accept)
 | 
				
			||||||
 | 
					        self._buttonbox.rejected.connect(self.reject)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class PhaseDefaults(QtGui.QDialog):
 | 
					class PhaseDefaults(QtGui.QDialog):
 | 
				
			||||||
    def __init__(self, parent=None, nrow=10,
 | 
					    def __init__(self, parent=None, nrow=10,
 | 
				
			||||||
                 phase_defaults=['P', 'S'],
 | 
					                 phase_defaults=['P', 'S'],
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user