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
Add Beta1D model #6374
Add Beta1D model #6374
Conversation
Hi there @mirca 👋 - thanks for the pull request! I'm just a friendly 🤖 that checks for issues related to the changelog and making sure that this pull request is milestoned and labelled correctly. This is mainly intended for the maintainers, so if you are not a maintainer you can ignore this, and a maintainer will let you know if any action is required on your part 😃. Everything looks good from my point of view! 👍 |
Parameters | ||
---------- | ||
amplitude : float | ||
Amplitude at x=xpos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a .
at the end of the definition in all docstrings.
d_xpos = (-2 * amplitude * (-3 * beta + .5) * (1 + ((x - xpos) / r0) | ||
** 2) ** (-3 * beta - .5) * (x - xpos) / r0 ** 2) | ||
d_amplitude = (1 + ((x - xpos) / r0) ** 2) ** (-3 * beta + .5) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same terms are computed many times. For those that makes sense could you compute them once at the beginning and reuse that.
@mirca Thanks for adding this model. Please add also a fitting test if possible, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need a change log.
Also you don't need to write new functions for the testing. Most of the models are tested in https://github.com/astropy/astropy/blob/master/astropy/modeling/tests/example_models.py .
Also, I wonder if this should really belong in |
@nden where should I add this fitting test? |
@mirca If you add the model to tests/example_models.py it will be picked up by the fitting testers. |
|
travis failures look unrelated? |
astropy/modeling/powerlaws.py
Outdated
|
||
See Also | ||
-------- | ||
Lorentz1D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this causes the sphinx fail, use the full namespace as Lorentz1D is not defined in this file.
@mirca - The sphinx fail is real, and I've restarted the other one that timed out (it was probably unrelated, but we'll see). |
Thanks, @mirca. The https://groups.google.com/d/msg/astropy-dev/vizuhH8I3PA/IuhNz6qrlX4J |
Given all this is anyone opposed to adding a note to the @larrybradley Could you look over this list and see if it is up to date. |
@larrybradley Oh ok, thanks for pointing that out! |
@nden And there is now a PR to add Everything else looks up to date. |
cc @pllim @eteq
First time contributing in
modeling.models
, let me know if I'm missing something