Skip to content

Commit

Permalink
fixed tests for uvpspec
Browse files Browse the repository at this point in the history
  • Loading branch information
nkern committed Apr 26, 2018
1 parent 7f185f7 commit 4090d67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hera_pspec/tests/test_uvpspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def test_convert_deltasq(self):
k_perp, k_para = uvp.get_kvecs(0, little_h=True)
k_mag = np.sqrt(k_perp[:, None, None]**2 + k_para[None, :, None]**2)
nt.assert_true(np.isclose(uvp.data_array[0][0,:,0], (self.uvp.data_array[0]*k_mag**3/(2*np.pi**2))[0,:,0]).all())
nt.assert_equal(uvp.units, 'unknown h^3 k^3 / (2pi^2)')
nt.assert_equal(uvp.norm_units, 'k^3 / (2pi^2)')

def test_blpair_conversions(self):
# test blpair -> antnums
Expand Down Expand Up @@ -318,7 +318,7 @@ def test_compute_scalar(self):
uvp = copy.deepcopy(self.uvp)
# test basic execution
s = uvp.compute_scalar(0, 'xx', num_steps=1000, noise_scalar=False)
nt.assert_almost_equal(s/258034762.16569147, 1.0, places=5)
nt.assert_almost_equal(s/552908638.8711592, 1.0, places=5)
# test execptions
del uvp.OmegaP
nt.assert_raises(AssertionError, uvp.compute_scalar, 0, -5)
Expand Down

0 comments on commit 4090d67

Please sign in to comment.