-
Notifications
You must be signed in to change notification settings - Fork 49
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
BUG: the sherpa.astro.optical.LogEmission model creates an unused parameter #219
Comments
Add in documentation for absorption models and some emission cases I had not got around to. Be more explicit about the units of the independent axis (for some cases, such as the Powerlaw class, the units need just be in wavelength as long as the reference parameter is taken to be in the same units, but these parameters are labelled as taking Angstrom so be explicit for them). The LogEmission model has two issues: - unused limit parameter (#219); I have noted this is unused in the documentation - difference between docs and code (#220); I have documented the code rather than the equations given in the pecview documentation for now
@jbudynk would the removal of the |
Add in documentation for absorption models and some emission cases I had not got around to. Be more explicit about the units of the independent axis (for some cases, such as the Powerlaw class, the units need just be in wavelength as long as the reference parameter is taken to be in the same units, but these parameters are labelled as taking Angstrom so be explicit for them). The LogEmission model has two issues: - unused limit parameter (#219); I have noted this is unused in the documentation - difference between docs and code (#220); I have documented the code rather than the equations given in the pecview documentation for now
Add in documentation for absorption models and some emission cases I had not got around to. Be more explicit about the units of the independent axis (for some cases, such as the Powerlaw class, the units need just be in wavelength as long as the reference parameter is taken to be in the same units, but these parameters are labelled as taking Angstrom so be explicit for them). The LogEmission model has two issues: - unused limit parameter (#219); I have noted this is unused in the documentation - difference between docs and code (#220); I have documented the code rather than the equations given in the pecview documentation for now
One would think that with all the discussions on this issue, it would be clear what has to be done here and yet I'm still confused. Go figure! The parameter
Then the limit parameter limit will be printed:
The other option is to fix so that the limit parameter does not get printed when the following command is executed (which I think is the original intention of the
|
@DougBurke is right, the sherpa.astro.optical.LogEmission only as four parameters (fwhm, pos, flux and skew) so it is a no-brainer to eliminate the fifth entry (limit) in the parameter definition.
|
The
sherpa.astro.optical
module creates a number of models which use "hidden" parameters (which aren't really used elsewhere). This includes the LogEmission model, which creates anindex
parameter but then doesn't use it.In the current master branch, the
index
parameter is created atsherpa/sherpa/astro/optical/__init__.py
Line 566 in a679e7f
calc
method - i.e. no mention ofp[4]
orself.index
insherpa/sherpa/astro/optical/__init__.py
Line 574 in a679e7f
I think in this case we can just remove this parameter from the model since users will have had to dig around to find it in the first place (e.g. in the
.pars
attribute of the model instance) as it is not visible with a print call:The alternative (which is what I would suggest doing if it were more user-visible) would be to add a deprecation warning the first time that the parameter is accessed (assuming we can do this; it might require some work to add this functionality to the model class in the first place). This deprecation would be in place for the 4.9.x series, and then the attribute removed after this.
The text was updated successfully, but these errors were encountered: