Raw File
Tip revision: fcb088f301773373c4315da0647343e422f5e97a authored by Paul La Plante on 04 February 2021, 18:35 UTC
Update changelog for new release
Tip revision: fcb088f
#! /usr/bin/env python
# -*- mode: python; coding: utf-8 -*-
# Copyright (c) 2018 Radio Astronomy Software Group
# Licensed under the 2-clause BSD License
"""Test if two UVData compatible files are equal."""

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()

uv2 = UVData()

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

del uv1
del uv2
back to top