Comments (5)
If we decide to update the names than yes, there should be an alias to the old names. How many models have been affected?
from sherpa.
@anetasie it's a bit hard to say: you can see the difference in the Xspec names above, but my suggestion is to also "fix up" how we name existing names (although I would hope they are all in the list above, there may be some others0.
from sherpa.
Using https://github.com/DougBurke/sherpa/tree/feature/build-xspec-module I can compare Sherpa to Xspec 12.9.0b (patch c is not related to the model library):
% python scripts/xspec/modelparse.py compare $HEADAS/../spectral/manager/model.dat > model.diffs
INFO:__main__:Skipping model smaug as it needs to be re-evaluated per spectrum.
INFO:__main__:Skipping pileup as model type = Acn
I've placed the model.diffs
file at https://gist.github.com/DougBurke/796a1ad754a2284fc9f2
- The differences in the hard min/max ranges are expected (although we should probably review them).
- There are a few soft min/max limits where I think we took values from the help text (i.e. really they should be in the
model.dat
file); similar for some units differences. - There are a bunch of name differences - I did not do a case-insensitive comparison so we get reports for Redshift/redshift, as well as a bunch of others.
- The "Sherpa is missing these models" are expected, as they are convolution-style models and we do not have model classes for them in Sherpa (I have some experimental code for this).
- There are three reports of sherpa calling a different function to Xspec: these are expected and not a problem (I should update the comparison code to not flag these):
https://gist.github.com/DougBurke/796a1ad754a2284fc9f2#file-model-diffs-L309
https://gist.github.com/DougBurke/796a1ad754a2284fc9f2#file-model-diffs-L361
https://gist.github.com/DougBurke/796a1ad754a2284fc9f2#file-model-diffs-L1911
Some immediate things to check
This is a very incomplete list (for the hardmin
/hardmax
checks I have generally ignored the differences involving hugeval in this list):
- there appears to be only one parameter with a different default value: this is par #6 of
plcabs
: https://gist.github.com/DougBurke/796a1ad754a2284fc9f2#file-model-diffs-L941 - par #2 of
comptb
may have a different default frozen status https://gist.github.com/DougBurke/796a1ad754a2284fc9f2#file-model-diffs-L367 and ditto par#14/#12 ofoptxagn
/optxagnf
https://gist.github.com/DougBurke/796a1ad754a2284fc9f2#file-model-diffs-L865 https://gist.github.com/DougBurke/796a1ad754a2284fc9f2#file-model-diffs-L881 (may be more) - hardmin difference in par #6 of
diskir
model: https://gist.github.com/DougBurke/796a1ad754a2284fc9f2#file-model-diffs-L479 (others like this too) - hardmax difference in par#5 of
mkcflow
model: https://gist.github.com/DougBurke/796a1ad754a2284fc9f2#file-model-diffs-L739 (this may be okay for this model); there are others like this
from sherpa.
Concentrating on the name changes (and excluding the Redshift
/redshift
lines), I get:
% grep Name model.diffs | grep -v redshift
- Par #3 Name Xspec/Sherpa=log_A logA
- Par #10 Name Xspec/Sherpa=_switch switch
- Par #10 Name Xspec/Sherpa=_switch switch
- Par #23 Name Xspec/Sherpa=_switch switch
- Par #23 Name Xspec/Sherpa=_switch switch
- Par #6 Name Xspec/Sherpa=_switch switch
- Par #19 Name Xspec/Sherpa=_switch switch
- Par #6 Name Xspec/Sherpa=tau_y tauy
- Par #8 Name Xspec/Sherpa=HovR_cyl HRcyl
- Par #14 Name Xspec/Sherpa=Ab_met AbHe
- Par #1 Name Xspec/Sherpa=_energy00 energy00
- Par #2 Name Xspec/Sherpa=_energy01 energy01
- Par #3 Name Xspec/Sherpa=_energy02 energy02
- Par #4 Name Xspec/Sherpa=_energy03 energy03
- Par #5 Name Xspec/Sherpa=_energy04 energy04
- Par #6 Name Xspec/Sherpa=_energy05 energy05
- Par #7 Name Xspec/Sherpa=_energy06 energy06
- Par #8 Name Xspec/Sherpa=_energy07 energy07
- Par #9 Name Xspec/Sherpa=_energy08 energy08
- Par #10 Name Xspec/Sherpa=_energy09 energy09
- Par #2 Name Xspec/Sherpa=CenMass NSmass
- Par #4 Name Xspec/Sherpa=LcovrLd LcLd
- Par #3 Name Xspec/Sherpa=Rin_M RinM
- Par #4 Name Xspec/Sherpa=Rout_M RoutM
- Par #1 Name Xspec/Sherpa=l_hovl_s l_hl_s
- Par #4 Name Xspec/Sherpa=l_ntol_h l_ntl_h
- Par #14 Name Xspec/Sherpa=Ab_met AbHe
- Par #1 Name Xspec/Sherpa=l_hovl_s l_hl_s
- Par #4 Name Xspec/Sherpa=l_ntol_h l_ntl_h
- Par #14 Name Xspec/Sherpa=Ab_met AbHe
- Par #6 Name Xspec/Sherpa=_switch switch
- Par #4 Name Xspec/Sherpa=meankT kT_ave
- Par #5 Name Xspec/Sherpa=TclovTef TclTef
- Par #3 Name Xspec/Sherpa=tem temp
- Par #2 Name Xspec/Sherpa=TcoloTeff TcolTeff
- Par #4 Name Xspec/Sherpa=r_br_g r_brg
- Par #7 Name Xspec/Sherpa=Rin_ms Rinms
- Par #8 Name Xspec/Sherpa=Rout_ms Routms
- Par #3 Name Xspec/Sherpa=Rin_G RinG
- Par #4 Name Xspec/Sherpa=Rout_G RoutG
- Par #3 Name Xspec/Sherpa=Rin_G RinG
- Par #4 Name Xspec/Sherpa=Rout_G RoutG
- Par #3 Name Xspec/Sherpa=_pivotE pivotE
- Par #5 Name Xspec/Sherpa=_switch switch
- Par #5 Name Xspec/Sherpa=_switch switch
- Par #3 Name Xspec/Sherpa=_specfile specfile
- Par #5 Name Xspec/Sherpa=_specfile specfile
- Par #5 Name Xspec/Sherpa=_specfile specfile
- Par #3 Name Xspec/Sherpa=logLoLEdd logLLEdd
- Par #3 Name Xspec/Sherpa=logLoLEdd logLLEdd
- Par #2 Name Xspec/Sherpa=_nmax nmax
- Par #9 Name Xspec/Sherpa=_FAST FAST
- Par #2 Name Xspec/Sherpa=break_ breakfreq
- Par #2 Name Xspec/Sherpa=HeovrH HeH
- Par #19 Name Xspec/Sherpa=_switch switch
- Par #16 Name Xspec/Sherpa=meankT kT_ave
- Par #18 Name Xspec/Sherpa=_switch switch
- Par #18 Name Xspec/Sherpa=_switch switch
- Par #33 Name Xspec/Sherpa=meankT kT_ave
- Par #3 Name Xspec/Sherpa=Strength Tau
- Par #1 Name Xspec/Sherpa=n nHeI
- Par #1 Name Xspec/Sherpa=E_BmV EBV
- Par #2 Name Xspec/Sherpa=log_xi logxi
- Par #1 Name Xspec/Sherpa=E_BmV EBV
- Par #2 Name Xspec/Sherpa=lxovrld lxld
- Par #1 Name Xspec/Sherpa=_method method
- Par #2 Name Xspec/Sherpa=E_BmV EBV
- Par #2 Name Xspec/Sherpa=_model model
- Par #3 Name Xspec/Sherpa=_lyman_limit lyman_limit
- Par #2 Name Xspec/Sherpa=log_xi logxi
- Par #1 Name Xspec/Sherpa=E_BmV EBV
- Par #1 Name Xspec/Sherpa=E_BmV EBV
from sherpa.
I have a proof-of-concept change in the branch feature/support-deprecated-parameter-names
. This only includes support for using "old" names to access parameter values, it does not
- warn when a user uses the old name for the first time (which it probably should)
- update any models to use the old and new names (which it needs to to check that it all works).
It's a simple, if ungainly, change, but may conflict with the python 3 changes.
from sherpa.
Related Issues (20)
- citation command fails for 4.16.0
- do we need a plot_quality() command
- ignore_bad issues
- superscripts in bokeh axis labels display as "$^2$ HOT 2
- planned I/O changes for 4.17
- "Goodness" command like XSPEC to evaluate fitting statistics through repreated fake_it HOT 3
- Add a `to_arviz` method to pyBLoCXS
- Should 'load_table_model' fail when reading xspec table model type, but XSPEC is not installed? HOT 1
- multiprocessing and python 3.12 HOT 1
- bokeh problems with tests
- ERROR: Failed building wheel for sherpa HOT 2
- pytest 8.0.0 changes HOT 1
- argh: pytest < 8 HOT 2
- numpy 2.0 HOT 1
- improve error message when plot backend is not available HOT 1
- Checking whether we can do something with stats/method objects: design issue
- choice of list vs tuple vs ndarray for field settings
- requires_pylab decorator is wrong HOT 3
- bokeh backend fails for some multi-panel plots
- should composite parameters not carry over min/max/frozen/... status
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sherpa.