Skip to content

Commit

Permalink
tests for specifying no fluoro_indices in comp functions
Browse files Browse the repository at this point in the history
  • Loading branch information
whitews committed Apr 25, 2022
1 parent 4ff6371 commit 8200124
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions flowutils/tests/compensation_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,17 @@ def test_inverse_compensate():
)

np.testing.assert_almost_equal(inv_comp_data, npy_data, 10)

@staticmethod
def test_compensate_no_indices():
# test for compensate & inverse compensate
npy_data = np.load(test_data_npy_path)
spill = np.genfromtxt(test_comp_csv_path, delimiter=',', skip_header=True)

all_fluoro_data = npy_data[:, test_data_fluoro_indices]

# call both without fluoro_indices kwarg (defaults to None)
comp_data = compensate.compensate(all_fluoro_data, spill)
inv_comp_data = compensate.inverse_compensate(comp_data, spill)

np.testing.assert_almost_equal(inv_comp_data, all_fluoro_data, 10)

0 comments on commit 8200124

Please sign in to comment.