#!/usr/local/bin/python2.7 """ This script builds a webpage to show the astroholography/TICRA/Gaussian/Airy profiles """ import glob import numpy as np freq = {'LSB': {3:86.29, 6:230.58, 7:333.84}, 'USB': {3:98.196, 6:245.49, 7:345.75}} for band in ['3','6','7']: for antennaType in ['DA','DV','PM']: f = open('Band%s%sprofiles.html'%(band,antennaType),'w') f.write('\n') f.write(' \n') f.write('Band %s results for %s antennas\n' % (band,antennaType)) f.write('

Band %s results for %s antennas

\n' % (band,antennaType)) f.write('\n') f.write('\n') f.write('(Click here to return to Memo wikipage)\n') f.write('

Horizontal polarization

\n') for sideband in ['LSB','USB']: if (sideband == 'USB'): f.write('\n') else: f.write('\n') f.write('

%s (%.1f GHz)

\n' %(sideband,freq[sideband][int(band)])) if (sideband == 'LSB'): f.write('
Click here to scroll down to USB
\n') else: f.write('Click here to scroll up to LSB
\n') f.write('') label = ' \n' % (antenna) files = glob.glob('overlayCuts/Band%s*%s*%s*.png'%(band,antenna,sideband)) if (len(files) > maxdatasets): maxdatasets = len(files) for file in files: block += "\n" % (file) block += '\n' # for i in range(maxdatasets): # f.write(label) # f.write('\n') f.write(block) f.write('
Antenna
TICRA model image
Astroholography image
' block = '' maxdatasets = 0 for antenna in antennas: block += '
%s
\n') f.close()