Skip to content

Commit

Permalink
use multi-frame data set for flyback test
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Ercius ncem-gauss jupyter committed Sep 16, 2024
1 parent d9e53ad commit 4931a60
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/test_sparse_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,11 +710,15 @@ def compare_with_sparse(full, sparse):
assert np.array_equal(m_array[[False, True], 0][0], position_one)


def test_keep_flyback(electron_data_small):
flyback = SparseArray.from_hdf5(electron_data_small, keep_flyback=True)
assert flyback.scan_shape[1] == 50
no_flyback = SparseArray.from_hdf5(electron_data_small, keep_flyback=False)
assert no_flyback.scan_shape[1] == 49
def test_keep_flyback(cropped_multi_frames_v3):
# Test keeping the flyback
flyback = SparseArray.from_hdf5(cropped_multi_frames_v3, keep_flyback=True)
assert flyback.scan_shape[1] == 20
assert flyback.num_frames_per_scan = 2
# Test removing the flyback
no_flyback = SparseArray.from_hdf5(cropped_multi_frames_v3, keep_flyback=False)
assert no_flyback.scan_shape[1] == 19
assert flyback.num_frames_per_scan = 2

# Test binning until this number
TEST_BINNING_UNTIL = 33
Expand Down

0 comments on commit 4931a60

Please sign in to comment.