Compare commits

..

No commits in common. "207d0b3a6fbb94d2c1d428852d0bea5ef315e268" and "0c3fca929910268ed8fd3811ed6f23ff151ee3f5" have entirely different histories.

View File

@ -481,7 +481,7 @@ class MainWindow(QMainWindow):
"automatic pick "
"data.", False)
self.compare_action.setEnabled(False)
self.qualities_action = self.createAction(parent=self, text='Show pick qualities...',
self.qualities_action = self.createAction(parent=self, text='Show pick qualitites...',
slot=self.pickQualities, shortcut='Alt+Q',
icon=qualities_icon, tip='Histogram of pick qualities')
self.qualities_action.setEnabled(False)
@ -1181,7 +1181,7 @@ class MainWindow(QMainWindow):
'''
if not self.project:
self.createNewProject()
ed = GetExistingDirectories(self, 'Select event directories...')
ed = getExistingDirectories(self, 'Select event directories...')
if ed.exec_():
eventlist = [event for event in ed.selectedFiles() if not event.endswith('EVENTS-INFO')]
basepath = eventlist[0].split(os.path.basename(eventlist[0]))[0]
@ -2898,9 +2898,7 @@ class MainWindow(QMainWindow):
self.log_deleted_picks([deleted_pick])
def log_deleted_picks(self, deleted_picks, event_path=None):
'''
Log deleted picks to list self.deleted_picks
'''
''' Log deleted picks to list self.deleted_picks '''
if not event_path:
event_path = self.get_current_event_path()
for deleted_pick in deleted_picks:
@ -2914,9 +2912,7 @@ class MainWindow(QMainWindow):
self.deleted_picks[event_path].append(deleted_pick)
def dump_deleted_picks(self, event_path):
'''
Save deleted picks to json file for event in event_path. Load old file before and merge
'''
''' Save deleted picks to json file for event in event_path. Load old file before and merge'''
try:
deleted_picks_from_file = self.load_deleted_picks(event_path)
except Exception as e:
@ -3826,7 +3822,7 @@ class MainWindow(QMainWindow):
def helpHelp(self):
if checkurl():
form = HelpForm(self,
'https://github.com/seismology-RUB/PyLoT')
'https://ariadne.geophysik.ruhr-uni-bochum.de/trac/PyLoT/wiki')
else:
form = HelpForm(self, ':/help.html')
form.show()
@ -4006,13 +4002,13 @@ class Project(object):
return project
class GetExistingDirectories(QFileDialog):
class getExistingDirectories(QFileDialog):
'''
File dialog with possibility to select multiple folders.
'''
def __init__(self, *args):
super(GetExistingDirectories, self).__init__(*args)
super(getExistingDirectories, self).__init__(*args)
self.setOption(self.DontUseNativeDialog, True)
self.setOption(self.ReadOnly, True)
self.setFileMode(self.Directory)
@ -4038,7 +4034,16 @@ def create_window():
return app, app_created
def main(project_filename=None, pylot_infile=None, reset_qsettings=False):
def main(args=None):
project_filename = None
# args.project_filename = 'C:/Shared/AlpArray/alparray_data/project_alparray_test.plp'
pylot_infile = None
if args:
if args.project_filename:
project_filename = args.project_filename
if args.input_filename:
pylot_infile = args.input_filename
reset_qsettings = args.reset_qsettings
# create the Qt application
pylot_app, app_created = create_window()
@ -4087,5 +4092,4 @@ if __name__ == "__main__":
parser.add_argument('--reset_qsettings', default=False, action='store_true',
help='reset qsettings (debug option)')
args = parser.parse_args()
sys.exit(main(project_filename=args.project_filename, pylot_infile=args.input_filename,
reset_qsettings=args.reset_qsettings))
sys.exit(main(args))