"/afs/cern.ch/eng/sl/lintrack/Beta-Beat.src/MODEL/LHCB1/nominal.opt", dest="MODEL") parser.add_option("-p", "--poutput", help="Output path", metavar="PATH", default="./", dest="PATH") (options, args) = parser.parse_args() ########## filename = options.FILEN twiss = io.TFSReader(options.MODEL) twissfile = twiss2(options.MODEL) sbunch = options.BUNCH #this is index of list of bunches in lbunches (-->bunch id array) #ex: lbunches=['3','4','5','6'], sbunch=3 --> bunch_id=6 ############################## #load sdds data def getdata(plane): print 'data list has ', len(a.data), ' elements' d = a.data[0] names = d['bpmNames'] nbpms = len(names) print "Number of bpms ", nbpms #print "the index of the bpms is ",names.tolist().index('BPM.29R4.B1')
metavar="MODEL", default="/afs/cern.ch/eng/sl/lintrack/Beta-Beat.src/MODEL/LHCB1/nominal.opt",dest="MODEL") parser.add_option("-p", "--poutput", help="Output path", metavar="PATH", default="./",dest="PATH") (options, args) = parser.parse_args() ########## filename=options.FILEN twiss = io.TFSReader(options.MODEL) twissfile=twiss2(options.MODEL) sbunch = options.BUNCH #this is index of list of bunches in lbunches (-->bunch id array) #ex: lbunches=['3','4','5','6'], sbunch=3 --> bunch_id=6 ############################## #load sdds data def getdata(plane): print 'data list has ',len(a.data), ' elements' d = a.data[0] names = d['bpmNames'] nbpms = len(names) nturns = int(d['nbOfCapTurns'].tostring())