XSPEC: update model parameters to match XSPEC 12.13.1 / HEASOFT 6.32 #1853
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.
Summary
Update the XSPEC parameter names and ranges to match those from XSPEC 12.13.1 / HEASOFT 6.32.
Details
These updates were pointed out by running scripts/check_xspec_update.py on the model.dat from HEASOFT 6.32 (XSPEC version 12.13.1). I am not sure when these changes were first made to XSPEC, but they are mainly "documentation" style changes so I do not worry about using them in a build with an XSPEC library before these changes were made.
The two changes are
For the latter, I noted to HEASARC quite some time ago that there existing naming scheme (of
<element><species>
) lead to a confusion for the Si and S parameters for a system like Sherpa where the parameter names are case insensitive, since is "sii" meant to be "SiI" or "SII". So we called these two parameters "Si_species" and "S_species". HEASARC have finally applied this to all the elements (apart from H and Fe), so we make this change as well and use the "aliases" capability of the model to allow the old names to be used.I had added a test to check the old behaviour, so this test had to be updated to follow the new behaviour, and I added in a check that the deprecation warning is created when an "old" parameter name is used.
Note that the parameter name is ignored by the XSPEC model library, as all the code cares about is getting an array of npar numbers, so we can actually call these parameters whatever we want, as long as the ordering matches.
I added a note for the bwcycl model to point out that we are not going to follow the XSPEC naming of the del parameter because we can not. My guess is that this parameter has always been called del and we decided to use delta, rather than it changing from delta to del at some point.
Example
Here's how the ISMABS model works now
So we can still set a parameter using the "old" names (e.g. "ArI" above) but that is internally converted to the "new" name ("Ar_I" in this case).