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
Fix frequency argument in sine and multi_sine #135
Comments
I find your suggestions great . That's something we hadn't noticed yet! But this is again a breaking change, because the original calculations have to be changed, right? Should we add this to the "major release 2.0" milestone? By the way: shouldn't we rather call the |
Yes, the original calculations have to be changed. But I am still not fully convinced, if this is a breaking change or a necessary fix (because we adjust the behaviour to what the docstring is already saying). Yes, we should call sine from multisine. |
mhm 🤨 you are right, still this changes the behaviour of previously written code. I can see how this reflects the expected behaviour though, following your linked articels. So you suggest introducing the changes and releasing this as a |
Alright, I changed my mind. Let's consider this a breaking change and fix it with the 2.0.0 release. |
Harmonize sine signal generators
I just worked with the sine and multi_sine methods and the
freq
-argument gets used in different ways, than I would expect it:In
misc.testsignals.sine
line 185 should be replaced byx = amp * np.sin(2 * np.pi * freq * time)
(all multiplication). Alternativly, thefreq
parameter could be renamed toperiod
.In
misc.testsignals.multi_sine
line 213 should be replaced byx += amp * np.sin(2 * np.pi * freq * time)
(scale sine by 2pi). Alternativly, thefreq
parameter could be renamed toangular_frequency
.To have a matching signature of both
sine
andmulti_sine
, I suggest to keep using thefreq
-argument, but adjust their use in the code as proposed.Some references for the suggested changes can be found here:
https://de.wikipedia.org/wiki/Sinuston
https://en.wikipedia.org/wiki/Angular_frequency
The text was updated successfully, but these errors were encountered: