https://github.com/RadioAstronomySoftwareGroup/pyuvdata
Revision a24b7b24cc94c180b736b768a71e5b12b6a95f1a authored by Bryna Hazelton on 22 May 2019, 23:42:31 UTC, committed by Bryna Hazelton on 23 May 2019, 18:17:56 UTC
1 parent 624ad62
Tip revision: a24b7b24cc94c180b736b768a71e5b12b6a95f1a authored by Bryna Hazelton on 22 May 2019, 23:42:31 UTC
docstrings fixes in aipy_extracts and get_fhd_history
docstrings fixes in aipy_extracts and get_fhd_history
Tip revision: a24b7b2
test_uvfits_equal.py
#! /usr/bin/env python
# -*- mode: python; coding: utf-8 -*
# Copyright (c) 2018 Radio Astronomy Software Group
# Licensed under the 2-clause BSD License
from __future__ import absolute_import, division, print_function
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)
Computing file changes ...