-
Notifications
You must be signed in to change notification settings - Fork 12
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
RuntimeWarning & ValueError when using endaq.plot.octave_spectrogram() #189
Comments
Hey @MarcelEckh, first off thank you for officially being the first non-enDAQ person to post an issue here! It's a first but not a last and although I don't want to diminish the frustration you are undoubtedly feeling, I'm excited that this is the beginning of accelerated adoption of our library! Sorry it has taken us so long to see this, I'll change my settings in GitHub to get notified every time an issue is posted! I'm also going to at my fellow contributors: @StokesMIDE @CFlaniganMide @pscheidler I'm not a big fan of the implementation of this function, I had posted a related issue actually: #35. More on that next after I help fix the immediate issue. The runtime errors are more messages than errors to let you know that the PSD is too coarse for the given time range. They are admittedly annoying but they can be ignored as they are "just" warnings. The software team won't like this too much but you can explicitly turn them off via (found on stackoverflow):
The actual error you have is that the function was updated to only return two parameters not 4 so you need to change the line: I showed an example of it running correctly in this colab (here's the link). Now to how we can improve this function! I had a few issues with the current implementation:
I really don't like that this function does a lot of calculations in the plotting module, I'd rather have |
@MarcelEckh I wanted to give you an update that I'm getting somewhere with some new functions but won't finish tonight, here's the work in progress if you want to check it out! What I have left to do is:
|
Hi @shanlyMIDE, I feel honored by your reply and it's absolutely great to get such good help so quickly! Thank you very much for that! Regarding your proposals: I really like them and I'd especially appreciate having the returned data in actual units. |
Alright it's been submitted! We'll let you know when we have something fully merged into development, but you can download and test this specific branch |
Awesome! I look forward to it. |
closing this now because it is in development! #191 Here is the specific major function (that links to a lot of the other new ones): https://docs.endaq.com/en/development/endaq/plot.html#endaq.plot.spectrum_over_time You can download this branch via:
|
The Webinar I'm referring to: link
I can't attach the Jupyter Lab script nor the csv file, however the csv file is available here
I'm using a Jupyter Lab script with Python 3.9.11 (installed with asdf)
I measured vibration and I now want to analyze the data using the endaq python library. Unfortunately, I can't use the endaq.plot.octave_spectrogram() method. When I realized that (until now) only this method is not working I downloaded the file from the introduction Webinar for the library and copied the code as well. Even then, with the exact same code and data I get these Errors. I tried other methods which are mentioned previously in the Webinar and they work fine. Below is a minimum working example with the mentioned csv file and the
endaq.plot.plots.rolling_min_max_envelope()
method. I also addedendaq.plot.octave_spectrogram()
which is not working for me.I also tested this on my private Windows PC with the same Python Version which was not installed with asdf. Same result. Every mehtod I tested works except
endaq.plot.octave_spectrogram()
.Yes, the csv file is in the same folder, I also tested it with only using the link like in the Webinar... no difference.
Minimum example:
Error Message:
`/home/marcel/.asdf/installs/python/3.9.11/lib/python3.9/site-packages/endaq/calc/psd.py:169: RuntimeWarning:
empty frequency bins in re-binned PSD; original PSD's frequency spacing is too coarse
ValueError Traceback (most recent call last)
Input In [7], in <cell line: 1>()
----> 1 freqs, bins, Pxx, fig = endaq.plot.octave_spectrogram(df_vibe[['Z (40g)']],
2 window=0.5,
3 bins_per_octave=12,
4 max_freq=1000,
5 freq_start=40)
6 fig.show()
ValueError: not enough values to unpack (expected 4, got 2)`
The text was updated successfully, but these errors were encountered: