This repository was archived by the owner on Jun 27, 2025. It is now read-only.
[WIP] Split models or Supplied list - how to share parameters across models? #21
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.
We have two solutions to astropy models only allowing parameters to other parameters in the model which owns them.
The first is presented in the code, is two mapping-like models (Split and Join) which can be used to create compound models with a list of models as in
model_split_join
.Split separates input based on known indexes allowing each submodel to act on separate parts of the input.
This is demonstrated in this notebook.
The second solution is akin to that of astropy's JointFitter which takes a list of parameter pairs to join, this can be seen in this notebook. This solution will clearly have less overhead but is perhaps a bit less flexible as anything more than simple this equals this could get tricky.
@taldcroft @hamogu @olaurino @DougBurke (sorry for the spam)
Did we decide which solution was best during GSOC?
I can't remember and the notes don't seem to mention a preference.