Skip to content

Commit

Permalink
Improve uvpspec_utils test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
philbull committed Mar 5, 2019
1 parent 9d5bc3f commit e100f91
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions hera_pspec/tests/test_uvpspec_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,21 @@ def test_select_common():
nt.assert_raises(ValueError, uvputils.select_common, [uvp1, uvp7],
polpairs=True)

def test_get_blpairs_from_bls():
"""
Test conversion of
"""
# setup uvp
beamfile = os.path.join(DATA_PATH, 'HERA_NF_dipole_power.beamfits')
beam = pspecbeam.PSpecBeamUV(beamfile)
uvp, cosmo = testing.build_vanilla_uvpspec(beam=beam)

# Check that bls can be specified in several different ways
blps = uvputils._get_blpairs_from_bls(uvp, bls=101102)
blps = uvputils._get_blpairs_from_bls(uvp, bls=(101,102))
blps = uvputils._get_blpairs_from_bls(uvp, bls=[101102, 101103])


def test_polpair_int2tuple():
"""
Test conversion of polpair ints to tuples.
Expand Down

0 comments on commit e100f91

Please sign in to comment.