Skip to content

Add support for 3D PSF table IRFs - #301

Open
luca-dib wants to merge 12 commits into
cta-observatory:mainfrom
luca-dib:psf_asymmetric
Open

luca-dib wants to merge 12 commits into
cta-observatory:mainfrom
luca-dib:psf_asymmetric

Conversation

@luca-dib

Copy link
Copy Markdown
Contributor

Introduces the psf_table_3d_polar and psf_table_3d_lonlat functions to pyirf.irf.psf.
These calculate the PSF in energy, source offset, and two FoV axes, allowing accounting for asymmetry of the PSF in the FoV.

The relevant functions to create FITS binary tables in the GADF format have also been added to pyirf.io.gadf.

@luca-dib
luca-dib marked this pull request as ready for review November 11, 2026 16:59
@bkhelifi

Copy link
Copy Markdown

v0.4 of GADF might be tagged soon. Should we add this also?

@luca-dib

Copy link
Copy Markdown
Contributor Author

v0.4 of GADF might be tagged soon. Should we add this also?

To me this seems reasonable, though in that case the same should also be done for the 3D EDISP, which was implemented in #300, for a full set of 3D IRF definitions.

Can gladly open a PR for this if desired.

Also I feel there is still need for discussion about the assumption of the PSF being still considered radially symmetric in the source offset. This is not considered in the GADF definition of the IRF axes at all, only offset w.r.t. source RAD. There is certainly asymmetry in this as well, I can provide some example plots showing this with Prod6 simulation data.

@maxnoe

maxnoe commented Nov 12, 2026

Copy link
Copy Markdown
Member

@bkhelifi Is support for these in Gammapy as straight forward as effective area?

If yes, no problem I think. But I thought only adding the effective area wouldn't need larger changes in gammapy.

@bkhelifi

Copy link
Copy Markdown

Today, it is not supported as it is not a standard format. The flow is: community format -> data producer and Gammapy implementation.

Otherwise, technically I provide you the following exemples of complex IRFs handling with Gammapy:
https://docs.gammapy.org/dev/tutorials/details/irfs.html#effective-area
https://indico.cta-observatory.org/event/6886/contributions/59657/attachments/31500/47229/gammapy_SAT_v2.pdf, p9

@maxnoe

maxnoe commented Nov 13, 2026

Copy link
Copy Markdown
Member

Thanks @bkhelifi, I know about the flow for direct builtin support. I was wondering mainly about how complex the changes to Gammapy would need to be once the format is established.

Looking at the page you linked, it explicitly mentions EDISP and PSF Table in fov_lon/fov_lat coordinates, so that looks like it is equally straight forward as AEFF.

In this case, @luca-dib I would invite you to also propose the EDISP and PSF versions in GADF, so they can be included like the AEFF in 0.4.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants