Feature #1916
Add GModelTemporalPhaseCurve class
Status: | Closed | Start date: | 01/27/2017 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assigned To: | Knödlseder Jürgen | % Done: | 100% | |
Category: | - | |||
Target version: | 1.2.0 | |||
Duration: |
Description
The
GModelTemporalPhase
class should implement a regular variation, specified by a phase file function (relative amplitude as function of phase in the interval [0,1]). The class can be used to simulate pulsars and gamma-ray binaries. Parameters of the model component are:
- the relative normalization
- the origin of time (t0)
- the period at time t0 (p0)
- the first period derivative at time t0 (p1)
- the second period derivative at time t0 (p2)
- the phase at the origin of time at time t0 (phi0)
The phase is the computed using
whereRecurrence
No recurrence.
History
#1 Updated by Knödlseder Jürgen almost 8 years ago
- File phasecurve.png added
- Subject changed from Add GModelTemporalPhase class to Add GModelTemporalPhaseCurve class
- Status changed from New to In Progress
- Assigned To set to Knödlseder Jürgen
- Target version set to 1.2.0
- % Done changed from 0 to 80
The class is now correctly implemented (see plot below).
#2 Updated by Knödlseder Jürgen almost 8 years ago
- File ctobssim.png added
And here the output of ctobssim.
#3 Updated by Knödlseder Jürgen almost 8 years ago
- % Done changed from 80 to 90
Even the model fitting seems to work:
2017-01-27T21:53:44: +=================================+ 2017-01-27T21:53:44: | Maximum likelihood optimisation | 2017-01-27T21:53:44: +=================================+ 2017-01-27T21:58:15: >Iteration 0: -logL=144450.605, Lambda=1.0e-03 2017-01-27T22:02:59: >Iteration 1: -logL=144450.111, Lambda=1.0e-03, delta=0.494, max(|grad|)=-2.077806 [Index:3] 2017-01-27T22:07:40: >Iteration 2: -logL=144450.108, Lambda=1.0e-04, delta=0.003, max(|grad|)=0.242546 [Index:3] 2017-01-27T22:12:18: 2017-01-27T22:12:18: +=========================================+ 2017-01-27T22:12:18: | Maximum likelihood optimisation results | 2017-01-27T22:12:18: +=========================================+ 2017-01-27T22:12:18: === GOptimizerLM === 2017-01-27T22:12:18: Optimized function value ..: 144450.108 2017-01-27T22:12:18: Absolute precision ........: 0.005 2017-01-27T22:12:18: Acceptable value decrease .: 2 2017-01-27T22:12:18: Optimization status .......: converged 2017-01-27T22:12:18: Number of parameters ......: 15 2017-01-27T22:12:18: Number of free parameters .: 4 2017-01-27T22:12:18: Number of iterations ......: 2 2017-01-27T22:12:18: Lambda ....................: 1e-05 2017-01-27T22:12:18: Maximum log likelihood ....: -144450.108 2017-01-27T22:12:18: Observed events (Nobs) ...: 20027.000 2017-01-27T22:12:18: Predicted events (Npred) ..: 20026.997 (Nobs - Npred = 0.0033855643341667) 2017-01-27T22:12:18: === GModels === 2017-01-27T22:12:18: Number of models ..........: 2 2017-01-27T22:12:18: Number of parameters ......: 15 2017-01-27T22:12:18: === GModelSky === 2017-01-27T22:12:18: Name ......................: Crab 2017-01-27T22:12:18: Instruments ...............: all 2017-01-27T22:12:18: Instrument scale factors ..: unity 2017-01-27T22:12:18: Observation identifiers ...: all 2017-01-27T22:12:18: Model type ................: PointSource 2017-01-27T22:12:18: Model components ..........: "PointSource" * "PowerLaw" * "PhaseCurve" 2017-01-27T22:12:18: Number of parameters ......: 11 2017-01-27T22:12:18: Number of spatial par's ...: 2 2017-01-27T22:12:18: RA .......................: 83.6331 [-360,360] deg (fixed,scale=1) 2017-01-27T22:12:18: DEC ......................: 22.0145 [-90,90] deg (fixed,scale=1) 2017-01-27T22:12:18: Number of spectral par's ..: 3 2017-01-27T22:12:18: Prefactor ................: 5.68398824584615e-16 +/- 2.2420159576827e-17 [1e-23,1e-13] ph/cm2/s/MeV (free,scale=1e-16,gradient) 2017-01-27T22:12:18: Index ....................: -2.44945511369705 +/- 0.0342651451272744 [-0,-5] (free,scale=-1,gradient) 2017-01-27T22:12:18: PivotEnergy ..............: 300000 [10000,1000000000] MeV (fixed,scale=1000000,gradient) 2017-01-27T22:12:18: Number of temporal par's ..: 6 2017-01-27T22:12:18: Normalization ............: 1 [0,1000] (relative value) (fixed,scale=1,gradient) 2017-01-27T22:12:18: MJD ......................: 51544.5 [0,100000] days (fixed,scale=1) 2017-01-27T22:12:18: Phase ....................: 0 [0,1] (fixed,scale=1) 2017-01-27T22:12:18: F0 .......................: 1 [0,1000] Hz (fixed,scale=1) 2017-01-27T22:12:18: F1 .......................: 0.1 [0,1000] s^-2 (fixed,scale=1) 2017-01-27T22:12:18: F2 .......................: 0.01 [0,1000] s^-3 (fixed,scale=1) 2017-01-27T22:12:18: === GCTAModelIrfBackground === 2017-01-27T22:12:18: Name ......................: CTABackgroundModel 2017-01-27T22:12:18: Instruments ...............: CTA 2017-01-27T22:12:18: Instrument scale factors ..: unity 2017-01-27T22:12:18: Observation identifiers ...: all 2017-01-27T22:12:18: Model type ................: "PowerLaw" * "Constant" 2017-01-27T22:12:18: Number of parameters ......: 4 2017-01-27T22:12:18: Number of spectral par's ..: 3 2017-01-27T22:12:18: Prefactor ................: 0.997595111690758 +/- 0.0118966498258124 [0.001,1000] ph/cm2/s/MeV (free,scale=1,gradient) 2017-01-27T22:12:18: Index ....................: -0.00052776545878647 +/- 0.00735258326140023 [-5,5] (free,scale=1,gradient) 2017-01-27T22:12:18: PivotEnergy ..............: 1000000 [10000,1000000000] MeV (fixed,scale=1000000,gradient) 2017-01-27T22:12:18: Number of temporal par's ..: 1 2017-01-27T22:12:18: Normalization ............: 1 (relative value) (fixed,scale=1,gradient)
#4 Updated by Knödlseder Jürgen almost 8 years ago
- File bgd_index.png added
- File bgd_prefactor.png added
- File prefactor.png added
- File index.png added
Here the pull distributions for fitting with fixed phase parameters. Note that fitting the phase parameters leads to warnings and the fit seems not to work properly, but it would have been a surprise if this were possible. This needs some more investigations, an issue has been created for that: #1917.
#5 Updated by Knödlseder Jürgen almost 8 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
Merged into devel