Skip to content

Commit 68d0995

Browse files
committed
Missing tests for coverage
1 parent 0e689b9 commit 68d0995

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

hera_pspec/tests/test_pspecbeam.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import pyuvdata as uv
55
from .. import pspecbeam, conversions
66
from hera_pspec.data import DATA_PATH
7+
from pyuvdata import UVBeam
78

89

910
class Test_DataSet(unittest.TestCase):
@@ -25,7 +26,9 @@ def test_UVbeam(self):
2526
# Precomputed results in the following tests were done "by hand" using
2627
# iPython notebook "Scalar_dev2.ipynb" in tests directory
2728
pstokes_beamfile = os.path.join(DATA_PATH, "HERA_NF_pstokes_power.beamfits")
28-
beam = pspecbeam.PSpecBeamUV(pstokes_beamfile)
29+
uvb = UVBeam()
30+
uvb.read_beamfits(pstokes_beamfile, use_future_array_shapes=True)
31+
beam = pspecbeam.PSpecBeamUV(uvb)
2932
Om_p = beam.power_beam_int()
3033
Om_pp = beam.power_beam_sq_int()
3134
lower_freq = 120.*10**6

hera_pspec/tests/test_testing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,15 @@ def test_sky_noise_jy_autos():
130130

131131

132132
def test_sky_noise_sim():
133-
uvd = UVData()
134133
uvfile = os.path.join(DATA_PATH, "zen.even.xx.LST.1.28828.uvOCRSA")
134+
uvd = UVData()
135135
uvd.read_miriad(uvfile, use_future_array_shapes=True)
136136
beam = os.path.join(DATA_PATH, "HERA_NF_dipole_power.beamfits")
137137
beam_ps = os.path.join(DATA_PATH, "HERA_NF_pstokes_power.beamfits")
138138

139139
# basic test
140140
np.random.seed(0)
141-
sim = testing.sky_noise_sim(uvd, beam, cov_amp=1000, cov_length_scale=10, constant_in_time=True,
141+
sim = testing.sky_noise_sim(uvfile, beam, cov_amp=1000, cov_length_scale=10, constant_in_time=True,
142142
divide_by_nsamp=False)
143143
# assert something was inserted
144144
for bl in sim.get_antpairpols():

0 commit comments

Comments
 (0)