Cmd File Generator

From Advanced Labs Wiki
Revision as of 22:32, 21 April 2014 by Tobias Marriage (talk | contribs) (Created page with '<pre> time = 180 #integration in seconds pointings = ['G10', 'G20', 'G30', 'G40', 'G50', 'G60', 'G70', 'G80', 'G90'] run_label = '15' # this is a unique identifier for this datas…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
time = 180 #integration in seconds
pointings = ['G10', 'G20', 'G30', 'G40', 'G50', 'G60', 'G70', 'G80', 'G90']
run_label = '15' # this is a unique identifier for this dataset. 
                 #A serial#, date, or...
ints_per_point = 5 # number of integrations per pointing
directory = '/home/student/data/AdvLab' #directory where data is stored

f = file('cmd.txt','w')
for p in pointings:
    f.write(': %s\n' % p)
    for i in range(ints_per_point):
        f.write(': clearint\n')
        f.write(': record %s/%s_%s_%02d.rad\n' % (directory, p, run_label, i))
        f.write(':%d\n' % time)
        f.write(': roff\n')

f.close()