Feature #1244

Implement cslike as an extension for ctlike

Added by Mayer Michael almost 10 years ago. Updated over 9 years ago.

Status:ClosedStart date:07/07/2014
Priority:NormalDue date:
Assigned To:Mayer Michael% Done:

100%

Category:-
Target version:00-08-00
Duration:

Description

To allow extended calculations with ctlike, we could create a csscript, called cslike.py.

This tool functions similarly to ctlike, with the following additions:
  • computing TS values for each source which has a free parameter (background models are omitted from this calculations)
  • Adding the TS value to the optimised xml-file
  • Supporting two options for TS value determination (unbiased / biased). Will add documentation to the different approaches
  • Adding the likelihood value of the best fit model to the end of the optimised xml-file
  • Storing the covariance matrix for further usage
  • Store TS values in a python dictionary for further usage

This tool can be used later on to facilitate the computation e.g. spectral points or TS maps...

I think we have to decide whether this should stay a csscript or become a “proper” ctool in the future.

cslike.py Magnifier (11 KB) Mayer Michael, 07/07/2014 02:23 PM

test_cslike.py Magnifier (487 Bytes) Mayer Michael, 07/07/2014 02:26 PM


Recurrence

No recurrence.

History

#1 Updated by Mayer Michael almost 10 years ago

Here is an initial version of how the script could look like.

#2 Updated by Mayer Michael almost 10 years ago

And here is a short script how to use the cslike from python

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

I was wondering whether we should add the TS computation as an option to ctlike? I guess at some time a user may become confused by what ctlike is for and when using cslike ...

#4 Updated by Mayer Michael almost 10 years ago

I agree! That’s an even better idea.

#5 Updated by Buehler Rolf almost 10 years ago

  • Status changed from New to Pull request

We have added TS calculation directly to ctlike and modified ctselect not to require a ROI cut during the 3rd coding sprint. This is in the git branch 1244-extendgtlike together with a obsutils.specpoints script which relies on it to do spectral points. We tested that this is working. In order for this to work also an gammalib update was necessary. The TS is now stored in GModel. This is in the gammalib branch 1244-AddTsToGmodel.Both of these branches can be merged.

#6 Updated by Knödlseder Jürgen almost 10 years ago

  • Status changed from Pull request to In Progress
  • % Done changed from 0 to 90

I integrated 1244-AddTsToGmodel into the GammaLib trunk.

I merged the trunk into 1244-extendgtlike and did some modifications:
  • moved obstutils.py and plotutils.py into pyext/ctools
  • removed import numpy from obstutils.py
  • add tscalc parameter to ctlike to make TS computation optional (default = false)

What is still needed here is to remove the numpy specific code from obstutils.py. I was wondering whether the spectrum specific code should anyways go in a separate module names specutils.py? The purpose of obstutils.py was combination of functions to handle observations.

We should define a clear policy on how to organize scripts. Let’s use feature #1263 for that.

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

  • Status changed from In Progress to Feedback
  • Target version changed from 3rd coding sprint to 00-08-00
  • % Done changed from 90 to 100

I put this on feedback as I think the issue is now done. Decision was to no develop cslike but to implement TS computation directly in ctlike. This has been done.

Will close it for next release unless I hear back from you.

#8 Updated by Mayer Michael over 9 years ago

can be closed in my opinion

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

  • Status changed from Feedback to Closed

Also available in: Atom PDF