Adds Distance and Constant multiplicative factor scaling models as Astropy models
Adds an Distance and Constant multiplicative factor scaling models as Astropy models
This PR adds scaling.py which includes DistanceScale and Constant which can be used alongside other models to scale for the observer distance or by an constant multiplicative factor, both the distance and the constant can be fit.
-
[x] Add tests
-
[x] Add doc strings
@jajmitchell, is it possible to update the image/examples at the top to show the changes since the PR was opened? I'm mainly thinking of showing the | changing to *.
Aside from the docs failure, I think that this is now ready for merging.
InverseSquareFluxScaling now functions as a multiplicative model with correct unit handling.
ScalarConstant can be used with whatever operator desired. The example given is for use as a multiplicative constant. This model is much more simple than the Astropy constant models, and is more applicable to our usecase.
Need to merge or rebase upstream main into this branch to fix the doc builds
Need to merge or rebase
upstream maininto this branch to fix the doc builds
I think this is sorted, but am unsure why the changelog is now failing?
@samaloney when you say "You need to add the new module to the docs", do you mean add relevant .rst files to the /docs/api/ directory?
@samaloney when you say "You need to add the new module to the docs", do you mean add relevant .rst files to the
/docs/api/directory?
Eh yea, you may need to add a new file I can't remember but should be able to follow the same approach as the other modules.
I think the docs configuration is missing? (Don't see the new functions in the build docs or change to docs config)
So I am running python -m tox -e build_docs -r but the new files aren't being added to /docs/api/
I think the docs configuration is missing? (Don't see the new functions in the build docs or change to docs config)
I think this is now sorted
@samaloney the docs fail because the examples in the docstrings require the new StraightLineModel and GaussianModel to function. Should I just remove the examples then we can add them back in in a trivial PR once these two PRs are merged?