---
title: Generalized PSF Fitting Methods
url: https://www.emergentmind.com/topics/generalized-point-spread-function-fitting-gpsf
type: topic
---

# Generalized PSF Fitting Methods

Generalized Point Spread Function Fitting (GPSF) denotes a family of inverse formulations in which the point spread function is fitted, calibrated, or embedded in a forward model under assumptions that are more general than a single Gaussian kernel, strict shift invariance, or a fixed low-dimensional basis. In the literature, the label has been used for sparse analog PSF calibration in fluorescence microscopy, spatially variant deconvolution in coherent imaging, semi-blind segmented PSF recovery from partially occulted images, basis-free neural phase-function fitting, PSF-inclusive beam-profile fitting for scintillating screens, and full-covariance multi-source template fitting in CMB polarization analysis [1809.01579] [1703.08974] [2207.03487] [2410.05413] [2411.03214] [2508.12019]. This suggests that GPSF is best understood as a methodological category defined by generalized PSF representations and generalized inverse operators, rather than as a single canonical algorithm.

## 1. Scope of the term and major formulations

The literature uses GPSF for several non-identical but structurally related problems. In each case, the PSF enters a forward model whose parameters are estimated from measured or simulated data.

| Domain | PSF representation | Inverse task |
|---|---|---|
| Fluorescence microscopy | Sparse Gaussian mixture | Variational calibration |
| Coherent imaging | Spatially variant kernel or transmission matrix | Generalized deconvolution |
| Partially occulted imaging | Segmented PSF weights | Semi-blind linear fitting |
| Neural PSF engineering | Implicit neural phase function | Basis-free PSF fitting |
| XFEL screen diagnostics | Simulated aberration and scintillator PSFs | Convolution-based beam fitting |
| CMB polarization | Beam-convolved source templates with full covariance | Multi-source subtraction |

In fluorescence microscopy, the PSF is modeled as a finite mixture of multivariate Gaussians, with the number of active kernels controlling an explicit accuracy-efficiency trade-off [1809.01579]. In coherent imaging, the generalization is spatial variance: the forward operator is a full kernel $H(x,y;x',y')$ rather than a shift-invariant convolution kernel [1703.08974]. In partially occulted images, the PSF is partitioned into segments whose weights are directly estimated from a multi-linear system [2207.03487]. In basis-free neural PSF engineering, the fitted object is the pupil-plane phase function $\phi(u,v)=f_\theta(u,v)$, from which the PSF is generated by wave optics [2410.05413]. In XFEL diagnostics, the PSF is simulated from aberrations and scintillator geometry and then included in the fitting function for a Gaussian beam [2411.03214]. In CMB polarization, GPSF refers to pixel-domain fitting of overlapping polarized point sources using the full covariance, including off-diagonal terms [2508.12019].

A common misconception is that PSF fitting is synonymous with fitting a single Gaussian or a single shift-invariant blur kernel. The GPSF literature explicitly departs from that restriction.

## 2. Shared mathematical structure

Despite their different application domains, GPSF methods share a common pattern: a forward operator maps latent object or source parameters to observed data, and PSF parameters or PSF-induced templates are estimated by minimizing a likelihood or a regularized loss.

For sparse analog calibration in fluorescence microscopy, the fitted PSF is
$$
h(x;\Theta)=\sum_{k=1}^M w_k\,\mathcal N(x;\mu_k,\Sigma_k),
$$
with $w_k\ge 0$ and $\sum_k w_k=1$. Calibration is formulated as
$$
\min_{\Theta} \|h(\Theta)*u-f\|_2^2+\lambda\sum_{k=1}^M \phi(w_k),
$$
and, under the convex relaxation $\phi(w_k)=|w_k|$, as
$$
\min_{w\ge 0}\|h(w)*u-f\|_2^2+\lambda\|w\|_1.
$$
Here $\lambda>0$ trades off fitting error versus sparsity of the mixture [1809.01579].

For coherent imaging without shift invariance, the forward model is
$$
g(x,y)=\iint H(x,y;x',y')\,f(x',y')\,dx'\,dy'+n(x,y),
$$
or, after discretization,
$$
g=Hf+n,
$$
where $H\in\mathbb C^{M\times M}$ is generally dense. A standard regularized solution is
$$
\hat f=(H^H H+\lambda I)^{-1}H^H g.
$$
This is the generalized image-deconvolution formulation based on spatially variant PSFs or an equivalent transmission matrix [1703.08974].

For partially occulted images, the PSF is partitioned into segments:
$$
h(x,y)\approx \sum_{i=1}^N w_i\,\phi_i(x,y),
$$
which yields a linear system
$$
Hw=b
$$
over occulted pixels. The weights are obtained by a non-negative least-squares or regularized fit, embedded in an iterative fit-deconvolution loop [2207.03487].

For basis-free neural fitting, the wave-optics forward model is
$$
PSF(x,y)=\left|\mathcal F\{e^{i\phi(u,v)}\cdot D(u,v)\}(x,y)\right|^2,
$$
with $\phi(u,v)=f_\theta(u,v)$ represented by a small multi-layer perceptron. Training minimizes point-wise MSE on the PSF [2410.05413].

For CMB polarization, the fitted object is a local source-template amplitude vector in a Gaussian likelihood,
$$
\chi^2(\beta_s)=(\mathbf d-\mathbf t)^T\Sigma^{-1}(\mathbf d-\mathbf t),
$$
where $\Sigma$ is the full pixel-pixel covariance for $Q/U$ data, including off-diagonal terms [2508.12019].

This recurrence of forward modeling plus regularized or covariance-weighted inversion is the main mathematical unifier of GPSF.

## 3. Sparse analog GPSF in fluorescence microscopy

In fluorescence microscopy, GPSF was introduced to improve reconstruction accuracy beyond the Gaussian model while preserving computational efficiency. The core representation is a sparse combination of Gaussian kernels that retains analog, continuous modeling needed for sub-pixel localization accuracy. A single Gaussian typically models only the central lobe, whereas real PSFs have “fat” tails, including side-lobes and asymmetries; mixing several Gaussians with different covariances $\Sigma_k$ and shifts $\mu_k$ provides a flexible model with closed-form convolution and fast evaluation, for example via FFT or IFGT [1809.01579].

The inverse problem is posed variationally. The ideal penalty on the number of active kernels is combinatorial and nonconvex, so it is replaced by an $\ell_1$ surrogate on the mixture weights. After solving the convex problem, small $w_k$ are thresholded to zero and the remaining weights may be refit on the pure $\ell_2$ term under positivity. To solve the large-scale convex program efficiently, the method uses a fully-split formulation with an Alternating Split Bregman scheme. The split variables separately handle data fidelity, $\ell_1$ shrinkage, and nonnegativity. For fixed $\{\mu_k,\Sigma_k\}$, the split-Bregman or ADMM theory gives convergence; in practice, $50$–$100$ ASB iterations suffice [1809.01579].

The key design variable is the support size
$$
s=|\operatorname{supp}(w)|,
$$
the number of active kernels. Accuracy may be measured by
$$
D=\|h(w)*u-f\|_2^2
$$
or normalized deviance. Varying $\lambda$ and the dictionary size $M$ traces out a curve $D(s)$: typically $D$ decreases as $s$ grows, but computation time $T$ grows roughly linearly with $s$. The paper recommends inspecting the “elbow” in $D(s)$ when choosing the model size [1809.01579].

