Skip to content

Commit b77837c

Browse files
authored
Merge pull request #91 from simpeg/feat/stream_threshold
Feat/stream threshold
2 parents 655d6cd + 3c30633 commit b77837c

File tree

5 files changed

+17
-9
lines changed

5 files changed

+17
-9
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[bumpversion]
2-
current_version = 0.1.17
2+
current_version = 0.1.18
33
files = setup.py discretize/__init__.py docs/conf.py
44

discretize/View.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ def plotSlice(
194194
pcolorOpts=None,
195195
streamOpts=None,
196196
gridOpts=None,
197-
range_x=None, range_y=None
197+
range_x=None, range_y=None,
198+
stream_threshold=None
198199
):
199200

200201
"""
@@ -228,7 +229,14 @@ def plotSlice(
228229
fig, axs = plt.subplots(1, len(vType))
229230
out = []
230231
for vTypeI, ax in zip(vType, axs):
231-
out += [self.plotSlice(v, vType=vTypeI, normal=normal, ind=ind, grid=grid, view=view, ax=ax, clim=clim, showIt=False, pcolorOpts=pcolorOpts, streamOpts=streamOpts, gridOpts=gridOpts)]
232+
out += [
233+
self.plotSlice(
234+
v, vType=vTypeI, normal=normal, ind=ind, grid=grid,
235+
view=view, ax=ax, clim=clim, showIt=False,
236+
pcolorOpts=pcolorOpts, streamOpts=streamOpts,
237+
gridOpts=gridOpts, stream_threshold=stream_threshold
238+
)
239+
]
232240
return out
233241
viewOpts = ['real', 'imag', 'abs', 'vec']
234242
normalOpts = ['X', 'Y', 'Z']
@@ -307,7 +315,7 @@ def doSlice(v):
307315
grid=grid, view=view,
308316
ax=ax, clim=clim, showIt=showIt,
309317
pcolorOpts=pcolorOpts, streamOpts=streamOpts,
310-
gridOpts=gridOpts
318+
gridOpts=gridOpts, stream_threshold=stream_threshold
311319
)
312320

313321
ax.set_xlabel('y' if normal == 'X' else 'x')
@@ -431,7 +439,7 @@ def _plotImage2D(
431439
V = Vi
432440

433441
if stream_threshold is not None:
434-
mask_me = np.sqrt(U**2 + V**2) <= stream_threshold
442+
mask_me = np.sqrt(Ui**2 + Vi**2) <= stream_threshold
435443
Ui = np.ma.masked_where(mask_me, Ui)
436444
Vi = np.ma.masked_where(mask_me, Vi)
437445

discretize/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"""
1919
)
2020

21-
__version__ = '0.1.17'
21+
__version__ = '0.1.18'
2222
__author__ = 'SimPEG Team'
2323
__license__ = 'MIT'
2424
__copyright__ = '2013 - 2017, SimPEG Developers, http://simpeg.xyz'

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@
6060
# built documents.
6161
#
6262
# The short X.Y version.
63-
version = '0.1.17'
63+
version = '0.1.18'
6464
# The full version, including alpha/beta/rc tags.
65-
release = '0.1.17'
65+
release = '0.1.18'
6666

6767
# The language for content autogenerated by Sphinx. Refer to documentation
6868
# for a list of supported languages.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def configuration(parent_package='', top_path=None):
5656

5757
setup(
5858
name="discretize",
59-
version="0.1.17",
59+
version="0.1.18",
6060
install_requires=[
6161
'numpy>=1.7',
6262
'scipy>=0.13',

0 commit comments

Comments
 (0)