sunpy / sunkit-instruments

A SunPy-affiliated package for solar instrument-specific tools.
https://docs.sunpy.org/projects/sunkit-instruments/
BSD 3-Clause "New" or "Revised" License
10 stars 14 forks source link

Convolution of Sunpy maps #113

Open afbattaglia opened 11 months ago

afbattaglia commented 11 months ago

Describe the feature

Hi everyone!

As discussed in the Element Sunpy group on 17-Oct-2023, I was wondering if there is a way to convolve Sunpy maps with externally provided functions. Specifically, I have an HMI map and for an optical design I'm working on, I need to convolve it with an artificial PSF of 10 arcsec FWHM. It seems that we cannot do this directly in Sunpy, but we can follow these steps: extract the array from the Sunpy map, apply scipy.ndimage.gaussian_filter, and then reconstruct the map.

This seems to be a common task, so it may be useful to have a direct method for doing it in Sunpy.

Proposed solution

A possible solution would be to create a method including the following steps: extract the array from the Sunpy map, apply scipy.ndimage.gaussian_filter, and then reconstruct the map.