Here are example model definitions for Likelihood. Descriptions of the spectral models are described in the Workbook. See the Likelihood tutorial. An xml file containing these examples is attached.

PowerLaw
  <source name="PowerLaw_source" type="PointSource">
<!-- point source units are cm^-2 s^-1 MeV^-1 -->
    <spectrum type="PowerLaw">
      <parameter free="1" max="1000.0" min="0.001" name="Prefactor" scale="1e-09" value="1"/>
      <parameter free="1" max="-1.0" min="-5." name="Index" scale="1.0" value="-2.1"/>
      <parameter free="0" max="2000.0" min="30.0" name="Scale" scale="1.0" value="100.0"/>
    </spectrum>
    <spatialModel type="SkyDirFunction">
      <parameter free="0" max="360." min="-360." name="RA" scale="1.0" value="83.45"/>
      <parameter free="0" max="90." min="-90." name="DEC" scale="1.0" value="21.72"/>
    </spatialModel>
  </source>
BrokenPowerLaw
  <source name="BrokenPowerLaw_source" type="PointSource">
<!-- point source units are cm^-2 s^-1 MeV^-1 -->
    <spectrum type="BrokenPowerLaw">
      <parameter free="1" max="1000.0" min="0.001" name="Prefactor" scale="1e-09" value="1"/>
      <parameter free="1" max="-1.0" min="-5." name="Index1" scale="1.0" value="-1.8"/>
      <parameter free="1" max="2000.0" min="30.0" name="BreakValue" scale="1.0" value="1000.0"/>
      <parameter free="1" max="-1.0" min="-5." name="Index2" scale="1.0" value="-2.3"/>
    </spectrum>
    <spatialModel type="SkyDirFunction">
      <parameter free="0" max="360." min="-360." name="RA" scale="1.0" value="83.45"/>
      <parameter free="0" max="90." min="-90." name="DEC" scale="1.0" value="21.72"/>
    </spatialModel>
  </source>
PowerLaw2
  <source name="PowerLaw2_source" type="PointSource">
<!-- point source units are cm^-2 s^-1 MeV^-1 -->
    <spectrum type="PowerLaw2">
      <parameter free="1" max="1000.0" min="1e-05" name="Integral" scale="1e-06" value="1.0"/>
      <parameter free="1" max="-1.0" min="-5.0" name="Index" scale="1.0" value="-2.0"/>
      <parameter free="0" max="200000.0" min="20.0" name="LowerLimit" scale="1.0" value="20.0"/>
      <parameter free="0" max="200000.0" min="20.0" name="UpperLimit" scale="1.0" value="2e5"/>
    </spectrum>
    <spatialModel type="SkyDirFunction">
      <parameter free="0" max="360." min="-360." name="RA" scale="1.0" value="83.45"/>
      <parameter free="0" max="90." min="-90." name="DEC" scale="1.0" value="21.72"/>
    </spatialModel>
  </source>
BrokenPowerLaw2
  <source name="BrokenPowerLaw2_source" type="PointSource">
<!-- point source units are cm^-2 s^-1 MeV^-1 -->
    <spectrum type="BrokenPowerLaw2">
      <parameter free="1" max="1000.0" min="0.001" name="Integral" scale="1e-04" value="1.0"/>
      <parameter free="1" max="-1.0" min="-5.0" name="Index1" scale="1.0" value="-1.8"/>
      <parameter free="1" max="-1.0" min="-5.0" name="Index2" scale="1.0" value="-2.3"/>
      <parameter free="1" max="10000.0" min="30.0" name="BreakValue" scale="1.0" value="1000.0"/>
      <parameter free="0" max="200000.0" min="20.0" name="LowerLimit" scale="1.0" value="20.0"/>
      <parameter free="0" max="200000.0" min="20.0" name="UpperLimit" scale="1.0" value="2e5"/>
    </spectrum>
    <spatialModel type="SkyDirFunction">
      <parameter free="0" max="360." min="-360." name="RA" scale="1.0" value="83.45"/>
      <parameter free="0" max="90." min="-90." name="DEC" scale="1.0" value="21.72"/>
    </spatialModel>
  </source>
LogParabola
  <source name="LogParabola_source" type="PointSource">
<!-- point source units are cm^-2 s^-1 MeV^-1 -->
    <spectrum type="LogParabola">
      <parameter free="1" max="1000.0" min="0.001" name="norm" scale="1e-9" value="1"/>
      <parameter free="1" max="10" min="0" name="alpha" scale="1.0" value="1"/>
      <parameter free="1" max="1e4" min="20" name="Eb" scale="1" value="300."/>
      <parameter free="1" max="10" min="0" name="beta" scale="1.0" value="2"/>
    </spectrum>
    <spatialModel type="SkyDirFunction">
      <parameter free="0" max="360." min="-360." name="RA" scale="1.0" value="83.45"/>
      <parameter free="0" max="90." min="-90." name="DEC" scale="1.0" value="21.72"/>
    </spatialModel>
  </source>
ExpCutoff
  <source name="ExpCutoff_source" type="PointSource">
<!-- point source units are cm^-2 s^-1 MeV^-1 -->
    <spectrum type="ExpCutoff">
      <parameter free="1" max="100000.0" min="0.01" name="Prefactor" scale="1e-09" value="50"/>
      <parameter free="1" max="-1.0" min="-5." name="Index" scale="1.0" value="-2.1"/>
      <parameter free="0" max="2000.0" min="30.0" name="Scale" scale="1.0" value="100.0"/>
      <parameter free="1" max="300.0" min="1.0" name="Ebreak" scale="1.0" value="10.0"/>
      <parameter free="1" max="300.0" min="0.1" name="P1" scale="1000.0" value="100."/>
      <parameter free="0" max="1.0" min="-1.0" name="P2" scale="1.0" value="0"/>
      <parameter free="0" max="1.0" min="-1.0" name="P3" scale="1.0" value="0"/>
    </spectrum>
    <spatialModel type="SkyDirFunction">
      <parameter free="0" max="360." min="-360." name="RA" scale="1.0" value="83.45"/>
      <parameter free="0" max="90." min="-90." name="DEC" scale="1.0" value="21.72"/>
    </spatialModel>
  </source>
