$\texttt{UFig v1}$: The ultra-fast image generator

Silvan Fischbacher,Beatrice Moser,Tomasz Kacprzak,Luca Tortorelli,Joerg Herbel,Claudio Bruderer,Uwe Schmitt,Alexandre Refregier,Joel Berge,Lukas Gamper,Adam Amara
2024-12-12
Abstract:With the rise of simulation-based inference (SBI) methods, simulations need to be fast as well as realistic. $\texttt{UFig v1}$ is a public Python package that generates simulated astronomical images with exceptional speed - taking approximately the same time as source extraction. This makes it particularly well-suited for simulation-based inference (SBI) methods where computational efficiency is crucial. To render an image, $\texttt{UFig}$ requires a galaxy catalog and a description of the point spread function (PSF). It can also add background noise, sample stars using the Besançon model of the Milky Way, and run $\texttt{SExtractor}$ to extract sources from the rendered image. The extracted sources can be matched to the intrinsic catalog, flagged based on $\texttt{SExtractor}$ output and survey masks, and emulators can be used to bypass the image simulation and extraction steps. A first version of $\texttt{UFig}$ was presented in Bergé et al. (2013) and the software has since been used and further developed in a variety of forward modelling applications.
Instrumentation and Methods for Astrophysics,Cosmology and Nongalactic Astrophysics
What problem does this paper attempt to address?
The problem that this paper attempts to solve is: in astronomical image simulation, how to generate astronomical images that are both fast and realistic to meet the requirements of the Simulation - Based Inference (SBI) method. Specifically, UFig v1 aims to support large - scale cosmological applications and model constraints by efficiently generating simulated images that include various observational effects (such as the Point Spread Function (PSF), background noise, etc.). ### Main Problems and Solutions 1. **Computational Efficiency**: - **Problem**: Although traditional image simulation tools can generate realistic images, they often require a large amount of computational resources and time, which makes them impractical in scenarios where a large number of simulations are required. - **Solution**: UFig v1 achieves extremely fast image generation speed by combining pixel - level and photon - level rendering methods. Its rendering time is comparable to the time required to extract sources from images, greatly shortening the computational time in the simulation process. 2. **Image Realism**: - **Problem**: In order to accurately compare simulated data with observed data, simulated images must include all necessary observational effects, such as PSF, background noise, and survey masks. - **Solution**: UFig v1 can not only add these effects but also flexibly adjust their parameters. For example, the PSF can be modeled by the Moffat distribution, and its distortion can be estimated using a Convolutional Neural Network (CNN). In addition, the background noise can be Gaussian or correlated noise to more realistically reflect the actual situation. 3. **Flexibility and Ease of Use**: - **Problem**: Different astronomical studies may require different types of image simulations, so a flexible and easy - to - configure tool is required. - **Solution**: UFig v1 is based on the ivy workflow engine and provides multiple plugins. Users can define the entire image generation process through a single configuration file, including selecting PSF models, background noise models, etc., thereby achieving highly customized simulations. ### Formula Example The Moffat distribution formula for PSF is: \[ I_i(r) = I_{0,i} \left(1 + \left(\frac{r}{\alpha_i}\right)^2\right)^{-\beta_i} \] where: - \( I_{0,i} \) is the intensity constant, - \( r \) is the radial distance, - \( \alpha_i \) is the scale parameter, - \( \beta_i \) is the shape parameter. This formula is used to describe the morphology of the point spread function, ensuring that galaxies and stars in the simulated images have realistic optical properties. Through these improvements, UFig v1 can significantly improve the simulation efficiency while ensuring the image quality, thereby better supporting complex cosmological research.