x = range(5) # creates a vector of length 5, x = [0,1,2,3,4] len(x) # gives the length of the vector x[0] # gets the first element of the vector x[-1] # gets the last element of the vector
for i in range(5): print i
x = [] # empty for i in range(5): x.append(i*5)
for i in x: print i
Let's say we have three files (a.rpf, b.rpf, c.rpf) which contain
on/off pairs and we want to get the quotients
fnames = ["a.rpf","b.rpf","c.rpf"] # First we set up a vector of filenames vec = [] # a vector to hold the scantables for f in fnames: vec.append(scantable(f)) # fill the vector with scantables
quotients = [] # to hold the quotient scantables for scan in vec: # loop over input scantables quotients.append(scan.auto_quotient()) # add this quotient to the vector
for q in quotients: print q q.auto_poly_baseline(order=1,insitu=True)
av = average_time(quotients)