Change request #1874

Add validity range to the CTA PSF classes

Added by Tiziani Domenico over 7 years ago. Updated over 6 years ago.

Status:NewStart date:10/25/2016
Priority:HighDue date:
Assigned To:-% Done:

0%

Category:-
Target version:-
Duration:

Description

In GNodeArray there is a problem in the set_value method:
If the argument of this method is larger than the last node, the weights and indices are calculated wrongly.
Then m_wgt_right > 1 and m_wgt_left < 0. This is in particular a problem if bi- or trilinear interpolation is performed.
Alexander and me discovered this when we generated a PSF-cube and the energy range of the cube exceeded the energy range of the IRF-file.
We think an exception should be thrown if an interpolation is not possible instead of calculating wrong values.

psfcube.png (15.5 KB) Tiziani Domenico, 10/27/2016 10:14 AM

Psfcube

Recurrence

No recurrence.

History

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

I think the values are computed correctly and correspond to an extrapolation. But we may check graphically that this is indeed the case.

#2 Updated by Tiziani Domenico over 7 years ago

OK, I think you are right, the extrapolation is mathematically correct. The problem is rather that an extrapolation of PSF parameters is not always physically reasonable.
If for example one of the m_norm parameters of a GCTAPsf2D becomes negative, the integral which is 2*pi*(sigma1 + sigma2*m_norm2 + sigma3*m_norm3) can have a value close to zero and the norm of the PSF explodes. We observe this as “hot pixels” in the highest energy bin of PSF-cubes like in this example:

#3 Updated by Ziegler Alexander over 7 years ago

To make this more clear: we observe the problem always (and only) if the energy of the last bin we use is higher than the energy of the irf look-up files and the interpolation is switched to an extrapolation (Domenico - please correct me if that is wrong).
I also think that the problem might be related to the correlation of the parameters. It seems like an extrapolation is not so easy here, as Domenico states, one might leave the physical reasonable range of the parameters.

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

This problem was indeed already encountered for the effective area, and members have been added to GCTAAeff2D that define the range for which the effective area is defined, and the response access operator verifies that the arguments are within the valid range (otherwise a zero will be returned).

I propose to implement the same logic in the PSF classes, as the GNodeArray is used in many places, and some require a valid extrapolation (so we should not change that class).

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

  • Target version changed from 1.2.0 to 1.3.0

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

  • Target version changed from 1.3.0 to 1.4.0

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

  • Tracker changed from Bug to Change request
  • Subject changed from Incorrect interpolation in GNodeArray to Add validity range to the CTA PSF classes

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

  • Target version deleted (1.4.0)

Also available in: Atom PDF