Feature #1981

csphasecrv - add a tool for phase dependent model fitting - 7th coding sprint

Added by Buehler Rolf almost 7 years ago. Updated almost 7 years ago.

Status:ClosedStart date:04/13/2017
Priority:NormalDue date:
Assigned To:Buehler Rolf% Done:

100%

Category:-
Target version:1.3.0
Duration:

Description

For binaries or pulsars a typical task is to fit the source spectrum for different phases. A ctool should be written for this task. Phase information will already have to be added to the events file beforehand. All sources besides the periodic source have no phase dependency.


Recurrence

No recurrence.

History

#1 Updated by Buehler Rolf almost 7 years ago

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

The code is now working (for me). To test it there is an example events file with events information in test/data/phased_events.fits.

from cscripts import *
phrv = csphasecrv()
phrv.execute()

In the way it is currently implemented the code works only for pulsars (or generally the source period needs to be smaller than the time for exposure changes). The flux normalizations in the time component of the source model are renormalized to the phase fraction. Note that in the current version the non-source components are also fitted independently in each phase. In the future is would be nice to tie them in the fit over all phases.

#2 Updated by Buehler Rolf almost 7 years ago

The branch is 1981-add-csphasecrv

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

  • Status changed from Pull request to Closed
  • Target version set to 1.3.0
  • Start date set to 04/13/2017
  • % Done changed from 50 to 100

I added a unit test for csphasecrv and integrated the script into the ctools. Also a reference manual page exists.

The code has been merged into devel.

Also available in: Atom PDF