Function for retrieving a full parameter set from a calibration output #85
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A quick utility function I threw together. If you think it might be useful, I am happy to clean it up, add tests and documentation, and put it somewhere sensible. Partial functionality like this might exist already, but couldn't find it.
The idea is that it would be nice to have a function that takes the output of a calibration, and returns a full parameter set that can be used for e.g. simulations. For each parameter, if it has been fitted, its value in the optimum is selected (and automatically rescaled if needed). If it has a default (known) value, that is used. If it carries between different conditions, a condition id is designated to determine which condition to use. At the end, the output can be a map ([:kB => 1.0, :kC => 2.0]) or a vector (
[1.0, 2.0]
).The implementation may still have bugs.