BPLExpCutoff
  <source name="BPLExpCutoff_source" type="PointSource">
<!-- point source units are cm^-2 s^-1 MeV^-1 -->
    <spectrum type="BPLExpCutoff">
      <parameter free="1" max="100000.0" min="0.01" name="Prefactor" scale="1e-09" value="1"/>
      <parameter free="1" max="-1.001" min="-5." name="Index1" scale="1.0" value="-2.1"/>
      <parameter free="1" max="-1.001" min="-5." name="Index2" scale="1.0" value="-2.1"/>
      <parameter free="1" max="10000.0" min="1.0" name="BreakValue" scale="1.0" value="1000.0"/>
      <parameter free="1" max="300.0" min="1.0" name="Eabs" scale="1.0" value="10.0"/>
      <parameter free="1" max="300.0" min="0.1" name="P1" scale="1000.0" value="100."/>
    </spectrum>
    <spatialModel type="SkyDirFunction">
      <parameter free="0" max="360." min="-360." name="RA" scale="1.0" value="83.45"/>
      <parameter free="0" max="90." min="-90." name="DEC" scale="1.0" value="21.72"/>
    </spatialModel>
  </source>
Gaussian
  <source name="Gaussian_source" type="PointSource">
<!-- point source units are cm^-2 s^-1 MeV^-1 -->
    <spectrum type="Gaussian">
      <parameter free="1" max="1000.0" min="0.001" name="Prefactor" scale="1e-09" value="1"/>
      <parameter free="1" max="1e5" min="1e3" name="Mean" scale="1.0" value="7e4"/>
      <parameter free="1" max="30" min="1e4" name="Sigma" scale="1.0" value="1e3"/>
    </spectrum>
    <spatialModel type="SkyDirFunction">
      <parameter free="0" max="360." min="-360." name="RA" scale="1.0" value="83.45"/>
      <parameter free="0" max="90." min="-90." name="DEC" scale="1.0" value="21.72"/>
    </spatialModel>
  </source>
ConstantValue
  <source name="ConstantValue_source" type="PointSource">
<!-- point source units are cm^-2 s^-1 MeV^-1 -->
    <spectrum type="ConstantValue">
      <parameter free="0" max="10" min="0" name="Value" scale="1" value="1"/>
    </spectrum>
    <spatialModel type="SkyDirFunction">
      <parameter free="0" max="360." min="-360." name="RA" scale="1.0" value="83.45"/>
      <parameter free="0" max="90." min="-90." name="DEC" scale="1.0" value="21.72"/>
    </spatialModel>
  </source>
FileFunction
  <source name="FileFunction_source" type="PointSource">
<!-- point source units are cm^-2 s^-1 MeV^-1 -->
    <spectrum file="foo.dat" type="FileFunction">
      <parameter free="1" max="1e5" min="1e-5" name="Normalization" scale="1" value="1.0"/>
    </spectrum>
    <spatialModel type="SkyDirFunction">
      <parameter free="0" max="360." min="-360." name="RA" scale="1.0" value="83.45"/>
      <parameter free="0" max="90." min="-90." name="DEC" scale="1.0" value="21.72"/>
    </spatialModel>
  </source>
BandFunction
  <source name="BandFunction_source" type="PointSource">
<!-- point source units are cm^-2 s^-1 MeV^-1 -->
    <spectrum type="BandFunction">
      <parameter free="1" max="1000.0" min="1e-05" name="norm" scale="1e-09" value="1.0"/>
      <parameter free="1" max="-1.0" min="-5.0" name="alpha" scale="1.0" value="-1.8"/>
      <parameter free="1" max="-1.0" min="-5.0" name="beta" scale="1.0" value="-2.5"/>
      <parameter free="1" max="-1.0" min="-5.0" name="Ep" scale="1." value="0.1"/>
    </spectrum>
    <spatialModel type="SkyDirFunction">
      <parameter free="0" max="360." min="-360." name="RA" scale="1.0" value="83.45"/>
      <parameter free="0" max="90." min="-90." name="DEC" scale="1.0" value="21.72"/>
    </spatialModel>
  </source>
PLSuperExpCutoff
  <source name="PLSuperExpCutoff_source" type="PointSource">
<!-- point source units are cm^-2 s^-1 MeV^-1 -->
    <spectrum type="PLSuperExpCutoff">
      <parameter free="1" max="1000" min="1e-05" name="Prefactor" scale="1e-07" value="1"/>
      <parameter free="1" max="0" min="-5" name="Index1" scale="1" value="-1.7"/>
      <parameter free="0" max="1000" min="50" name="Scale" scale="1" value="200"/>
      <parameter free="1" max="30000" min="500" name="Cutoff" scale="1" value="3000"/>
      <parameter free="1" max="5" min="0" name="Index2" scale="1" value="1.5"/>
    </spectrum>
    <spatialModel type="SkyDirFunction">
      <parameter free="0" max="360." min="-360." name="RA" scale="1.0" value="83.45"/>
      <parameter free="0" max="90." min="-90." name="DEC" scale="1.0" value="21.72"/>
    </spatialModel>
  </source>
  • No labels