There is a lot of interesting stuff to think about.
The sharpening kernels applied in photo editors don’t really sharpen an image in any sense that it removes blur brought on by optical imperfections. They are local in effect, just tweaking the contrast across edges. Optical imperfections spread the light out across the entire field, and to reverse them, in principal, you need the entire field to engage in the convolution.
If you had a perfect model of the optical system, you could, in principle, calculate the precise manner in which the diffraction spikes were created. But reversing this isn’t the same thing.
One, we have no phase information in the recorded image.
Next, we don’t have perfect spatial information in the image. Bright stars tend to leak into adjacent pixels.
The dynamic range of pixels is much less than the dynamic range of the field.
The information is quantised spatially (into pixels), in values by the digital conversion, and by the nature of photons.
There is a fundamental noise floor, something that astronomers tend to bump against.
So it is all lossy.
An approach can be to iteratively estimate the contribution made by the diffraction spikes, subtract them and refine. Each step we model the effect of the spider arms and hexagonal mirrors, of what we hope is an improving estimate of the actual field. Something akin to a maximum entropy technique might work.
The difference between diffraction artefacts and dark field or bad pixel elimination is that the latter are local defects. They don’t spread into adjacent pixels. They do however make deconvolving the diffraction even harder.
The effect of diffraction in the optical chain affects every pixel. You need a convolution that takes every pixel and affects every pixel to work out what has happened.
The effects of quantisation of the image are enough to mean that you can only go so far. You really want to know how much light was diffracted into every pixel originating in every object in the field of view. But the quantisation of the data means you can’t have it. Most of that information is below the quantisation limits, with probably no photons at all received to give you an estimate. So the deconvolution is going to suffer from quantisation artefacts. And clipping artefacts. These will often turn up as ringing in the spatial reconstruction.
The usual starting point is to take a 2D FFT of your image, and similarly take frequency space versions of your diffraction pattern, and work in that space. This is both computationally much nicer, but is also a natural space to work in. Thinking about trying to ameliorate optical issues in the Cartesian space isn’t a good fit, and you end up thinking in terms of local fixes (like sharpening edges) rather than the big picture.