Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Commit

Permalink
Fixed nan in validation test
Browse files Browse the repository at this point in the history
  • Loading branch information
hover2pi committed Oct 20, 2020
1 parent 0a31782 commit 7218e1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_awesim.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def test_extract_order1_ideal(self):
order1_flux = order1_counts[n] / self.tso256.order1_response / (self.tso256.frame_time * (n + 1))

# Mean residual (away from edges)
mean_residual = np.mean(((order1_flux.value - input_spec) / input_spec)[20:-20])
mean_residual = np.nanmean(((order1_flux.value - input_spec) / input_spec)[20:-20])

# Check that the mean residual is less than 0.01
self.assertTrue(mean_residual < 0.01)
Expand Down Expand Up @@ -121,7 +121,7 @@ def test_extract_order2_ideal(self):
order2_flux = order2_counts[n] / self.tso256.order2_response / (self.tso256.frame_time * (n + 1))

# Mean residual (away from edges)
mean_residual = np.mean(((order2_flux.value - input_spec) / input_spec)[20:-20])
mean_residual = np.nanmean(((order2_flux.value - input_spec) / input_spec)[20:-20])

# Check that the mean residual is less than 0.01
self.assertTrue(mean_residual < 0.01)
Expand Down

0 comments on commit 7218e1a

Please sign in to comment.