Specify RNG seed to enable replication
On annoyance with the current code is that the generated results vary each run.
This can be resolved by specifying the random number seed was specified each time random values are generated, allowing the user to verify that the output properly matches the figures provided in the text.
Yeah I realized that after I had exported all the pics unfortunately, so if I added the seed I would have had to redo them anyway =P
I'll leave this issue open, one day I'll convert those pngs to svg and can add the seed what i do that
I would recommend adopting Jupyter notebooks plus nbconvert so that you can embed the code and graphics directly in the document.
This would also allow you to detect typos and other issues.
I use jupyter notebooks for other situations but it didn't feel right here because the code I'm presenting within the textbook is a small subset of the code that produces the figures in the textbook, and in some cases the figures were edited in inkscape or made into an animation with gimp. The textbook's goal is to teach signal processing and SDR concepts first and foremost so I want to keep the Python code short and sweet, which means plenty of the code used to create nicer figures is left out of the body of the textbook (although pretty much all of it can be found in the figure-generating-scripts directory). But you're right, it would definitely catch typos and make the code quicker for readers to use. The RDS chapter is probably the one chapter where it is so code oriented that it would make sense, but it's an outlier, although I may try your idea there just for the fun of it. But really I don't want pysdr to take on the format you usually see with textbooks that make heavy use of jupyter notebooks. On a similar note, when I started writing pysdr I specifically avoided the format https://greenteapress.com/wp/think-dsp/ used where they created their own little python library for DSP, I wanted to show people that they can use python and numpy as-is to do DSP, not just give them a library to do DSP, I think it's silly for a textbook to do that because you end up just using the textbook's convenience functions and adding an unnecessary layer onto the code.
Thinking about this more, pretty much all the code in figure-generating-scripts should probably be jupyter notebooks instead... But not actually presented in the textbook itself. Maybe the few lines that are presented in the text can be highlighted somehow or decorated, not sure.
Definitely interested in yours or anyone elses opinion on all this