Point Spread Functions (PSF) Models

PSFCraft : Python Module for Point Spread Function (PSF) Simulation

psfcraft is a Python module designed to facilitate Point Spread Function (PSF) simulation and analysis. Whether you're working with optical systems, astronomical data, or any field requiring precise image analysis, psfcraft provides an intuitive and versatile toolkit. It allows you to create, modify, analyze, and visualize PSFs for various applications.

GitLab DOI PyPI Documentation

image info

Features

  • PSF Generation: Create accurate PSFs for optical systems with various apertures, wavelengths, and aberrations.

  • Aberration Modeling: Implement optical aberrations using Zernike polynomials, making it ideal for simulating real-world optical systems.

  • Image Analysis: Analyze PSFs, including calculating resolution, contrast, and other image quality metrics.

  • Noise Modeling: Add noise to simulate the effects of noise in optical imaging, making your simulations more realistic.

  • Customization: Tweak PSF parameters to match your specific requirements, allowing for a wide range of applications.

  • Vignetting and Centering Analysis: Study and correct vignetting effects and optical system centering using real mission data.

Installation

pip install psfcraft

Full documentation is available at https://psfcraft.dispers.in2p3.fr/index.html.

PSFCraft WebUI

An interactive, browser-based PSF visualisation tool distributed as a single static HTML file with no external dependencies. It runs entirely client-side and is suitable for presentations, outreach, and quick optical exploration.

Features: - Real-time PSF rendering with Zernike aberration sliders (defocus, astigmatism, coma, trefoil, spherical) - Aperture mask and wavefront error (WFE) map views - Split mode — two independent optical systems displayed side by side - Decomp mode — one PSF tile per Zernike term (isolated contribution) - Detector noise simulation (Poisson shot + Gaussian read noise) - Multiple colormaps, log/linear intensity scale, pixel binning

Visit the deployed version at https://psfcraft.dispers.in2p3.fr/webui/index.html.

PSF ZerNet

PSF ZerNet is a machine learning approach designed to analyze and reconstruct the optical imperfections (called "aberrations") of instruments like telescopes by studying their Point Spread Function (PSF)—essentially, how a single point of light appears when captured by the instrument. The PSF acts like a "fingerprint" of the instrument’s optical quality, revealing how light is distorted by imperfections in lenses or mirrors.

The ZerNet model uses a type of artificial intelligence called a neural network to connect these PSF images with Zernike polynomials, which are mathematical tools that describe different types of optical distortions (like defocus, astigmatism, or coma). By training on simulated PSF images, ZerNet learns to predict the specific types and amounts of these distortions, even when the PSF images are low-resolution or undersampled.

This approach is particularly useful for improving image quality in fields like astronomy, microscopy, or medical imaging, where understanding and correcting optical distortions can lead to clearer, more accurate images. ZerNet’s ability to work with limited data makes it a promising tool for real-world applications, where high-resolution information isn’t always available. The model’s performance improves with more data and higher wavelengths, demonstrating its potential to enhance how we analyze and correct optical systems.

SPREAD

SPREAD is an innovative method that uses advanced machine learning, specifically deep learning and diffusion-based denoising, to analyze and reconstruct the optical imperfections (called "aberrations") of instruments like telescopes or microscopes. These imperfections distort how the instrument captures light, and understanding them is crucial for improving image quality.

The core idea of SPREAD is to extract detailed information about these optical distortions directly from images of the Point Spread Function (PSF)—a pattern that shows how a single point of light appears when captured by the instrument. Traditionally, measuring these distortions requires specialized equipment and complex procedures. SPREAD simplifies this process by using artificial intelligence to learn the relationship between PSF images and the types of distortions present, without needing prior knowledge of the instrument’s design.

SPREAD combines three key components: 1. Denoising: It uses a diffusion-based model to clean up noisy PSF images, making it possible to work with real-world data where noise (like random fluctuations or detector errors) is often present. 2. Timestep Estimation: A small neural network predicts how much noise is in the image, guiding the denoising process. 3. Coefficient Estimation: Another neural network analyzes the cleaned-up PSF images to predict the specific types and amounts of optical distortions, described mathematically using Zernike polynomials.

This approach is particularly valuable because it works even with low-quality or noisy images, making it practical for real-world applications in astronomy, medical imaging, and microscopy. By accurately estimating distortions from PSF images alone, SPREAD offers a flexible and efficient way to improve the performance of optical systems, even in challenging conditions where traditional methods might fail.