PyTorchDIA: A flexible, GPU-accelerated numerical approach to Difference Image Analysis

James A. Hitchcock, Markus Hundertmark, Daniel Foreman-Mackey, Etienne Bachelet, Martin Dominik +2 more
4/28/2021
astro-ph.IM

Official code: jah1994/PyTorchDIA (16 stars, Jupyter Notebook, MIT, last commit 2026-04-15).

Abstract

We present a GPU-accelerated numerical approach for fast kernel and differential background solutions. The model image proposed in the Bramich (2008) difference image analysis algorithm is analogous to a very simple Convolutional Neural Network (CNN), with a single convolutional filter (i.e. the kernel) and an added scalar bias (i.e. the differential background).

Show full abstract

Here, we do not solve for the discrete pixel array in the classical, analytical linear least-squares sense. Instead, by making use of PyTorch tensors (GPU compatible multi-dimensional matrices) and associated deep learning tools, we solve for the kernel via an inherently massively parallel optimisation. By casting the Difference Image Analysis (DIA) problem as a GPU-accelerated optimisation which utilises automatic differentiation tools, our algorithm is both flexible to the choice of scalar objective function, and can perform DIA on astronomical data sets at least an order of magnitude faster than its classical analogue. More generally, we demonstrate that tools developed for machine learning can be used to address generic data analysis and modelling problems.

View on arXivView PDF

Code Implementations(1)

jah1994/PyTorchDIAOfficial100%
MIT

PyTorchDIA is a Difference Image Analysis tool. It is built around the PyTorch machine learning framework, and uses automatic differentiation and (optional) GPU support to perform lightning fast optimisations of image models.

164Jupyter Notebook, PythonJan 28, 20207 months agoMIT
astronomyimage-processing

Similar Papers

Cite this paper

@article{hitchcock2021pytorchdia,
  title  = {PyTorchDIA: A flexible, GPU-accelerated numerical approach to Difference Image Analysis},
  author = {James A. Hitchcock and Markus Hundertmark and Daniel Foreman-Mackey and Etienne Bachelet and Martin Dominik and Rachel Street and Yiannis Tsapras},
  year   = {2021},
  eprint = {2104.13715},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2104.13715}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2104.13715.svg)](https://codeofpaper.com/paper/2104.13715)

Discussion