https://github.com/RadioAstronomySoftwareGroup/pyuvdata
Raw File
Tip revision: 9e003eedd5f69c466b0634d99dc952c1781ad2b7 authored by Adam Beardsley on 15 May 2017, 21:54 UTC
write uvfits group data as 64bit
Tip revision: 9e003ee
test_uvfits_equal.py
#! /usr/bin/env python

import argparse
import os.path as op
from pyuvdata import UVData

parser = argparse.ArgumentParser()
parser.add_argument('uvfits1',
                    help='name of first uvfits file.')
parser.add_argument('uvfits2',
                    help='name of second uvfits file to compare to first.')

args = parser.parse_args()

uvfits_file1 = args.uvfits1
if not op.isfile(uvfits_file1):
    raise IOError('There is no file named {}'.format(args.uvfits_file1))

uvfits_file2 = args.uvfits2
if not op.isfile(uvfits_file2):
    raise IOError('There is no file named {}'.format(args.uvfits_file2))

uv1 = UVData()
uv1.read_uvfits(uvfits_file1)

uv2 = UVData()
uv2.read_uvfits(uvfits_file2)

if uv1 == uv2:
    print('UVData objects from files are equal')
else:
    print('UVData objects from files are not equal')

del(uv1)
del(uv2)
back to top