Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add a PSFKernel to perform PSF convolution on Maps #1447
This is a first commit to discuss.
Two function that take a TablePSF or an EnergyDependentTablePSF as well as a MapGeom are provided and are used to build the PSF kernel map.
The creators on PSFKernel ensure that there is an odd number of pixels for convolution.
A number of tests are present already and should be completed.
@registerrier - Thanks!
See my inline comments. Almost all of them are to reduce the amount of code and code duplication. At the moment there's ~ 20 lines of non-trivial code here that's duplicated for the 2D and 3D case for no good reason, and IMO the method to compute the kernel is unnecessarily complex (e.g. the solid angle multiplication), given that a caller has little control e.g. over PSF placement anyways (at least you don't show how to do it by preparing a
geom object that's centered on a source or expose a source position option at the moment in the constructor methods).