cxcsds / ciao-contrib

Extra scripts and code to enhance the capabilities of CIAO.
GNU General Public License v3.0
8 stars 6 forks source link

convert_xspec_user_script #862

Open DougBurke opened 5 months ago

DougBurke commented 5 months ago

I have a xcm file which has apec abundance as a free parameter

       0.461097      0.001          0          0          5          5

but we converted this to

set_par(m2.Abundanc, 0.461097)

which is a problem because the abundance defaults to frozen, so this left the parameter frozen

sherpa-4.16.0> xsapec.foo
-------------> xsapec.foo()
<XSapec model instance 'xsapec.foo'>

sherpa-4.16.0> print(foo)
xsapec.foo
   Param        Type          Value          Min          Max      Units
   -----        ----          -----          ---          ---      -----
   foo.kT       thawed            1        0.008           64        keV
   foo.Abundanc frozen            1            0            5           
   foo.redshift frozen            0       -0.999           10           
   foo.norm     thawed            1            0        1e+24           

Also, we can skip the max-parameter check for the norm parameters at least (as we default to 1e24 rather than XSPEC's 1e20).

There are other issues to do with the parameter ranges but that is in part due to the difference between XSPEC and Sherpa parameters, so not clear what to do....