threeML / astromodels

Spatial and spectral models for astrophysics
BSD 3-Clause "New" or "Revised" License
44 stars 45 forks source link

Parameters of XS_ismabs #171

Open rwiller opened 3 years ago

rwiller commented 3 years ago

The model XS_ismabs as build by astromodels only has 29 out of the required 31 parameters. I believ the reason is that the abundances of S II and S III are missing due to their names being taken by Si I (sii in the code) and Si II (siii). I suggest to use the name su instead of s to denote the ionization states of sulphur. Maybe consider naming silicon differently as well to avoid confusion with the indication of the ionization state.

grburgess commented 3 years ago

Thanks @rwiller I'm glad you found a work around! I think that we will wait for the newer interface to XSPEC to go online rather than looking for a fix to this. I will keep open just in case anyone else runs into the same problem . Feel free to post your workaround here if you think it would be helpful!

rwiller commented 3 years ago

Right, in the file XS_ismabs.py, which is created by astromodels (located in /home//.astromodels/data) I just changed the name of the parameter describing the abundance of neutral Sulfur from si to sui and added the missing parameters for singly and doubly ionized sulphur as suii and suiii respectively. I then modified every function that uses the parameter list to include the renamed/ added names for sulphur. These are the new parameters with the names and values i used. The initial values and boundaries can/should be changed via threeML according to the individual use. I did not verify that the model gives correct numbers with this workaround, but it can be used without throwing an error.

sui: delta: 0.001 desc: (see https://heasarc.gsfc.nasa.gov/xanadu/xspec/manual/XspecModels.html) free: true initial value: 2.14 max: 1E6 min: '0.' unit: 10^16 suii: delta: 0.001 desc: (see https://heasarc.gsfc.nasa.gov/xanadu/xspec/manual/XspecModels.html) free: false initial value: 0.0 max: 1E6 min: '0.' unit: 10^16
suiii: delta: 0.001 desc: (see https://heasarc.gsfc.nasa.gov/xanadu/xspec/manual/XspecModels.html) free: false initial value: 0.0 max: 1E6 min: '0.' unit: 10^16

omodei commented 2 years ago

Can this be closed?