Supply an energy binning array to be used in model evalutations in place of the associated response energies, or add an extension to the response energies.
Args:
arg1: A string containing either:
” […]”
""
“extend” [This option also uses arg2]
“reset”
where the first ::= log|lin
::= log|lin
This uses the same syntax as standard XSPEC’s ‘energies’ command. Values can be delimited by spaces or commas.
arg2: String only needed when arg1 is “extend”.
This requires an extension specifier string of the form: “low|high log|lin”
All energies are in keV. Multiple ranges may be specified to allow for varied binning in different segments of the array, but note that no gaps are allowed in the overall array. Therefore only the first range specifier accepts a parameter. Additional ranges will automatically begin at the value of the previous range.
With the “extend” option, the specifier string supplied to arg2 will extend the existing response energy array by an additional to the new , in either the high or low direction.
Once an energy array is specified, it will apply to all models and will be used in place of any response energy array (from actual or dummy responses) for calculating and binning the model flux. It will also apply to any models that are created after it is specified. To turn off this behavior and return all models back to using their response energies, set arg1 to “reset”.
arg1 can also be the name of an ascii text file containing a custom energy array. To see the proper file format, and for more details in general about the ‘energies’ command, please see the standard XSPEC manual.
Examples:
# Create an array of 1000 logarithmic-spaced bins, from .1 to 50. keVAllModels.setEnergies(".1 50. 1000 log")# Change it to 500 binsAllModels.setEnergies(",,500")# Now restore original response energies, but with an extension of the# high end to 75.0 keV with 100 additional linear bins.AllModels.setEnergies("extend","high,75.,100 lin")# Return to using original response energies with no extensions.AllModels.setEnergies("reset")