Support #1927

Cannot use csspec with Fermi data

Added by Rodriguez Fernandez Gonzalo about 7 years ago. Updated over 6 years ago.

Status:ClosedStart date:02/10/2017
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:1.5.0
Duration:

Description

Dear all,

I was trying to use csspec with Fermi data from crab observations.
Once I have defined an observation definition XML file:
<observation_list title=“observation library">

&lt;observation name="Crab" id="00001" instrument="LAT"&gt;
&lt;parameter name="CountsMap" file="./srcmap.fits"/&gt;
&lt;parameter name="ExposureMap" file="./binned_expmap.fits"/&gt;
&lt;parameter name="LiveTimeCube" file="./ltcube.fits"/&gt;
&lt;parameter name="IRF" value="P7SOURCE_V6"/&gt;
&lt;/observation&gt;

</observation_list>

I can use ctlike with unbinned and binned data but not csspec.

I get this error message:
RuntimeError: *** ERROR in GLATResponse::nroi(GModelSky&, GEnergy&, GTime&, GObservation&): Spatial integration of sky model over the data space is not implemented.

Did I missing something or I just cannot use csspec with Fermi data?

Thanks,
Gonzalo

spectrum.png (21 KB) Knödlseder Jürgen, 10/18/2017 09:14 PM

Spectrum

Recurrence

No recurrence.

History

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

  • Project changed from GammaLib to ctools
  • Assigned To set to Knödlseder Jürgen
  • Target version set to 1.5.0

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

  • File spectrum.png added
  • Status changed from New to In Progress
  • % Done changed from 0 to 80

I implemented the NODES method in csspec which replaces the spectral source model by a nodes function and extracts the fitted node values into the spectrum. Using the GammaLib Pass 8 test data, the following run works:

