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) print "Number of bpms ", nbpms
#-maybe adjust space with .rjust,.ljust for better layout of tfs output #-once there is data, verify we have enough digits on position data printed out in tfs #-could setup: #---- read input info from argv #---- read a list of bunches insteda of a single one for run #---- could change input sbunch to # 'bunch_id' (now it's just index of the list of available bunches) import sddsdataFED as sdds import io from numpy import * #input, should be set up with argv from the command line? filename = "LHCBPM2-Mon_Jun_29_16-26-00_CEST_2009.sdds" twiss = io.TFSReader('../../LHCB2/twiss.dat') #select the plane plane = 'hor' #plane='ver' #select bunches for which you want to print out the orbit sbunch = 3 #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 a = sdds.sddsdata(filename, 'big')