[minor] exclude folder "EVENTS-INFO" from possible event folders in dmt_structure

This commit is contained in:
Marcel Paffrath 2019-04-03 15:08:36 +02:00
parent dfc9de69de
commit 6d4610983d
2 changed files with 3 additions and 2 deletions

View File

@ -1088,7 +1088,7 @@ class MainWindow(QMainWindow):
self.createNewProject()
ed = getExistingDirectories(self, 'Select event directories...')
if ed.exec_():
eventlist = ed.selectedFiles()
eventlist = [event for event in ed.selectedFiles() if not event.endswith('EVENTS-INFO')]
basepath = eventlist[0].split(os.path.basename(eventlist[0]))[0]
# small hack: if a file "eventlist.txt" is found in the basepath use only those events specified inside
eventlist_file = os.path.join(basepath, 'eventlist.txt')

View File

@ -191,7 +191,8 @@ def autoPyLoT(input_dict=None, parameter=None, inputfile=None, fnames=None, even
if fnames == 'None' and parameter['eventID'] is '*':
# multiple event processing
# read each event in database
events = [events for events in glob.glob(os.path.join(datapath, '*')) if os.path.isdir(events)]
events = [event for event in glob.glob(os.path.join(datapath, '*')) if
(os.path.isdir(event) and not event.endswith('EVENTS-INFO'))]
elif fnames == 'None' and parameter['eventID'] is not '*' and not type(parameter['eventID']) == list:
# single event processing
events = glob.glob(os.path.join(datapath, parameter['eventID']))