Action #1718

Source's photons detected by ctlike

Added by Dang Viet Tan almost 9 years ago. Updated almost 7 years ago.

Status:NewStart date:03/01/2016
Priority:NormalDue date:
Assigned To:-% Done:

0%

Category:-
Target version:-
Duration:

Description

Dear the system admin

Hi, my name is Tan. I have a question.
Can it possible to output the source’s photons detected by ctlike (by using python code)?
I’ve read the code of GObservations::likelihood but only found the total number of predicted events (N_pred)...

Thank you for reading me.
Tan


Recurrence

No recurrence.

History

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

Hi Tan, sorry for the very late reply, I had missed your question somehow.

Do I understand you correctly that you want determine the number of source photons detected by ctlike? If this is the case, this is so far not implemented (but it could be). One way to get this number nevertheless is to take the ctlike output XML file, remove all source components except of the one you are interested in, fix all parameters of this model component, and run ctlike using this modified XML file. The tool will then not fit the model (as all parameters are fixed), but will compute the Npred for the specific source model. An example output is:

2016-06-02T22:43:31: +=================================+
2016-06-02T22:43:31: | Maximum likelihood optimisation |
2016-06-02T22:43:31: +=================================+
2016-06-02T22:43:31:  WARNING: All model parameters are fixed!
2016-06-02T22:43:31:           ctlike will proceed without fitting parameters.
2016-06-02T22:43:31:           All curvature matrix elements will be zero.
...
2016-06-02T22:43:31: 
2016-06-02T22:43:31: +=========================================+
2016-06-02T22:43:31: | Maximum likelihood optimisation results |
2016-06-02T22:43:31: +=========================================+
2016-06-02T22:43:31: === GOptimizerLM ===
2016-06-02T22:43:31:  Optimized function value ..: 17222.123
2016-06-02T22:43:31:  Absolute precision ........: 0.005
2016-06-02T22:43:31:  Acceptable value decrease .: 2
2016-06-02T22:43:31:  Optimization status .......: singular curvature matrix encountered
2016-06-02T22:43:31:  Number of parameters ......: 6
2016-06-02T22:43:31:  Number of free parameters .: 0
2016-06-02T22:43:31:  Number of iterations ......: 0
2016-06-02T22:43:31:  Lambda ....................: 0.001
2016-06-02T22:43:31:  Maximum log likelihood ....: -17222.123
2016-06-02T22:43:31:  Observed events  (Nobs) ...: 23108.000
2016-06-02T22:43:31:  Predicted events (Npred) ..: 3694.679 (Nobs - Npred = 19413.3)

Here, there are 3694.7 predicted events in the source.

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

  • Tracker changed from Support to Action
  • Target version set to 1.2.0

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

  • Target version changed from 1.2.0 to 1.3.0

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

  • Target version changed from 1.3.0 to 1.4.0

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

  • Target version changed from 1.4.0 to 1.5.0

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

  • Target version deleted (1.5.0)

Also available in: Atom PDF