def _rungetllm(twiss_filename, files, dpp, output_path, accel_inst, algorithm): """ Running GetLLM... """ import GetLLM LOG.debug("Will run getllm for dpp {:f}".format(dpp)) if "lhc" == accel_inst.NAME: lhcphase = "1" accel_name = "LHCB" + str(accel_inst.get_beam()) else: lhcphase = "0" accel_name = accel_inst.NAME.upper( ) #TODO: TEST that! Should work for ESRF at least. GetLLM.main(outputpath=output_path, files_to_analyse=','.join(files), model_filename=twiss_filename, accel=accel_name, tbtana=algorithm, lhcphase=lhcphase) LOG.debug("GetLLM finished") for fname in _get_output_filenames(output_path): src_path = _join_with_output_path(output_path, fname) dst_path = _join_with_output_path(output_path, fname.replace(_ext(), _ext(dpp))) shutil.move(src_path, dst_path)
def _rungetllm(twiss_filename, files, dpp): ''' Running GetLLM... ''' import GetLLM print "Will run getllm for ", dpp if "LHC" in _InputData.accel.upper(): lhcphase = "1" else: lhcphase = "0" GetLLM.main(outputpath=_InputData.output_path, files_to_analyse=','.join(files), model_filename=twiss_filename, accel=_InputData.accel, tbtana=_InputData.technique, lhcphase=lhcphase) print "GetLLM finished" for fname in _get_filenames_in_output_with_dpp(): src_path = _join_with_output_path(fname) dst_path = _join_with_output_path( fname.replace(".out", "_" + str(dpp) + ".out")) shutil.move(src_path, dst_path)
def _rungetllm(twiss_filename, files, dpp, output_path, accel_inst, algorithm): """ Running GetLLM... """ import GetLLM LOG.debug("Will run getllm for dpp {:f}".format(dpp)) if "lhc" == accel_inst.NAME: lhcphase = "1" accel_name = "LHCB" + str(accel_inst.get_beam()) else: lhcphase = "0" accel_name = accel_inst.NAME.upper() #TODO: TEST that! Should work for ESRF at least. GetLLM.main(outputpath=output_path, files_to_analyse=','.join(files), model_filename=twiss_filename, accel=accel_name, tbtana=algorithm, lhcphase=lhcphase) LOG.debug("GetLLM finished") for fname in _get_output_filenames(output_path): src_path = _join_with_output_path(output_path, fname) dst_path = _join_with_output_path(output_path, fname.replace(_ext(), _ext(dpp))) shutil.move(src_path, dst_path)
def run_getllm(): GetLLM.main( outputpath=my_outputpath, dict_file=my_dict_file, files_to_analyse=my_files_to_analyse, twiss_model_file=my_twiss_model_file, accel=my_accel, lhcphase=my_lhcphase, BPMU=my_BPMU, COcut=float(my_COcut), NBcpl=my_NBcpl, TBTana=my_TBTana, higher_order=my_higher_order)
def _rungetllm(twiss_filename, files, dpp): """ Running GetLLM... """ import GetLLM print "Will run getllm for ", dpp GetLLM.main( outputpath=_InputData.output_path, files_to_analyse=",".join(files), model_filename=twiss_filename, accel=_InputData.accel, TBTana=_InputData.technique, ) print "GetLLM finished" for fname in _get_filenames_in_output_with_dpp(): src_path = _join_with_output_path(fname) dst_path = _join_with_output_path(fname.replace(".out", "_" + str(dpp) + ".out")) shutil.move(src_path, dst_path)
def rungetllm(twissfile,accel,technique,files,options,dpp): ''' Running GetLLM... ''' if options.llm_version: print "GetLLM_V"+options.llm_version+" as GetLLM" exec("import GetLLM_V"+options.llm_version+" as GetLLM") else: import GetLLM print "Will run getllm for ",dpp #, command GetLLM.main(outputpath=options.output, files_to_analyse=append(files), twiss_model_file=twissfile, accel=accel, TBTana=technique) print "GetLLM finished" for fname in filenames(): v=fname.strip('.out') shutil.move(options.output+'/'+fname,options.output+'/'+v+'_'+str(dpp)+'.out')
def _rungetllm(twiss_filename, files, dpp): ''' Running GetLLM... ''' import GetLLM print "Will run getllm for ", dpp if "LHC" in _InputData.accel.upper(): lhcphase = "1" else: lhcphase = "0" GetLLM.main(outputpath=_InputData.output_path, files_to_analyse=','.join(files), model_filename=twiss_filename, accel=_InputData.accel, TBTana=_InputData.technique, lhcphase=lhcphase) print "GetLLM finished" for fname in _get_filenames_in_output_with_dpp(): src_path = _join_with_output_path(fname) dst_path = _join_with_output_path(fname.replace(".out", "_"+str(dpp)+".out")) shutil.move(src_path, dst_path)