Action #1122

Calculate IRFs for GSkyRegions

Added by Kosack Karl almost 11 years ago. Updated over 8 years ago.

Status:NewStart date:01/28/2014
Priority:NormalDue date:
Assigned To:Kosack Karl% Done:

100%

Category:-
Target version:-
Duration:

Description

We need functionality to be able to properly calculate the effective area, RMF, exposure, etc for a GSkyRegion in the On/Off analysis.

To do that, we need to calculate the weighted average of these IRFs across the set of ON and OFF regions over the time of the run/GTI.

We should add to GCTAOnOffObservation sonething on the lines of:

calc_distributions(): calculates distributions of instrumental parameters (zenith, azimuth,offset) over a set of GSkyRegions (e.g. the ON or OFF regions) and over time for an observation , stored as eg. a histogram internally.

For each instrumental parameter (zenith, azimuth, and offset for example), calc_distributions pre-calculates a histogram that is the distribution over time (over the run time) and space (over the region area) of that parameter. E.g. it represenents the estimated fraction of events that should be at a specific zenith angle, in the event list.

Then one can define a series of weighting funtions (or functors), that just return interpolations of these distributions:


weight_zenith( zenith ): returns weight of zenith angle from distribution
weight_offset( offset ): returns weight of offset
weight_azimuth( azimuth): ...

Then the calculation of an average effective area for example is just:

\langle A_{\mathrm{eff}}(E) \rangle  = \int_{\Psi}\int_{\Phi}\int_{\theta} w_{\Psi}(\Psi) w_{\Phi}(\Phi) w_{\theta}(\theta) A_{\mathrm{eff}}(E,\Phi,\Psi,\theta}) d\Psi d\Phi d\theta

where the parameters phi, psi, and theta are the zenith angle, azimuth angle, and offset (in principle others can be added)

To break up this work, we will initially ignore calc_distributions and implement the weight functions to return only delta functions, and thus the integral reduces just the average values of zenith, az, offset in a region. Later the full functionality can be added. For that a mechanism for getting the horizontal coordinates of points in a region is needed (See related sub-issues)


Recurrence

No recurrence.


Subtasks

Action #1113: Use pointing table from a FITS file in GCTAPointingRejectedKosack Karl

History

#1 Updated by Kosack Karl almost 11 years ago

  • Description updated (diff)

After some discussion, we think the weigting functions should be implemented as functors and should be calculated or created in GCTAOnOffObservation, since they need the pointing, run time, and region shape.

The integral that creates the average response can go in GCTAResponse::average_irf( list of weight functors) or something like that

#2 Updated by Kosack Karl almost 11 years ago

upon further discussion, we have decided this functionality should go into a ctool, not into the gammalib library itself, since it is a specific analysis case.

The workflow would then be:
  1. make run definition xml file
  2. run ctool to produce on and off regions
  3. run ctool to calculate on and off response from these regions (e.g. run12345-on-arf.fits, run12345-off-arf.fits, etc)
  4. run on/off analysis

GCTAOnOffObservation would then need 2 new members:

GCTAResponse *m_on_response;
GCTAResponse *m_off_response;

#3 Updated by Kosack Karl almost 11 years ago

  • Target version deleted (2nd coding sprint)

#4 Updated by Kosack Karl almost 11 years ago

  • Parent task set to #1044

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

  • Target version set to 2nd coding sprint

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

  • Target version deleted (2nd coding sprint)

#7 Updated by Martin Pierrick over 8 years ago

  • Parent task deleted (#1044)

Also available in: Atom PDF