Action #1992

Enable fitting of scale parameters in GModelSpatialComposite

Added by Ziegler Alexander about 7 years ago. Updated about 7 years ago.

Status:ClosedStart date:04/06/2017
Priority:NormalDue date:
Assigned To:Tiziani Domenico% Done:

100%

Category:-
Target version:1.3.0
Duration:

Description

It would be reasonable to enable fitting of the relative scales/weights of the individual spatial components of a ModelSpatialComposite.
Until now, the relative scales have to be added as priors without the possibility to fit them.


Recurrence

No recurrence.

History

#1 Updated by Ziegler Alexander about 7 years ago

  • % Done changed from 0 to 50

We started to implement the functionality and first tests look good.
Default mode is that the scales are fixed, but they can be set to free in the model file.

#2 Updated by Tiziani Domenico about 7 years ago

  • Status changed from New to Pull request
  • % Done changed from 50 to 90

Fitting of component scales can now be toggled by the user.
An example for an output model from ctlike which shows how the scale parameters can be configured is shown below:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<source_library title="source library">
  <source name="Crab" type="CompositeSource">
    <spectrum type="PowerLaw">
      <parameter name="Prefactor" value="1.00137660755174" error="0.0374320722632335" scale="1e-17" min="1e-10" max="1000000" free="1" />
      <parameter name="Index" value="2.36783645459103" error="0.0256641333215241" scale="-1" min="-5" max="5" free="1" />
      <parameter name="Scale" value="1" scale="1000000" min="0.0001" max="10000" free="0" />
    </spectrum>
    <spatialModel type="Composite">
      <spatialModel type="SkyDirFunction" component="Crab0" scale="1.1" free_scale="0">
        <parameter name="RA" value="83.6357875434369" error="0.00371836172038447" scale="1" min="83" max="84" free="1" />
        <parameter name="DEC" value="22.0126345253986" error="0.00288110273687871" scale="1" min="21" max="23" free="1" />
      </spatialModel>
      <spatialModel type="SkyDirFunction" component="Crab1" scale="4" scale_error="0.301000164421587" scale_min="3" scale_max="4" free_scale="1">
        <parameter name="RA" value="84.6331588087537" error="0.00191613917049493" scale="1" min="84" max="85" free="1" />
        <parameter name="DEC" value="22.0167473672674" error="0.00166248538507313" scale="1" min="21" max="23" free="1" />
      </spatialModel>
    </spatialModel>
  </source>
</source_library>

#3 Updated by Tiziani Domenico about 7 years ago

  • Status changed from Pull request to In Progress

#4 Updated by Tiziani Domenico about 7 years ago

  • Status changed from In Progress to Pull request

After cleanup, ready for code review.
Changes are implemented in branch dtiziani/gammalib : CompositeSpectral (whoever named this branch like that...)

#5 Updated by Tiziani Domenico about 7 years ago

Now also limits of composite scales can be specified by the user via the attributes scale_min and scale_max.

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

  • Status changed from Pull request to Closed
  • % Done changed from 90 to 100

Code merged into devel.

Also available in: Atom PDF