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 PSF convolve function #155
image = some ndarray psf = some EnergyDependentTablePSF
image2 = gammapy.image.psf_correlate(image, psf, many_extra_args)
which does these three steps:
table_psf = psf.table_psf_in_energy_band(some_extra_args) kernel = table_psf.kernel(some_extra_args) image2 = scipy.ndimage.convolve(image, kernel)
I'm not sure what this function does is useful / re-usable enough to warrant adding it.
Before you work more on this or we close it, let's look at your use case and see if there really is something worth splitting out into a separate function ... e.g. if there's code to PSF-convolve cubes and it automatically loops over the energy slices that might very well be worth adding it as a utility to make sure users don't have to re-implement it over and over.