[add] multiple eventIDs possible as eventID pylot_parameter (testing needed)
This commit is contained in:
parent
cab9061030
commit
ddb1fb8b97
@ -164,9 +164,14 @@ def autoPyLoT(input_dict=None, parameter=None, inputfile=None, fnames=None, even
|
||||
# multiple event processing
|
||||
# read each event in database
|
||||
events = [events for events in glob.glob(os.path.join(datapath, '*')) if os.path.isdir(events)]
|
||||
elif fnames == 'None' and parameter['eventID'] is not '*':
|
||||
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']))
|
||||
elif fnames == 'None' and type(parameter['eventID']) == list:
|
||||
# multiple event processing
|
||||
events = []
|
||||
for eventID in parameter['eventID']:
|
||||
events.append(os.path.join(datapath, eventID))
|
||||
else:
|
||||
# autoPyLoT was initialized from GUI
|
||||
events = []
|
||||
@ -450,7 +455,7 @@ if __name__ == "__main__":
|
||||
parser.add_argument('-f', '-F', '--fnames', type=str,
|
||||
action='store',
|
||||
help='''optional, list of data file names''')
|
||||
parser.add_argument('-e', '-E', '--eventid', type=str,
|
||||
parser.add_argument('-e', '--eventid', type=str,
|
||||
action='store',
|
||||
help='''optional, event path incl. event ID''')
|
||||
parser.add_argument('-s', '-S', '--spath', type=str,
|
||||
|
@ -2898,8 +2898,15 @@ class AutoPickDlg(QDialog):
|
||||
|
||||
def exportParameter(self):
|
||||
pylot_params = self.parent()._inputs
|
||||
self.addEvents2pp(pylot_params)
|
||||
pylot_params.export2File(self.pp_export)
|
||||
|
||||
def addEvents2pp(self, pylot_parameter):
|
||||
eventIDs = []
|
||||
for event in self.parent().project.eventlist:
|
||||
eventIDs.append(event.pylot_id)
|
||||
pylot_parameter['eventID'] = eventIDs
|
||||
|
||||
def accept(self):
|
||||
self.exportParameter()
|
||||
self.job_widget.start(self.pp_export, self.sb_ncores.value())
|
||||
|
Loading…
Reference in New Issue
Block a user