<commit_before>#!/usr/bin/env python

# Update the antenna positions in the specified HDF5 file.

import h5py
import sys

if len(sys.argv) < 2:
    print "Update antenna positions in the specified HDF5 file.\n\nUsage: fix_ant_positions.py <filename.h5>\n"
    sys.exit()

f = h5py.File(sys.argv[1])

f['MetaData/Configuration/Antennas/ant1'].attrs['description'] = 'ant1, -30:43:17.3, 21:24:38.5, 1038.0, 12.0, 25.095 -9.095 0.045, , 1.22'
f['MetaData/Configuration/Antennas/ant2'].attrs['description'] = 'ant2, -30:43:17.3, 21:24:38.5, 1038.0, 12.0, 90.288 26.389 -0.238, , 1.22'
f['MetaData/Configuration/Antennas/ant3'].attrs['description'] = 'ant3, -30:43:17.3, 21:24:38.5, 1038.0, 12.0, 3.985 26.899 -0.012, , 1.22'
f['MetaData/Configuration/Antennas/ant4'].attrs['description'] = 'ant4, -30:43:17.3, 21:24:38.5, 1038.0, 12.0, -21.600 25.500 0.000, , 1.22'
f['MetaData/Configuration/Antennas/ant5'].attrs['description'] = 'ant5, -30:43:17.3, 21:24:38.5, 1038.0, 12.0, -38.264 -2.586 0.371, , 1.22'
f['MetaData/Configuration/Antennas/ant6'].attrs['description'] = 'ant6, -30:43:17.3, 21:24:38.5, 1038.0, 12.0, -61.580 -79.685 0.690, , 1.22'
f['MetaData/Configuration/Antennas/ant7'].attrs['description'] = 'ant7, -30:43:17.3, 21:24:38.5, 1038.0, 12.0, -87.979 75.756 0.125, , 1.22'

f.close()

print "Updated antenna positions..."
<commit_msg>Updated antenna locations as provided by <NAME>, produced by applying his source-subtraction algorithm to 1314375234.h5, a six-hour baseline cal run taken on 2011-08-26. The accuracy should be on the order of millimetres, and according to Stephen there might still be some (small) residual issues with antennas 2 and 7.<commit_after>#!/usr/bin/env python

# Update the antenna positions in the specified HDF5 file.

import h5py
import sys

if len(sys.argv) < 2:
    print "Update antenna positions in the specified HDF5 file.\n\nUsage: fix_ant_positions.py <filename.h5>\n"
    sys.exit()

f = h5py.File(sys.argv[1])

f['MetaData/Configuration/Antennas/ant1'].attrs['description'] = 'ant1, -30:43:17.3, 21:24:38.5, 1038.0, 12.0, 25.0950 -9.0950 0.0450, , 1.22'
f['MetaData/Configuration/Antennas/ant2'].attrs['description'] = 'ant2, -30:43:17.3, 21:24:38.5, 1038.0, 12.0, 90.2844 26.3804 -0.22636, , 1.22'
f['MetaData/Configuration/Antennas/ant3'].attrs['description'] = 'ant3, -30:43:17.3, 21:24:38.5, 1038.0, 12.0, 3.98474 26.8929 0.0004046, , 1.22'
f['MetaData/Configuration/Antennas/ant4'].attrs['description'] = 'ant4, -30:43:17.3, 21:24:38.5, 1038.0, 12.0, -21.6053 25.4936 0.018615, , 1.22'
f['MetaData/Configuration/Antennas/ant5'].attrs['description'] = 'ant5, -30:43:17.3, 21:24:38.5, 1038.0, 12.0, -38.2720 -2.5917 0.391362, , 1.22'
f['MetaData/Configuration/Antennas/ant6'].attrs['description'] = 'ant6, -30:43:17.3, 21:24:38.5, 1038.0, 12.0, -61.5945 -79.6989 0.701598, , 1.22'
f['MetaData/Configuration/Antennas/ant7'].attrs['description'] = 'ant7, -30:43:17.3, 21:24:38.5, 1038.0, 12.0, -87.9881 75.7543 0.138305, , 1.22'

f.close()

print "Updated antenna positions..."
{'fraction_non_alphanumeric': 0.2008575197889182, 'fraction_numerical': 0.21009234828496043, 'mean_word_length': 4.339788732394366, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7122410', 'n_tokens_mistral': 1627, 'n_tokens_neox': 1276, 'n_words': 262}