Change request #1547

ctbkgcube should set parameter boundaries of output model

Added by Mayer Michael over 6 years ago. Updated over 6 years ago.

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

100%

Category:-
Target version:1.0.0
Duration:

Description

I realised that in some analyses, we have convergence problems when the parameters are not properly constrained.
Running ctbkgcube, the output background model parameter Prefactor is limited to [0.0; infty[.
The problem occurs e.g. in csspec in binned mode (all curvatures are zero for some energy bins). Limiting the Prefactor to [0.01;100] solved the problem.
I therefore propose to change the following lines in ctbkgcube:

    GModelSpectralPlaw      spectral(1.0, 0.0, GEnergy(1.0, "TeV"));
    GCTAModelCubeBackground model(spectral);

to
    GModelSpectralPlaw      spectral(1.0, 0.0, GEnergy(1.0, "TeV"));
    spectral["Prefactor"].min(0.01);
    spectral["Prefactor"].max(100.0);
    GCTAModelCubeBackground model(spectral);


Recurrence

No recurrence.

History

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

Agree to constrain the parameters. Note that there is range method that allows to set both boundaries at once, i.e.

spectral["Prefactor"].range(0.01, 100.0);
We might also constrain the index to some plausible values, for example [-1.0, 1.0], but we should probably check first that this does not create any problem.

#2 Updated by Mayer Michael over 6 years ago

Even better to use the range method. The index is currently constrained to [-10,10] which of course is a large range. I agree that further constraining might be good and I guess [-1,1] should be fine here. To be careful we could however think about [-5,5]?

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

Also fine. I was not aware that the index was already constrained. Whatever fit your needs should be fine, we can always revise this later when we have more experience with it.

#4 Updated by Mayer Michael over 6 years ago

I guess in order not to break someones analysis, we could use [-5.0,5.0]. This range should still be appropriate to fit indices around 0.0.

I was not aware that the index was already constrained.

This happens on construction in GModelSpectralPlaw::init_members().

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

Mayer Michael wrote:

I guess in order not to break someones analysis, we could use [-5.0,5.0]. This range should still be appropriate to fit indices around 0.0.

I was not aware that the index was already constrained.

This happens on construction in GModelSpectralPlaw::init_members().

:D should remember better what I have coded ...

#6 Updated by Mayer Michael over 6 years ago

:)
Should I create a branch, or do you implement this right away?

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

  • Status changed from New to Closed
  • Assigned To set to Knödlseder Jürgen
  • Target version set to 1.0.0
  • % Done changed from 0 to 100

Just implemented the change (is in devel).

Also available in: Atom PDF