Feature #2292

Account for gamma model spatial information in CTA On/Off analysis

Added by Tibaldo Luigi over 6 years ago. Updated almost 6 years ago.

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

100%

Category:-
Target version:1.6.0
Duration:

Description

Currently N_gamma in GCTAOnOffObservation ignores the spatial information of the gamma-ray model(s)
As discussed at the 19/12/17 meeting the minimum for the 1.5 release is:
- throw an error if the likelihood is evaluated for any gamma-ray model other then a pointlike source at the center of the On region
- add information/caveats to the ctools manual

residual-v1.png (77.1 KB) Knödlseder Jürgen, 06/08/2018 03:58 PM

resspec_disk_onoff_obs.png (75.1 KB) Knödlseder Jürgen, 06/11/2018 11:32 AM

resspec_disk_onoff_obs_stacked.png (75.4 KB) Knödlseder Jürgen, 06/11/2018 11:32 AM

resspec_disk_onoff_obs_ptsrc_rad02.png (74.4 KB) Knödlseder Jürgen, 06/11/2018 11:33 AM

resspec_disk_onoff_obs_disk_rad02.png (73.8 KB) Knödlseder Jürgen, 06/11/2018 11:34 AM

map_crab.png (37.1 KB) Knödlseder Jürgen, 06/11/2018 11:41 AM

resspec_map_onoff_obs.png (75.5 KB) Knödlseder Jürgen, 06/11/2018 11:45 AM

resspec_map_onoff_obs_rad05.png (75.2 KB) Knödlseder Jürgen, 06/11/2018 11:45 AM

resspec_map_onoff_obs_clip.png (75.2 KB) Knödlseder Jürgen, 06/11/2018 11:46 AM

Residual-v1 Resspec_disk_onoff_obs Resspec_disk_onoff_obs_stacked Resspec_disk_onoff_obs_ptsrc_rad02 Resspec_disk_onoff_obs_disk_rad02 Map_crab Resspec_map_onoff_obs Resspec_map_onoff_obs_rad05 Resspec_map_onoff_obs_clip

Recurrence

No recurrence.

History

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

  • Target version deleted (1.5.0)

For the 1.5 release I created the specific action #2296, so that we keep this feature for the future as we should probably think of implementing support for non point source models.

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

  • Assigned To set to Knödlseder Jürgen
  • Target version set to 1.6.0

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

  • Subject changed from account for gamma model spatial information in CTA On/Off analysis to Account for gamma model spatial information in CTA On/Off analysis
  • Status changed from New to In Progress
  • % Done changed from 0 to 80

The interface of the GCTAOnOffObservation constructor was changed and now takes a GModelSpatial argument instead of a GSkyDir. The Arf computation was modified and uses now the GCTAResponseIrf::irf() method for response computation, enabling thus the usage of all kinds of spatial models. Code was merged into devel, and so far has been tested on a point source. Testing on extended sources is still missing.

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

Here the results for a disk model of 0.45 deg radius, fitted over a On-region of 0.5 deg. Two observation with +1/-1 deg wobble mode around the Crab positions were simulated. Each observation lasted 30 min. The simulation were performed for 50 energy bins were within 0.1 - 100 TeV.

Parameter True Incorrect point-source ARF Correct disk ARF
Prefactor (1e-16) 5.7 5.559 5.840
Index 2.48 2.475 2.493

The fit with the correct ARF is not very close to the true prefactor. Inspection of the fit residuals shows why. The background for the first bin is in fact zero, which is probably related to the code change that was introduced when trying to fix the run-specific energy threshold, see #2429.

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

I corrected the code, including also a change to the treatment of the run-specific threshold (see #2429).

I therefore redid some simulations with two On/Off observations covering different energy ranges, so that I could check at the same time the treatment of the run-specific threshold. The following parameters were used for the simulations
  1. ra=83.63, dec=21.01, 30 min, 0.1-10 TeV
  2. ra=83.63, dec=23.01, 2 hours, 1-100 TeV

I simulated events for a 0.45 deg disk model, and did the analysis within r=0.5 deg and r=0.2 deg. Here the fitting results:

Parameter True Joint (disk, 0.5) Stacked (disk, 0.5) Joint (ptsrc, 0.2) Joint (disk, 0.2)
Prefactor (1e-16) 5.7 5.564 5.577 1.104 5.514
Index 2.48 2.477 2.478 2.483 2.478

Joint and stacked fit for a disk work nicely. The residuals for both fits are shown below.

Restricting the analysis region to 0.2 deg means that a large fraction of the source events are cut (since the disk has a radius of 0.45 deg, only about 1/5th of the events should be comprised within a radius of 0.2 deg). Fitting the data using a point source results indeed in about 1/5th of the input flux. Using a disk model in csphagen corrects for this difference. Below are the residuals for both fits.

Conclusion: everything works as expected.

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

I also made some tests using diffuse maps, shown in the image below. Both maps are radio maps from the Crab, where the left panel shows the original map (6 deg x 6 deg) while the right panel is a clipped map showing only the bright part.

Below the fitting results for a joint fit and an analysis radius of 0.2 deg, an analysis radius of 0.5 deg, and an analysis radius of 0.2 using the clipped map.

Parameter True Joint (0.2, original) Joint (0.5, original) Joint (0.2, clipped)
Prefactor (1e-16) 5.7 7.837 4.494 5.832
Index 2.48 2.571 2.492 2.483
Bkg. prefactor 1.0 1.162 1.098 1.039
Bkg. index 0.0 0.052 0.020 0.005

Using the original map, there is some pollution of the Off region with some signal, which influences the On region fits. Using a clipped map there is no longer such a pollution, and the results are closer to the extpectation.

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

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

Code merged into devel.

Also available in: Atom PDF