Giter VIP home page Giter VIP logo

Comments (5)

anetasie avatar anetasie commented on June 13, 2024

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.

DougBurke avatar DougBurke commented on June 13, 2024

@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.

DougBurke avatar DougBurke commented on June 13, 2024

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):

from sherpa.

DougBurke avatar DougBurke commented on June 13, 2024

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.

DougBurke avatar DougBurke commented on June 13, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.