-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Definitions of alpha and gamma in Moffat functions #7733
Comments
That's unfortunate. We can't simply swap them because it would break existing code that uses them. We could possibly deprecate the current |
IMO relying on names of variables can cause problems on many levels, but if the documentation clearly states what each parameter means then this ship has sailed. |
I think it's going to be very confusing to change the names now since the model has been around for about 5 years. |
Yeah, I understand that it would be a lot of work to make the code changes. I would say though that the definitions of How about a warning or notification in the documentation to let users know if the difference? |
I am concerned about the impact such a change would have on other code written in these 5 years. It's also unclear to me why those names were chosen to start with. These two models started as |
A quick search on github reveals that indeed there are several repositories out there that use That said, I'm almost certain it's what @nden said: There is a middle-ground though. We could imagine writing some hacks into The above suggestion aside, I agree with @rjavila that it's a good idea to point this out somewhere clearly in the docs. @rjavila do you think you can make a PR to do this? The docs for specific models are generated directly from the docstrings - e.g. for 1D: https://github.com/astropy/astropy/blob/master/astropy/modeling/functional_models.py#L2194 - you could add a paragraph with whatever you think might have addressed this problem for you when you were reading the docs? (This is a great example of "developers shouldn't write docs, users should" 🙃). You could also put it in a |
@eteq solution of a hack would be sufficient for me as a user. I'll let you decide what to do about that. On the documentation side, I'd be happy to write something up. |
Re: hack -- I attemped to "hack" Gaussian model once and got rejected (#4936). Should be we consistent in the no-hack policy? 😉 |
We might make a new model |
@hamogu I would even go further and suggest that after adding the "correct/better" model, that we deprecate |
The documentation in the Moffat1D and Moffat2D models use alpha and gamma, but as far as I can tell, everywhere else these two parameters are defined as beta and alpha, respectively. For example equation 1 in this paper https://arxiv.org/pdf/astro-ph/0109067.pdf
Can the code and documentation be changed to reflect this? It has confused me bit while using the models. Thanks.
The text was updated successfully, but these errors were encountered: