Skip to content

Commit

Permalink
reduce unfilter design test file size (#2543)
Browse files Browse the repository at this point in the history
* reduce unfilter design test file size

* reduce file size more

* change dtype

* increase unfilter_design test tol

---------

Co-authored-by: Mo Chen <mochen@Mos-MacBook-Pro.local>
  • Loading branch information
mochen4 and Mo Chen authored Jun 8, 2023
1 parent e4504ed commit 955dcaa
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Binary file modified python/tests/data/mpa_unfilter_design.npy
Binary file not shown.
Binary file modified python/tests/data/mpa_unfilter_design_target.npy
Binary file not shown.
4 changes: 2 additions & 2 deletions python/tests/test_adjoint_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -1162,12 +1162,12 @@ def test_unfilter_design(self):
target = np.load(os.path.join(data_dir, "mpa_unfilter_design_target.npy"))

def processing(x):
filtered_field = mpa.conic_filter(x, 0.1, 1.995, 1.995, 200)
filtered_field = mpa.conic_filter(x, 0.1, 0.3, 0.5, 200)
projected_field = mpa.tanh_projection(filtered_field, 8, 0.5)
return projected_field.flatten()

reverse_x = mpa.unfilter_design(target, processing)
tol = 1e-8
tol = 1e-6
self.assertClose(expected, reverse_x, epsilon=tol)
print(f"PASSED: unfilter_design={reverse_x}, expeced_design={expected}")

Expand Down

0 comments on commit 955dcaa

Please sign in to comment.