Skip to content

Commit

Permalink
Merge af9f615 into ecf8c35
Browse files Browse the repository at this point in the history
  • Loading branch information
OverLordGoldDragon committed Aug 22, 2021
2 parents ecf8c35 + af9f615 commit b9e2cb6
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -109,9 +109,9 @@ import matplotlib.pyplot as plt
from ssqueezepy import ssq_cwt, ssq_stft

def viz(x, Tx, Wx):
plt.imshow(np.abs(Wx), aspect='auto', cmap='jet')
plt.imshow(np.abs(Wx), aspect='auto', cmap='turbo')
plt.show()
plt.imshow(np.abs(Tx), aspect='auto', vmin=0, vmax=.2, cmap='jet')
plt.imshow(np.abs(Tx), aspect='auto', vmin=0, vmax=.2, cmap='turbo')
plt.show()

#%%# Define signal ####################################
Expand Down
2 changes: 1 addition & 1 deletion examples/extracting_ridges.py
Expand Up @@ -26,7 +26,7 @@ def viz(x, Tf, ridge_idxs, yticks=None, ssq=False, transform='cwt', show_x=True)
title = "abs({}{}) w/ ridge_idxs".format("SSQ_" if ssq else "",
transform.upper())

ikw = dict(abs=1, cmap='jet', yticks=yticks, title=title)
ikw = dict(abs=1, cmap='turbo', yticks=yticks, title=title)
pkw = dict(linestyle='--', color='k', xlabel="Time [samples]", ylabel=ylabel,
xlims=(0, Tf.shape[1]), ylims=(0, len(Tf)))

Expand Down
8 changes: 4 additions & 4 deletions ssqueezepy/_test_signals.py
Expand Up @@ -207,7 +207,7 @@ def _lchirp_fn(self, t, tmin, tmax, fmin, fmax, get_w=False):
w *= (2*pi)
return (phi, w) if get_w else phi

def echirp(self, N=None, fmin=.1, fmax=None, **tkw):
def echirp(self, N=None, fmin=1, fmax=None, **tkw):
"""
>>> f(t) = a*b^t
>>> phi(t) = (a/ln(b)) * (b^t - b^tmin)
Expand Down Expand Up @@ -511,7 +511,7 @@ def test_transforms(self, fn, signals='all', N=None):
`help(TestSignals.make_signals)`.
"""
data = self.make_signals(signals, N, get_params=True)
default_pkw = dict(abs=1, cmap='jet', show=1)
default_pkw = dict(abs=1, cmap='turbo', show=1)

for name, (x, t, (fparams, aparams)) in data.items():
out = fn(x, t, (name, fparams, aparams))
Expand Down Expand Up @@ -819,7 +819,7 @@ def _get_default_hspace():
name, fparams, aparams = params
title1, title2 = self._title_cwt(wavelet, name, x, fparams, aparams)

pkw = dict(abs=1, cmap='jet', ticks=0, fig=fig)
pkw = dict(abs=1, cmap='turbo', ticks=0, fig=fig)
imshow(Wx, **pkw, ax=axes[i, 0], show=0, title=title1)
imshow(Tx, **pkw, ax=axes[i, 1], show=0, title=title2)

Expand Down Expand Up @@ -870,7 +870,7 @@ def _get_default_hspace():

fig, axes = plt.subplots(2, 2, figsize=(w * 12, h * 12))

pkw = dict(abs=1, cmap='jet', ticks=0, fig=fig)
pkw = dict(abs=1, cmap='turbo', ticks=0, fig=fig)
imshow(Wx, **pkw, ax=axes[0, 0], show=0, title=ctitle1)
imshow(Twx, **pkw, ax=axes[0, 1], show=0, title=ctitle2)
imshow(Sx, **pkw, ax=axes[1, 0], show=0, title=stitle1)
Expand Down
4 changes: 2 additions & 2 deletions ssqueezepy/visuals.py
Expand Up @@ -324,7 +324,7 @@ def wavelet_heatmap(wavelet, scales='log', N=2048):
title=title0 + " | Time-domain; abs-val", **kw)

kw['xlabel'] = "radians"
imshow(Psih, abs=1, cmap='jet', yticks=scales,
imshow(Psih, abs=1, cmap='turbo', yticks=scales,
xticks=np.linspace(0, np.pi, N//2),
title=title0 + " | Freq-domain; abs-val", **kw)

Expand Down Expand Up @@ -651,7 +651,7 @@ def imshow(data, title=None, show=1, cmap=None, norm=None, complex=None, abs=0,
else:
vmin, vmax = norm
if cmap is None:
cmap = 'jet' if abs else 'bwr'
cmap = 'turbo' if abs else 'bwr'
_kw = dict(vmin=vmin, vmax=vmax, cmap=cmap, aspect=aspect, **kw)

if abs:
Expand Down
2 changes: 1 addition & 1 deletion tests/reconstruction_test.py
Expand Up @@ -246,7 +246,7 @@ def _maybe_viz(Wx, xo, xrec, title, err):
else:
mx = .9*mx

imshow(Wx, abs=1, norm=(0, mx), cmap='jet', show=1, title=title)
imshow(Wx, abs=1, norm=(0, mx), cmap='turbo', show=1, title=title)
plot(xo, title="Original vs reconstructed | MAD/RMS=%.4f" % err)
plot(xrec, show=1)

Expand Down
2 changes: 1 addition & 1 deletion tests/ridge_extraction_test.py
Expand Up @@ -57,7 +57,7 @@ def viz(x, Tf, ridge_idxs, yticks=None, ssq=False, transform='cwt', show_x=True)
title = "abs({}{}) w/ ridge_idxs".format("SSQ_" if ssq else "",
transform.upper())

ikw = dict(abs=1, cmap='jet', yticks=yticks, title=title)
ikw = dict(abs=1, cmap='turbo', yticks=yticks, title=title)
pkw = dict(linestyle='--', color='k', xlabel="Time [samples]", ylabel=ylabel,
xlims=(0, Tf.shape[1]), ylims=(0, len(Tf)))

Expand Down

0 comments on commit b9e2cb6

Please sign in to comment.