Skip to content

Commit

Permalink
Add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremykubica committed Jan 11, 2024
1 parent 357e5a8 commit 177459f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_sigma_g_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ def test_sigma_g_negative_clipping(self):
for i in range(num_points):
self.assertEqual(i in result, i > 2 and i != 5 and i != 14)

def test_sigma_g_all_negative_clipping(self):
num_points = 10
lh = np.array([(-100.0 + i * 0.2) for i in range(num_points)])
params = SigmaGClipping(clip_negative=True)
result = params.compute_clipped_sigma_g(lh)
self.assertEqual(len(result), 0)

def test_apply_clipped_sigma_g(self):
"""Confirm the clipped sigmaG filter works when used in the bulk filter mode."""
num_times = 20
Expand Down

0 comments on commit 177459f

Please sign in to comment.