-
Notifications
You must be signed in to change notification settings - Fork 79
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
Support for Unitful.jl
's units?
#250
Comments
My understanding is that Measurements is designed to work nicely with whatever package is used for units: https://juliaphysics.github.io/Measurements.jl/dev/usage/#Error-Propagation-of-Numbers-with-Units. So it ought to be possible to create a package extension to handle Unitful quantities - whether with uncertainties or not. The easiest way would be a lightweight function, like I did for Measurements in PR #248, that removes the |
Hi @chriswaudby, I was doing it in my package: stripping units before fitting, and re-adding units to the fitted parameters.
My rule of thumb is: use whatever the input parameters' units are (they may be different from each other). However, consider that the units of In the above example, |
This might get complicated! Perhaps what we need to do is:
Does this seem sensible? What to do about weights - is it sufficient just to strip these and use numerical values (provided all weights have the same unit)? |
Would you consider supporting fitting x- and y-data which has units that are defined by Unitful.jl?
For example,
I'm having the following stacktrace:
The problem seems to be in this line:
Where
x
haseltype
ofQuantity{Float64}
, which cannot apply ontoNaN
. I guess this can be changed since we are only allocating an array, whereNaN
does not really matter here.Versions:
Similar: #248 #143
The text was updated successfully, but these errors were encountered: