You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the default frequency scale inside the parameter structure is not necessarily the same as frequency_scale(model).
I think this is super dangerous and had a hard time debugging my secular code response because of it.
Typically broken when frequency_scale(model) is not 1.0 and the user don't manually fill in the parameters when creating the structure.
This is a great point. Only affects v0.11.0 and up, for now. The main issue is that the model is not exposed to the parameter structure, so this isn't a trivial fix.
I've checked in a draft change with d70b7a9. This has some good properties, and some bad, primarily arising from how we allow the user to input Ω₀. I propose that we now check the provided frequency scale against the model frequency, and override to the model scale. This is kind of convoluted, since we could just set Ω₀ ourselves in this case (and maybe the user really does have some reason they want a different frequency scale, for some dynamic range tests?). Unfortunately, this would require setting the parameter structure LinearParameters as mutable, which might result in a performance hit. It didn't cost anything in the standard test package, but that may not be conclusive. On the other hand, if we don't make LinearParameters mutable, the check will now just crash the program if the input Ω₀ and the model Ω₀ don't match (which we could then throw a verbose error explaining how to fix).
Another option would be to make Ω₀ a required argument to LinearParameters; for example, in the test code, I call LinearParameters as
Currently the default frequency scale inside the parameter structure is not necessarily the same as
frequency_scale(model)
.I think this is super dangerous and had a hard time debugging my secular code response because of it.
Typically broken when
frequency_scale(model)
is not 1.0 and the user don't manually fill in the parameters when creating the structure.LinearResponse.jl/src/Utils/ParameterStructure.jl
Lines 56 to 57 in bcd4b9a
The text was updated successfully, but these errors were encountered: