Comments (7)
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.
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.
Thanks, I can reproduce the crash!
from pyfda.
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.
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.
Thanks for reporting, probably you're right and the bug is in the same region of code. I'll take a look!
from pyfda.
Fixed in latest, please test! Version 0.8.3 will be released today or tomorrow.
from pyfda.
Related Issues (20)
- exporting filter coefficients as numpy/zipped numpy fails silently HOT 2
- unexpected crash in input_coeffs.py HOT 6
- Crash when trying to open inset plot in H(f) HOT 2
- `bak`, `docs`, and `recipe` directories included in PyPI packages
- Save stimuli / responses from the y[n] tab in HDL formats
- fixpoint coefficients crash pyfda HOT 3
- Saving and loading (fixpoint) filters HOT 2
- Save/Load Table to/from file HOT 1
- Running flatpak fails with "No module named 'pyparsing' " HOT 1
- Single-sided spectra of complex-valued signals are not scaled correctly (y[n] tab) HOT 1
- Unhandeled IndexError HOT 1
- App crashes - Unhandeled Exception HOT 1
- Allow longer impulse / transient response timescales HOT 4
- add "filter" type delay for debugging and demonstrating effects of phase / delay
- ufunc 'logical_or' did not contain a loop with signature matching types (None, <class 'numpy.dtypes.StrDType'>) -> None HOT 1
- `get_cmap` not Available in matplotlib.cm
- Create basic test cases for PyQT widgets
- Generate Verilog / VHDL code for fixpoint filters using jinja templates
- Create widget for muliplierless filter
- pyfdax won't start with numpy 2.0 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyfda.