Skip to content

Commit

Permalink
Merge e5bea9b into 143170d
Browse files Browse the repository at this point in the history
  • Loading branch information
jaidevd committed Jul 27, 2017
2 parents 143170d + e5bea9b commit 26d5d3b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tftb/processing/cohen.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ def plot(self, kind='cmap', threshold=0.05, sqmod=False, **kwargs):
kwargs['levels'] = levels
if sqmod:
self.tfr = np.abs(self.tfr) ** 2
else:
self.tfr = np.abs(self.tfr)
_threshold = np.amax(self.tfr) * threshold
self.tfr[self.tfr <= _threshold] = 0.0
super(WignerVilleDistribution, self).plot(kind=kind, threshold=threshold,
Expand Down Expand Up @@ -211,10 +213,8 @@ def run(self):
return np.real(self.tfr), self.ts, self.freqs

def plot(self, **kwargs):
if kwargs.get("kind", "") == "cmap":
import warnings
warnings.warn("cmap is not supported for PseudoWignerVille distributions.")
kwargs['kind'] = "contour"
if "kind" not in kwargs:
kwargs['kind'] = "contour"
super(PseudoWignerVilleDistribution, self).plot(**kwargs)


Expand Down

0 comments on commit 26d5d3b

Please sign in to comment.