{{lastupdated_at}} by {{lastupdated_by}} {{>toc}} h1. GCTAPsf h2. Scope The @GCTAPsf@ abstract base class defines the interface for the CTA point spread function component of the instrumental response function. h2. Implementations The following classes provide support for different PSF implementations. The implementations may differ in the PSF functional form or in the format in which the PSF information is stored. It is assumed that each new PSF implementation will be realized by a new class. Note that @GCTAResponse::load_psf@ needs to be adapted to support a new Psf class. The @GCTAResponse::load_psf@ reads the PSF information from a file, and based on the information it finds it allocates the proper response class. h3. GCTAPsf2D h3. GCTAPsfPerfTable h3. GCTAPsfVector h3. GCTAPsfKing The King Profile is a commonly used parametrisation of instrument PSFs in astronomy. It is radially symmetric and compared to a simple Gaussian, it allows longer tails in the distribution of events from a point source. The probability density function is defined as follows: {{latex(P(r| \sigma, \gamma) = \frac{1}{2\pi\sigma^{2}}\left(1-\frac{1}{\gamma}\right) \left(1+\frac{1}{2\gamma}\frac{r^2}{\sigma^{2}}\right)^{-\gamma})}} It is normalised that its plane integral to infinity is 1: {{latex(\int_0^{\infty}r P(r|\sigma,\gamma)dr\int_0^{2\pi}d\phi = 1)}} Since {{latex(\sigma)}} is not the 68% containment radius (r68), one has to find the corresponding {{latex(\sigma)}} for a given r68. Therefore, the following equation has to be solved: {{latex(\int_0^{r68}\ 2\pi r \cdot P(r,\gamma,\sigma) dr = 0.68)}} Section 2.1 of attachment:gammalib_maths.pdf explains how this equation can be solved analytically.