Giter Club home page Giter Club logo

Comments (7)

chipmuenk avatar chipmuenk commented on July 24, 2024

Thanks for the warm words! If the software crashes, there is obviously something wrong with the software itself :-)

I have two ideas about the cause of the crash (although I cannot reproduce it):

  • Are you using v0.7.0? There was a related bug that I fixed in 0.7.1
  • Something seems to be wrong with your filter file - with a sampling frequency of 1 Hz it shouldn't be possible to use a frequency of e.g. f_c = 500 Hz. I agree that the filter import routine is buggy (I'm afraid of touching the related part of the code, it is a big dark mess) and this might also cause the mismatch of sampling and corner frequency.

Could you please check your pyfda version, attach your filter file (also for debugging the filter import routines) and retry designing your filter with integer coefficients without importing a filter file? Thanks a lot for your help!

from pyfda.

Tarik-T avatar Tarik-T commented on July 24, 2024

I'm sorry - version is 0.7.1
Remaining version information (just to be on the safe side), below.
I agree that a sampling frequency of 1 Hz and a filter frequency of 300 doesn't match very well.
I think I forgot to update sample freq (It is 19200) after importing the filter design file:
Butter375.npz.zip
(Suffix is seems to be zip, but remove that. It is npz).

I believe there is a special function hidden on the "b,a" tab that is randomly (I have not found the trigger yet, but keep trying :-) .) activated when someone wants integer coefficients.
I have another one at that stage. I hope it makes it easier for you in figuring out the issue.

Traceback (most recent call last):
File "C:\Python310\lib\site-packages\pyfda\input_widgets\input_coeffs.py", line 325, in process_sig_rx
self.load_dict()
File "C:\Python310\lib\site-packages\pyfda\input_widgets\input_coeffs.py", line 661, in load_dict
self.qdict2ui() # set quantization UI from dictionary
File "C:\Python310\lib\site-packages\pyfda\input_widgets\input_coeffs.py", line 795, in qdict2ui
self.refresh_table()
File "C:\Python310\lib\site-packages\pyfda\input_widgets\input_coeffs.py", line 630, in refresh_table
self._refresh_table_item(row, col)
File "C:\Python310\lib\site-packages\pyfda\input_widgets\input_coeffs.py", line 552, in _refresh_table_item
if self.ba_q[col + 2][row] > 0:
TypeError: 'int' object is not subscriptable

Nevertheless, thanks to this nice tool, I am making progress in understanding and developing and digital filters.

Thanks!
Tarik


C:\Python310\lib\site-packages\pyfda

User Module Dir None
Home Dir C:\Users\Tarik
Temp Dir C:\Users\Tarik\AppData\Local\Temp
Config Dir C:\Users\Tarik.pyfda


pyFDA Config C:\Users\Tarik.pyfda\pyfda.conf
Log. Config C:\Users\Tarik.pyfda\pyfda_log.conf
Logfile C:\Users\Tarik\AppData\Local\Temp.pyfda\pyfda.log

External modules and libraries
Module Version Licence Purpose
Python 3.10.2 (64 Bit) PSF
numpy 1.23.3 BSD Fast array numerics
scipy 1.9.3 (no mkl) BSD Library for scientific computing
numexpr 2.8.3 MIT Fast numerical array expression
matplotlib 3.6.1 PSF-based Plotting library
Qt5 5.15.2 LPGLv3 Widget library (UI etc.)
PyQt 5.15.7 GPLv3 Python bindings for Qt5
Markdown 3.4.1 BSD Markdown implementation
docutils 0.19 GPLv3 a.o. Plain text -> markup formats
mplcursors 0.5.2 MIT Interactive cursors (needs Matplotlib >= 3.1)
YOSYS not found ISC Framework for Verilog RTL synthesis

from pyfda.

chipmuenk avatar chipmuenk commented on July 24, 2024

Thanks, I can reproduce the crash!

from pyfda.

chipmuenk avatar chipmuenk commented on July 24, 2024

I had to rewrite the part for reading and writing filters as numpy arrays with irregular shapes ("ragged arrays") are discouraged / deprecated (https://numpy.org/devdocs/release/1.24.0-notes.html) and have become difficult to handle. Therefore, pyfda v0.8.0 no longer crashes but it also cannot read the old filter format anymore. Sorry aboout that!

from pyfda.

inxksp avatar inxksp commented on July 24, 2024

Good day! I have the same problem. Version: 0.8.2 (Windows). When I click on the save icon the program closes.
Terminal message: ValueError: "setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part."
If you save Float then there is no problem. The problem is only when saving Fixpoint.
hilbert_pyfdax.zip

from pyfda.

chipmuenk avatar chipmuenk commented on July 24, 2024

Thanks for reporting, probably you're right and the bug is in the same region of code. I'll take a look!

from pyfda.

chipmuenk avatar chipmuenk commented on July 24, 2024

Fixed in latest, please test! Version 0.8.3 will be released today or tomorrow.

from pyfda.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.