Skip to content

Commit

Permalink
Fixed small bugs in layered_medium.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mtcli committed Jan 13, 2016
1 parent 0ed0c39 commit d98eb01
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pysit/gallery/layered_medium.py
Expand Up @@ -10,7 +10,7 @@
import numpy as np
import scipy.signal as signal

#from pysit.util.image_processing import blur_image
from pysit.util.image_processing import blur_image
from pysit.gallery.gallery_base import GeneratedGalleryModel

from pysit import * #PML, Domain
Expand Down Expand Up @@ -199,7 +199,7 @@ def rebuild_models(self):
total_filled = 0
for L in self.layers[::-1]:
cutoff_depth = self.z_length - total_filled
vp[ZZ < cutoff_depth] = L.velocity
vp[ZZ <= cutoff_depth] = L.velocity

total_filled += L.thickness

Expand Down Expand Up @@ -239,7 +239,7 @@ def rebuild_models(self):


# Construct final padded velocity profiles
C = np.pad(vp, _pad_tuple, 'edge')#.reshape(self._mesh.shape())
C = np.pad(vp, _pad_tuple, 'edge').reshape(self._mesh.shape())
C0 = np.pad(vp0, _pad_tuple, 'edge').reshape(self._mesh.shape())
self._true_model = C
self._initial_model = C0
Expand Down Expand Up @@ -277,4 +277,4 @@ def layered_medium( layers=water_layered_rock, **kwargs):
# vis.plot(C, m)
# fig.add_subplot(2,1,2)
# vis.plot(C0, m)
# plt.show()
# plt.show()

0 comments on commit d98eb01

Please sign in to comment.