$ csspec debug=yes
Input event list, counts cube, or observation definition XML file [obs_binned.xml] 
Input model definition XML file [source_model.xml] 
Source name [Crab] 
Spectrum generation method (SLICE|NODES|AUTO) [AUTO] 
Binning algorithm (LIN|LOG|FILE) [LOG] 
Lower energy limit (TeV) [0.1] 0.0002
Upper energy limit (TeV) [100.0] 0.02
Number of energy bins [10] 
Output spectrum file [spectrum.fits] 
2017-10-18T19:08:11: +============+
2017-10-18T19:08:11: | Parameters |
2017-10-18T19:08:11: +============+
2017-10-18T19:08:11:  inobs .....................: obs_binned.xml
2017-10-18T19:08:11:  inmodel ...................: source_model.xml
2017-10-18T19:08:11:  srcname ...................: Crab
2017-10-18T19:08:11:  expcube ...................: [not queried]
2017-10-18T19:08:11:  psfcube ...................: [not queried]
2017-10-18T19:08:11:  edispcube .................: [not queried]
2017-10-18T19:08:11:  bkgcube ...................: [not queried]
2017-10-18T19:08:11:  caldb .....................: [not queried]
2017-10-18T19:08:11:  irf .......................: [not queried]
2017-10-18T19:08:11:  edisp .....................: no
2017-10-18T19:08:11:  outfile ...................: spectrum.fits
2017-10-18T19:08:11:  method ....................: AUTO
2017-10-18T19:08:11:  emin ......................: 0.0002
2017-10-18T19:08:11:  emax ......................: 0.02
2017-10-18T19:08:11:  enumbins ..................: 10
2017-10-18T19:08:11:  ebinalg ...................: LOG
2017-10-18T19:08:11:  ebinfile ..................: [not queried]
2017-10-18T19:08:11:  calc_ts ...................: yes
2017-10-18T19:08:11:  calc_ulim .................: yes
2017-10-18T19:08:11:  fix_srcs ..................: yes
2017-10-18T19:08:11:  fix_bkg ...................: no
2017-10-18T19:08:11:  publish ...................: no
2017-10-18T19:08:11:  chatter ...................: 2
2017-10-18T19:08:11:  clobber ...................: yes
2017-10-18T19:08:11:  debug .....................: yes
2017-10-18T19:08:11:  mode ......................: ql
2017-10-18T19:08:11:  logfile ...................: csspec.log
2017-10-18T19:08:11: 
2017-10-18T19:08:11: +=================+
2017-10-18T19:08:11: | Spectrum method |
2017-10-18T19:08:11: +=================+
2017-10-18T19:08:11:  Unbinned CTA observations .: 0
2017-10-18T19:08:11:  Binned CTA observations ...: 0
2017-10-18T19:08:11:  On/off CTA observations ...: 0
2017-10-18T19:08:11:  Other observations ........: 1
2017-10-18T19:08:11:  Selected spectrum method ..: NODES
2017-10-18T19:08:11: 
2017-10-18T19:08:11: +===================+
2017-10-18T19:08:11: | Input observation |
2017-10-18T19:08:11: +===================+
2017-10-18T19:08:11: === GObservations ===
2017-10-18T19:08:11:  Number of observations ....: 1
2017-10-18T19:08:11:  Number of models ..........: 3
2017-10-18T19:08:11:  Number of observed events .: 853
2017-10-18T19:08:11:  Number of predicted events : 0
2017-10-18T19:08:11: 
2017-10-18T19:08:11: +==================+
2017-10-18T19:08:11: | Spectral binning |
2017-10-18T19:08:11: +==================+
2017-10-18T19:08:11:  Bin 1 .....................: 200 MeV - 316.978638492223 MeV
2017-10-18T19:08:11:  Bin 2 .....................: 316.978638492223 MeV - 502.377286301916 MeV
2017-10-18T19:08:11:  Bin 3 .....................: 502.377286301916 MeV - 796.214341106995 MeV
2017-10-18T19:08:11:  Bin 4 .....................: 796.214341106995 MeV - 1.26191468896039 GeV
2017-10-18T19:08:11:  Bin 5 .....................: 1.26191468896039 GeV - 2 GeV
2017-10-18T19:08:11:  Bin 6 .....................: 2 GeV - 3.16978638492223 GeV
2017-10-18T19:08:11:  Bin 7 .....................: 3.16978638492223 GeV - 5.02377286301916 GeV
2017-10-18T19:08:11:  Bin 8 .....................: 5.02377286301916 GeV - 7.96214341106995 GeV
2017-10-18T19:08:11:  Bin 9 .....................: 7.96214341106995 GeV - 12.6191468896039 GeV
2017-10-18T19:08:11:  Bin 10 ....................: 12.6191468896039 GeV - 20 GeV
2017-10-18T19:08:11: 
2017-10-18T19:08:11: +=========================+
2017-10-18T19:08:11: | Adjust model parameters |
2017-10-18T19:08:11: +=========================+
2017-10-18T19:08:11: 
2017-10-18T19:08:11: +===================+
2017-10-18T19:08:11: | Generate spectrum |
2017-10-18T19:08:11: +===================+
2017-10-18T19:08:31:  Bin 1 .....................: 2.600751e-10 +/- 8.114235e-11 erg/cm2/s (TS = 120.027)
2017-10-18T19:08:35:  Bin 2 .....................: 1.055219e-09 +/- 2.429892e-10 erg/cm2/s (TS = 199.777)
2017-10-18T19:08:39:  Bin 3 .....................: 2.204460e-10 +/- 8.997018e-11 erg/cm2/s (TS = 105.366)
2017-10-18T19:08:42:  Bin 4 .....................: 4.302804e-10 +/- 1.941414e-10 erg/cm2/s (TS = 80.621)
2017-10-18T19:08:56:  Bin 5 .....................: 1.916519e-10 +/- 1.292628e-10 erg/cm2/s (TS = 64.673)
2017-10-18T19:09:02:  Bin 6 .....................: 2.852189e-10 +/- 2.812639e-10 erg/cm2/s (TS = 32.503)
2017-10-18T19:09:05:  Bin 7 .....................: 1.379202e-12 +/- 7.168415e-12 erg/cm2/s (TS = 3.634)
2017-10-18T19:09:12:  Bin 8 .....................: 3.009655e-10 +/- 9.033762e-09 erg/cm2/s (TS = 10.326)
2017-10-18T19:09:19:  Bin 9 .....................: 8.916198e-11 +/- 8.036338e-09 erg/cm2/s (TS = 22.617)
2017-10-18T19:09:22:  Bin 10 ....................: 2.569123e-10 +/- 7.726278e-09 erg/cm2/s (TS = 11.622)
2017-10-18T19:09:22: 
2017-10-18T19:09:22: +===============+
2017-10-18T19:09:22: | Save spectrum |
2017-10-18T19:09:22: +===============+
2017-10-18T19:09:22:  Spectrum file .............: spectrum.fits
2017-10-18T19:09:22: 
2017-10-18T19:09:22: Application "csspec" terminated after 86 wall clock seconds, consuming 71.7455 seconds of CPU time.

Note that the AUTO method was used that automatically determines whether the data can be sliced (typically for CTA observations), or whether a node function should be used for fitting.

The TS values are computed by setting individual nodes to tiny intensities. So far now upper limit computation is implemented.

Below the resulting spectrum.

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

  • Status changed from In Progress to Closed
  • % Done changed from 80 to 100

Code merged into devel.

The upper limit computation for the NODES method is still outstanding. I created action #2233 for that. Close this support issue now.

Also available in: Atom PDF