[minor] exclude folder "EVENTS-INFO" from possible event folders in dmt_structure
This commit is contained in:
parent
dfc9de69de
commit
6d4610983d
2
PyLoT.py
2
PyLoT.py
@ -1088,7 +1088,7 @@ class MainWindow(QMainWindow):
|
|||||||
self.createNewProject()
|
self.createNewProject()
|
||||||
ed = getExistingDirectories(self, 'Select event directories...')
|
ed = getExistingDirectories(self, 'Select event directories...')
|
||||||
if ed.exec_():
|
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]
|
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
|
# 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')
|
eventlist_file = os.path.join(basepath, 'eventlist.txt')
|
||||||
|
@ -191,7 +191,8 @@ def autoPyLoT(input_dict=None, parameter=None, inputfile=None, fnames=None, even
|
|||||||
if fnames == 'None' and parameter['eventID'] is '*':
|
if fnames == 'None' and parameter['eventID'] is '*':
|
||||||
# multiple event processing
|
# multiple event processing
|
||||||
# read each event in database
|
# 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:
|
elif fnames == 'None' and parameter['eventID'] is not '*' and not type(parameter['eventID']) == list:
|
||||||
# single event processing
|
# single event processing
|
||||||
events = glob.glob(os.path.join(datapath, parameter['eventID']))
|
events = glob.glob(os.path.join(datapath, parameter['eventID']))
|
||||||
|
Loading…
Reference in New Issue
Block a user