Skip to content

Commit

Permalink
Merge pull request #1 from mattcalef/feat/faster-tests
Browse files Browse the repository at this point in the history
Smaller faster tests
  • Loading branch information
piyushrpt authored Apr 25, 2024
2 parents bd36ac8 + 4dc5da4 commit 466e444
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions test/mcf/test_ortools_mcf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def wrap(x):

def gen_data_real():
"""Generate a sparse 2D dataset"""
npoints = 4000
npoints = 1000

# Coordinates of points.
points = np.random.randn(2 * npoints).reshape((npoints, 2))
Expand Down Expand Up @@ -89,7 +89,7 @@ def test_snaphu_data():
"""Borrow this unit test data from snaphu."""

# Simulate interferogram containing a diagonal phase ramp with multiple fringes.
y, x = np.ogrid[-3:3:512j, -3:3:512j]
y, x = np.ogrid[-3:3:256j, -3:3:256j]
phase = np.pi * (x + y)

igram = np.exp(1j * phase)
Expand All @@ -112,7 +112,7 @@ def test_snaphu_sparse():
"""Borrow this unit test data from snaphu."""

# Simulate interferogram containing a diagonal phase ramp with multiple fringes.
y, x = np.ogrid[-3:3:512j, -3:3:512j]
y, x = np.ogrid[-3:3:256j, -3:3:256j]
phase = np.pi * (x + y)

igram = np.exp(1j * phase)
Expand Down
4 changes: 2 additions & 2 deletions test/workflows/test_emcf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def gen_data_real():
"""Generate a regular 3D dataset"""

n_collects = 20
y, x = np.ogrid[-3:3:64j, -3:3:64j]
y, x = np.ogrid[-3:3:32j, -3:3:32j]

vel = -np.pi * np.exp(-(x**2 + y**2) / 5) / 12
vel -= vel.max()
Expand All @@ -22,7 +22,7 @@ def gen_data_snaphu():
Derived from snaphu unit test."""

n_collects = 10
y, x = np.ogrid[-3:3:64j, -3:3:64j]
y, x = np.ogrid[-3:3:32j, -3:3:32j]

vel = np.pi * (x + y) / 12
times = np.arange(n_collects) * 12
Expand Down

0 comments on commit 466e444

Please sign in to comment.