Compare commits
2 Commits
71d4269a4f
...
5a2a1fe990
Author | SHA1 | Date | |
---|---|---|---|
5a2a1fe990 | |||
64b719fd54 |
8
PyLoT.py
8
PyLoT.py
@ -1011,7 +1011,7 @@ class MainWindow(QMainWindow):
|
|||||||
for event in events:
|
for event in events:
|
||||||
for filename in filenames:
|
for filename in filenames:
|
||||||
if os.path.isfile(filename) and event.pylot_id in filename:
|
if os.path.isfile(filename) and event.pylot_id in filename:
|
||||||
self.load_data(filename, draw=False, event=event, ask_user=True, merge_strategy=sld.merge_strategy)
|
self.load_data(filename, draw=False, event=event, ask_user=False, merge_strategy=sld.merge_strategy)
|
||||||
refresh = True
|
refresh = True
|
||||||
if not refresh:
|
if not refresh:
|
||||||
return
|
return
|
||||||
@ -1020,8 +1020,8 @@ class MainWindow(QMainWindow):
|
|||||||
self.fill_eventbox()
|
self.fill_eventbox()
|
||||||
self.setDirty(True)
|
self.setDirty(True)
|
||||||
|
|
||||||
def load_data(self, fname=None, loc=False, draw=True, event=None, ask_user=False, merge_strategy='Overwrite'):
|
def load_data(self, fname=None, loc=False, draw=True, event=None, ask_user=True, merge_strategy='Overwrite',):
|
||||||
if not ask_user:
|
if ask_user:
|
||||||
if not self.okToContinue():
|
if not self.okToContinue():
|
||||||
return
|
return
|
||||||
if fname is None:
|
if fname is None:
|
||||||
@ -1034,7 +1034,7 @@ class MainWindow(QMainWindow):
|
|||||||
if not event:
|
if not event:
|
||||||
event = self.get_current_event()
|
event = self.get_current_event()
|
||||||
|
|
||||||
if event.picks:
|
if event.picks and ask_user:
|
||||||
qmb = QMessageBox(self, icon=QMessageBox.Question,
|
qmb = QMessageBox(self, icon=QMessageBox.Question,
|
||||||
text='Do you want to overwrite the data?',)
|
text='Do you want to overwrite the data?',)
|
||||||
overwrite_button = qmb.addButton('Overwrite', QMessageBox.YesRole)
|
overwrite_button = qmb.addButton('Overwrite', QMessageBox.YesRole)
|
||||||
|
@ -447,8 +447,12 @@ def correlation_main(database_path_dmt: str, pylot_infile_path: str, params: dic
|
|||||||
if event_blacklist and get_event_id(eventdir) in event_blacklist:
|
if event_blacklist and get_event_id(eventdir) in event_blacklist:
|
||||||
logging.info('Event on blacklist. Continue')
|
logging.info('Event on blacklist. Continue')
|
||||||
|
|
||||||
|
try:
|
||||||
correlate_event(eventdir, pylot_parameter, params=params, channel_config=channel_config,
|
correlate_event(eventdir, pylot_parameter, params=params, channel_config=channel_config,
|
||||||
update=update)
|
update=update)
|
||||||
|
except Exception as e:
|
||||||
|
logging.error(f'Could not correlate event {eventindex}: {e}')
|
||||||
|
continue
|
||||||
|
|
||||||
logging.info('Finished script after {} at {}'.format(datetime.now() - tstart, datetime.now()))
|
logging.info('Finished script after {} at {}'.format(datetime.now() - tstart, datetime.now()))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user