Experimental validation is reported on synthetic Born–Wolf stacks and on real widefield/confocal data. The single-Gaussian model gives $\epsilon_{\text{pos}}\approx 1$–$2\,\mathrm{nm}$ but under-/over-estimates intensity and fails in tails. GPSF with $s\approx 30$–$100$ kernels halves the photometry error and slightly improves $\epsilon_{\text{pos}}$. A full Born–Wolf model is best in accuracy but approximately $10^3\times$ slower. A representative timing-and-deviance comparison lists SG with $D=3.82\mathrm e5$ and $T_{\text{iter}}=0.03\,\mathrm{ms}$, GPSF with small $s$ at $D=3.80\mathrm e5$, $s=27$, $T_{\text{iter}}=0.04\,\mathrm{ms}$, GPSF with medium $s$ at $D=3.68\mathrm e5$, $s=546$, $T_{\text{iter}}=0.16\,\mathrm{ms}$, and BW at $D=3.55\mathrm e5$ with $T_{\text{iter}}=442\,\mathrm{ms}$ [1809.01579].

## 4. Spatially variant and semi-blind GPSF

A second major line of work generalizes PSF fitting by abandoning shift invariance. In coherent optical imaging, the imaging system is represented by a spatially variant kernel $H(x,y;x',y')$ or, equivalently, by a transmission matrix. Full characterization is achieved by successively recording optical responses under various laser illumination angles controlled by a digital micro-mirror device. Input spectra vectors and output spectra are stacked into matrices $D$ and $C$, and the transmission matrix is computed as
$$
T=CD^{-1}.
$$
The inversion may be performed directly in the transmission-matrix formulation by SVD, or in object space through regularized least squares [1703.08974].

This generalized deconvolution is experimentally contrasted with conventional Fourier-domain deconvolution. For optical defocus, conventional and GPSF both achieve field-field correlation greater than $0.98$. For a tilted lens, conventional deconvolution gives approximately $0.70$, whereas GPSF gives approximately $0.92$. For a scattering layer, conventional deconvolution falls below $0.5$ and can be worse than the raw image, whereas GPSF achieves approximately $0.85$–$0.9$. The restored effective resolution reaches $\lesssim 0.8\,\mu\mathrm m$ line pairs, approaching the diffraction limit. Practical limitations include transmission-matrix measurement time, reported as approximately $30\,\mathrm s$ for $1{,}517$ angle steps at $67\,\mathrm{Hz}$, the memory and compute cost of a dense $H$, and noise amplification from small singular values, handled by $\lambda$-regularization [1703.08974].

A different semi-blind generalization derives the instrumental PSF from partially occulted images. Here the PSF is partitioned into nonoverlapping regions $\Omega_i$, with unknown weights $w_i\ge 0$. The occulted pixels provide linear equations in those weights, and the algorithm alternates between fitting $w$, reassembling the PSF, deconvolving the full image, and updating the current approximation of the true image under the mask constraint [2207.03487].

The reported guarantees are unusually explicit. The algorithm is described as guaranteed to converge towards the correct instrumental PSF for a large class of occultations, and, under mild conditions on the mask and segmentation, the solution is unique in the noise-free setting [2207.03487]. Quantitatively, the central weight of the PSF, interpreted as the fraction of photons not scattered by the instrument, is accurate to better than $1.2\%$. The mean absolute percentage error between reconstructed and true PSF is usually between $0.5\%$ and $5\%$ for the entire PSF, between $0.5\%$ and $5\%$ for the PSF core, and between $0.5\%$ and $3\%$ for the PSF tail [2207.03487].

Together, these two formulations show that “generalized” may refer either to a full space-variant forward operator or to a semi-blind segmented PSF estimate without a predefined functional form.

## 5. Basis-free neural and simulation-constrained fitting

A more recent extension generalizes PSF fitting at the level of the pupil function. In basis-free point spread function engineering, the phase is represented implicitly as
$$
\phi(u,v)=f_\theta(u,v),
$$
where $f_\theta:\mathbb R^2\to\mathbb R$ is a small multi-layer perceptron. The predicted PSF is
$$
PSF_{\text{pred}}(x,y,Z)=\left|\mathcal F\{e^{i\phi(u,v)}\cdot D(u,v;Z)\}(x,y)\right|^2,
$$
with uniform pupil amplitude. No explicit Tikhonov or TV regularizer is added; the network’s smoothness serves as an implicit regularization. The input uses “radial encoding” with $K_{\max}=10$ and encoding length $L=40$, and the network uses $4$–$6$ hidden fully connected layers of width $256$ with Leaky ReLU. Training is performed with Adam at initial learning rate $5\cdot 10^{-4}$, cosine-annealed to $1\cdot 10^{-4}$ over $10{,}000$ epochs, with batch size $1$ PSF per parameter update [2410.05413].

For random pupils, the method reports mean MSSIM $0.5634$ versus $0.1841$ with pixel-wise optimization, median PSNR $10.38\,\mathrm{dB}$ versus $6.653\,\mathrm{dB}$, and mean PSNR $8.672\,\mathrm{dB}$ versus $6.660\,\mathrm{dB}$. For Zernike pupils, the reported median MSSIM is $0.8525$ versus $0.8558$, while mean PSNR is $16.54\,\mathrm{dB}$ versus $14.00\,\mathrm{dB}$. An ablation on EDoF reports that pixel-wise optimization wins on very high-frequency phase, but with much more noise and artifacts; the MLP produces smooth, manufacturable $\phi$ [2410.05413]. The same summary presents this as a GPSF pipeline: collect target PSFs, build the differentiable forward operator, train with Adam plus cosine annealing for $5$–$20\,\mathrm{k}$ epochs, monitor MSSIM or PSNR, and export the learned phase at the target SLM resolution.

Another formulation is simulation-constrained rather than basis-free. For European XFEL scintillating screens, the PSF is decomposed into optical aberrations and scintillator-induced geometric spreading. The aberration term $PSF_{\text{aber}}(x,y)$ is approximated by a 2D Gaussian with width $\sigma_{\text{aber}}\approx 2.18\,\mu\mathrm m$ for the Schneider-Kreuznach $5.9/120$ objective and $\approx 2.6\,\mu\mathrm m$ for the $5.6/180$ objective. The scintillator term $PSF_{\text{scint}}(x)$ is fitted by a super-Gaussian comb of four lobes with power $10$. Assuming a 2D Gaussian beam profile
$$
G(x,y;\mu_x,\mu_y,\sigma_x,\sigma_y),
$$
the observed image is modeled as
$$
I(x,y)=\bigl[G*PSF_{\text{aber}}*PSF_{\text{scint}}\bigr](x,y),
$$
or, with background,
$$
I_{\text{fit}}(x,y)=I_{\text{convolved}}(x,y)+B.
$$
The free parameters are the beam centroid, beam widths, and background, while the PSF parameters are held fixed from Zemax fits and estimated by non-linear least squares, for example Levenberg–Marquardt [2411.03214].

These two cases enlarge GPSF in different directions: one removes the basis restriction in the pupil plane, and the other makes PSF simulation itself part of the fitting function.

## 6. Covariance-aware multi-source GPSF in CMB polarization

In CMB B-mode analysis, GPSF refers to a map-domain method for removing polarized point-source contamination. The data vector collects local $Q$ and $U$ pixels within a fitting region, and the background is modeled as Gaussian with full pixel-pixel covariance
$$
\Sigma_{ij}=\langle m_X^{\rm bkg}(\mathbf n_i)m_Y^{\rm bkg}(\mathbf n_j)\rangle,\qquad X,Y\in\{Q,U\},
$$
including off-diagonal terms between pixels and between Stokes components. A source at known position is described by a beam-convolved template, and overlapping sources are fitted jointly by minimizing the generalized $\chi^2$ over the source amplitudes [2508.12019].

The implementation proceeds in two stages. First, candidate sources are identified from an input catalog, sorted by polarized flux $P_s=\sqrt{Q_s^2+U_s^2}$, and tested in a local model including neighbors within $R_{\rm neigh}\simeq 2\times{\rm FWHM}$. Sources above a significance threshold $k_{\rm sig}\approx 3$–$5$ are retained. Second, nearby sources are partitioned into disjoint groups and fit simultaneously with the same covariance $\Sigma$; the best-fit templates are then subtracted from the observed maps. The method is designed for realistic conditions in which source blending is important, especially for small-aperture telescopes with large beams [2508.12019].

The method is integrated with Needlet Internal Linear Combination (NILC): GPSF is applied first on the multi-frequency $Q/U$ maps, after which the maps are smoothed to a common beam of $17'$ FWHM, corrected for EB leakage via the recycling method, decomposed into needlets, and combined using the standard ILC weight
$$
\mathbf w_{j,k}=\frac{\mathbf C_{j,k}^{-1}\mathbf a}{\mathbf a^T\mathbf C_{j,k}^{-1}\mathbf a}.
$$
The purpose is to remove resolved polarized sources before diffuse-component cleaning [2508.12019].

On simulations, the reported performance is explicit. For the tensor-to-scalar ratio $r$, “PS unmitigated” yields mean bias $\Delta r=1.67\times 10^{-3}$ with $\sigma_r=2.52\times 10^{-3}$. GPSF reduces the bias to $2.9\times 10^{-4}$, an $82\%$ reduction, with $\sigma_r=2.45\times 10^{-3}$, described as only a $2\%$ increase. Masking gives $\Delta r=1.19\times 10^{-3}$ with $\sigma_r=2.59\times 10^{-3}$, while inpainting yields $\Delta r\sim 1.05\times 10^{-2}$ with $\sigma_r=3.01\times 10^{-3}$. At the spectrum level, GPSF reduces residual $BB$ power by approximately $50\%$ at $\ell\sim 200$ with nearly unchanged variance, and, before NILC, yields the lowest residual across $\ell<240$ and $\ell>500$ with standard deviations at the ideal level [2508.12019].

This usage of GPSF is notable because the generalized object is neither the PSF itself nor the pupil function, but the statistical treatment of PSF-convolved source templates through a full covariance model.

## 7. Recurring design choices, limitations, and directions

Across the literature, GPSF methods recurrently exchange restrictive optics assumptions for richer representations and more expensive inversions. In sparse Gaussian mixtures, the principal control knob is the support size $s$, with an elbow search on $D(s)$ recommended for choosing the accuracy-efficiency operating point [1809.01579]. In spatially variant deconvolution, the main burden is the dense operator or transmission matrix, together with measurement time and the conditioning of the inverse [1703.08974]. In segmented semi-blind recovery, the practical issues are segmentation granularity, mask design, regularization choice, clustering of distant occulted pixels into super-pixels, bootstrap averaging, and hierarchical refinement [2207.03487]. In neural phase fitting, the stated limitation is the decay of the standard MLP plus positional-encoding spectrum at high frequencies; suggested remedies include periodic SIREN activations, higher-frequency Fourier features, transfer-learned initializations, and end-to-end optimization of upstream imaging metrics [2410.05413]. In CMB applications, performance depends on accurate beam knowledge, reliable input catalogs, and stable covariance estimation, and may degrade if source density is extremely high or beam non-Gaussianities are large beyond the symmetric Gaussian PSF assumption [2508.12019].

The most important interpretive point is terminological. “Generalized Point Spread Function Fitting” does not identify a single universally standardized formalism. Instead, it names a set of strategies that generalize PSF fitting along one or more axes: representation, spatial variance, blindness, physical forward modeling, basis choice, or statistical weighting. This suggests that the term functions as an umbrella for methods that keep the PSF—or PSF-convolved templates—inside the inverse problem at a higher fidelity than classical single-kernel fitting.

Source: https://www.emergentmind.com/topics/generalized-point-spread-function-fitting-gpsf