Skip to content

Commit

Permalink
Remove hard dependence on miriad format
Browse files Browse the repository at this point in the history
  • Loading branch information
philbull committed Mar 19, 2019
1 parent 0bee9d2 commit daf0b2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions hera_pspec/pspecdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -3043,7 +3043,7 @@ def raise_warning(warning, verbose=True):

def _load_dsets(fnames, bls=None, pols=None, logf=None, verbose=True):
"""
Helper function for loading Miriad datasets in pspec_run.
Helper function for loading UVData-compatible datasets in pspec_run.
"""
dsets = []
Ndsets = len(fnames)
Expand All @@ -3053,6 +3053,6 @@ def _load_dsets(fnames, bls=None, pols=None, logf=None, verbose=True):

# read data
uvd = UVData()
uvd.read_miriad(glob.glob(dset), bls=bls, polarizations=pols)
uvd.read(glob.glob(dset), bls=bls, polarizations=pols)
dsets.append(uvd)
return dsets
4 changes: 2 additions & 2 deletions hera_pspec/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ def config_pspec_blpairs(uv_templates, pol_pairs, group_pairs, exclude_auto_bls=
# use a single file from unique_files and a single pol-group combination to get antenna positions
_file = unique_files[0].format(pol=pol_grps[0][0], group=pol_grps[0][1])
uvd = UVData()
uvd.read_miriad(_file, read_data=False)
uvd.read(_file, read_data=False)

# get baseline pairs
(_bls1, _bls2, _, _,
Expand Down Expand Up @@ -951,7 +951,7 @@ def get_reds(uvd, bl_error_tol=1.0, pick_data_ants=False, bl_len_range=(0, 1e4),
# load filepath
if isinstance(uvd, (str, np.str)):
_uvd = UVData()
_uvd.read_miriad(uvd, read_data=False)
_uvd.read(uvd, read_data=False)
uvd = _uvd
# get antenna position dictionary
antpos, ants = uvd.get_ENU_antpos(pick_data_ants=pick_data_ants)
Expand Down

0 comments on commit daf0b2c

Please sign in to comment.