As it stands now, the parameter management for the oscillators is very primitive. This means that a lot of code is repeated within and across all the oscillators. It works, but a better solution should be found.
One option is to do some abstraction and promote it to a parameter class (the package lmfit implements something like that I believe). This might seem like complicating things, but would reduce errors, make things clearer and follow the DRY principle. Or maybe some metaprogramming with exra decorators.
As it stands now, the parameter management for the oscillators is very primitive. This means that a lot of code is repeated within and across all the oscillators. It works, but a better solution should be found.
One option is to do some abstraction and promote it to a parameter class (the package lmfit implements something like that I believe). This might seem like complicating things, but would reduce errors, make things clearer and follow the DRY principle. Or maybe some metaprogramming with exra decorators.
An interesting view http://kitchingroup.cheme.cmu.edu/blog/2016/04/30/Another-approach-to-docstrings-and-validation-of-args-and-kwargs-in-Python/