Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with Sound.spectrogram with low, high #7

Open
thesamovar opened this issue May 3, 2019 · 0 comments
Open

Bug with Sound.spectrogram with low, high #7

thesamovar opened this issue May 3, 2019 · 0 comments
Labels

Comments

@thesamovar
Copy link
Member

One of many units bugs.

sound = whitenoise(100*ms, samplerate=16*kHz)
sound.spectrum(low=1*kHz, high=8000*kHz)

/home/lw1115/anaconda3/envs/python3/lib/python3.4/site-packages/brian2hears/sounds.py in spectrum(self, low, high, log_power, display)
    555             if high is None:
    556                 high = np.amax(freqs)*Hz
--> 557             I = np.logical_and(low <= freqs, freqs <= high)
    558             I2 = np.where(I)[0]
    559             Z = pxx[I2]

DimensionMismatchError: Cannot perform comparison 1. kHz <= [0.000e+00 1.000e+01 ... 1.598e+04 1.599e+04], units do not match (units are hertz and 1).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant