Change request #1821

Revise spectral model names

Added by Knödlseder Jürgen over 7 years ago. Updated over 7 years ago.

Status:ClosedStart date:07/20/2016
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:1.1.0
Duration:

Description

Similar to #1818, the names of the spectral models should probably also be revised to have a more coherent naming scheme. This was done already for PowerLaw2 that now becomes PowerLawPhotonFlux. Here an initial proposal, to be discussed of course:
  • Constant instead of ConstantValue
  • PowerLaw remains
  • PowerLawPhotonFlux instead of PowerLaw2
  • PowerLawEnergyFlux remains
  • BrokenPowerLaw remains
  • ExponentialCutoffPowerLaw instead of ExpCutoff
  • ExponentialInverseCutoffPowerLaw instead of ExpCutoff2
  • SuperExponentialCutoffPowerLaw instead of PLSuperExpCutoff
  • Gaussian remains
  • LogParabola remains
  • FileFunction remains
  • NodeFunction remains

Of course, old names should be supported for legacy.

CurvedPowerLaw.png (1.01 KB) Mayer Michael, 07/22/2016 10:03 AM

Curvedpowerlaw

Recurrence

No recurrence.

History

#1 Updated by Mayer Michael over 7 years ago

LogParabola could also be a “CurvedPowerLaw” (which we use in HESS). It might be more meaningful but I have no strong opinion on that.

#2 Updated by Knödlseder Jürgen over 7 years ago

Mayer Michael wrote:

LogParabola could also be a “CurvedPowerLaw” (which we use in HESS). It might be more meaningful but I have no strong opinion on that.

I think that a curved power law is something different (there is no log-term in the exponent, see https://en.wikipedia.org/wiki/Power_law#Curved_power_law).

Log parabola is a well defined term, and also used for example in XSPEC (see https://heasarc.gsfc.nasa.gov/xanadu/xspec/manual/XSmodelLogpar.html).

Which formula are you using in H.E.S.S.?

#3 Updated by Knödlseder Jürgen over 7 years ago

Jean Ballet has proposed in an e-mail exchange to have the same name for example for all PowerLaw or exponential cutoff models, and to make the distinction at the parameter level. I had thought also about this idea, but so far was hesitant because of the implementation issues (we so far have a registry per name type).

One could maybe rearrange the classes with having a “master” class for a model in general, and then classes for each implementation of those. I think we want to keep a class for each implementation to be able to construct a model in Python (or C++). Maybe a logical can be added to the spectral registry that analyses the model parameters to dispatch to the correct spectral class? This is worth some thinking.

#4 Updated by Mayer Michael over 7 years ago

I think that a curved power law is something different (there is no log-term in the exponent, see https://en.wikipedia.org/wiki/Power_law#Curved_power_law).

Interesting. I wasn’t aware there is a definition on wikipedia. In HESS, we use the attached formula for the “CurvedPowerLaw” model. This is almost the same as in the Fermi ST or in gammalib, however, yet with a another definition of the signs :)

HESS CurvedPowerLaw:

#5 Updated by Knödlseder Jürgen over 7 years ago

Knödlseder Jürgen wrote:

Jean Ballet has proposed in an e-mail exchange to have the same name for example for all PowerLaw or exponential cutoff models, and to make the distinction at the parameter level. I had thought also about this idea, but so far was hesitant because of the implementation issues (we so far have a registry per name type).

One could maybe rearrange the classes with having a “master” class for a model in general, and then classes for each implementation of those. I think we want to keep a class for each implementation to be able to construct a model in Python (or C++). Maybe a logical can be added to the spectral registry that analyses the model parameters to dispatch to the correct spectral class? This is worth some thinking.

Extending on that: one possibility could be that the spectral model registry is extended to include in addition to the model type also the model parameters. In that way the XML parser can allocate the appropriate class using the type and the parameters.

#6 Updated by Knödlseder Jürgen over 7 years ago

So the new list of model names could be:

Type Classes
Constant GModelSpectralConst
PowerLaw GModelSpectralPlaw, GModelSpectralPlaw2
BrokenPowerLaw GModelSpectralBrokenPlaw
ExponentialCutoffPowerLaw GModelSpectralExpPlaw, GModelSpectralExpInvPlaw
SuperExponentialCutoffPowerLaw GModelSpectralSuperExpPlaw
Gaussian GModelSpectralGauss
LogParabola GModelSpectralLogParabola
FileFunction GModelSpectralFunc
NodeFunction GModelSpectralNodes

#7 Updated by Knödlseder Jürgen over 7 years ago

  • Assigned To set to Knödlseder Jürgen
  • Target version set to 1.1.0

#8 Updated by Knödlseder Jürgen over 7 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

The revised model names have been implemented, merged into devel

Also available in: Atom PDF