Skip to content

Commit

Permalink
cleanup preset
Browse files Browse the repository at this point in the history
  • Loading branch information
mloubout committed Nov 27, 2019
1 parent 3fa8362 commit 5101980
Show file tree
Hide file tree
Showing 4 changed files with 312 additions and 429 deletions.
1 change: 1 addition & 0 deletions examples/seismic/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from .model import * # noqa
from .source import * # noqa
from .plotting import * # noqa
from .preset_models import * # noqa
from .utils import * # noqa
4 changes: 2 additions & 2 deletions examples/seismic/elastic/elastic_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ def run(shape=(50, 50), spacing=(20.0, 20.0), tn=1000.0,
def test_elastic():
_, _, _, [rec1, rec2, v, tau] = run()
norm = lambda x: np.linalg.norm(x.data.reshape(-1))
assert np.isclose(norm(rec1), 29.8925, atol=1e-3, rtol=0)
assert np.isclose(norm(rec2), 1.20394, atol=1e-3, rtol=0)
assert np.isclose(norm(rec1), 29.6567, atol=1e-3, rtol=0)
assert np.isclose(norm(rec2), 1.19761, atol=1e-3, rtol=0)


if __name__ == "__main__":
Expand Down
Loading

0 comments on commit 5101980

Please sign in to comment.