def list_of_sources_in_run(ins, exp, run): """Returns the list of detectors in style of psana, for example 'CxiDs1.0:Cspad.0' """ return [ det.replace("|", ":").replace("-", ".") for det in experiment_info.detectors(ins, exp, run) ]
def list_of_sources_in_run (ins, exp, run) : """Returns the list of detectors in style of psana, for example 'CxiDs1.0:Cspad.0' """ #list_of_detectors = experiment_info.detectors (ins, exp, run) #list_of_dets_for_psana = [] #for det in list_of_detectors : # det_in_psana = det.replace("|",":").replace("-",".") # list_of_dets_for_psana.append(det_in_psana) #return list_of_dets_for_psana return [det.replace("|",":").replace("-",".") for det in experiment_info.detectors (ins, exp, run)]
def list_of_sources_in_run (ins, exp, run) : """Returns the list of detectors in style of psana, for example 'CxiDs1.0:Cspad.0' """ return [det.replace("|",":").replace("-",".") for det in experiment_info.detectors (ins, exp, run)]
def detectors (ins, exp, run, style='psana') : """Returns the list of detectors, for example: ['BldEb-0|NoDevice-0', 'CxiDg1-0|Tm6740-0', 'CxiDg2-0|Tm6740-0', 'CxiDs1-0|Cspad-0', ...]. """ if style == 'psana' : return list_of_sources_in_run(ins, exp, run) else : return experiment_info.detectors(ins, exp, run)