This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Image Subtraction in Fourier Space

Lei Hu Purple Mountain Observatory
Nanjing 210023, People’s Republic of China
School of Astronomy and Space Sciences
University of Science and Technology of China
230026 Hefei People’s Republic of China
Lifan Wang Xingzhuo Chen Jiawen Yang George P. and Cynthia Woods Mitchell Institute for Fundamental Physics & Astronomy,
Texas A. & M. University, Department of Physics and Astronomy, 4242 TAMU, College Station, TX 77843, USA
(Received January 1, 0000; Revised January 1, 0000; Accepted January 1, 0000)
Abstract

Image subtraction is essential for transient detection in time-domain astronomy. The point spread function (PSF), photometric scaling, and sky background generally vary with time and across the field-of-view for imaging data taken with ground-based optical telescopes. Image subtraction algorithms need to match these variations for the detectionof flux variability. An algorithm that can be fully parallelized is highly desirable for future time-domain surveys. Here we show the Saccadic Fast Fourier Transform (SFFT) algorithm for image differencing. SFFT uses δ\delta-function basis for kernel decomposition, and the image subtraction is performed in Fourier Space. This brings about a remarkable improvement of computational performance of about an order of magnitude compared to other published image subtraction codes. SFFT can accommodate the spatial variations in wide-field imaging data, including PSF, photometric scaling, and sky background. However, the flexibility of the δ\delta-function basis may also make it more prone to overfitting. The algorithm has been tested extensively in real astronomical data taken by a variety of telescopes. Moreover, the SFFT code allows for the spatial variations of the PSF and sky background to be fitted by spline functions.

image subtraction, transient detection, time-domain survey
journal: ApJsoftware: Astropy (Astropy Collaboration et al., 2013), SciPy (Virtanen et al., 2020), Numpy (Harris et al., 2020), MatPlotLib (Hunter, 2007), CuPy (Okuta et al., 2017), PyCuda (Klöckner et al., 2012), Scikit-CUDA (Givon et al., 2019), Numba (Lam et al., 2015), SExtractor (Bertin & Arnouts, 1996), SWarp (Bertin, 2010), PSFEx (Bertin, 2011), HOTPANTS (Becker, 2015), ZOGY (Zackay et al., 2016), PyTorchDIA (Hitchcock et al., 2021), SFFT (Hu et al., 2021)

1 Introduction

Since Zwicky (1964), variable source identification from astronomical observations has played an indispensable role in time-domain astrophysics. However, the time and spatial variations of point spread function (PSF), the noises in the sources and the sky backgrounds, the optical distortions of the observing facilities, and many other effects barricade rapid and robust transient detection over wide sky areas. An efficient algorithm for calculating image differences is crucial in a broad range of astronomical observations of today. Examples include transient searches, as well as microlensing (Mao & Paczynski, 1991) and pixel lensing (Crotts, 1992; Baillon et al., 1993). The techniques of image differencing and co-addition are also of central importance to the next-generation survey telescope, such as the Legacy Survey of Space and Time (LSST) (Ivezić et al., 2019) and the Nancy Grace Roman Space Telescope.

To solve the PSF discrepancies between a pair of images taken at different epochs of the same field, Phillips & Davis (1995) and Tomaney & Crotts (1996) introduced a convolution kernel to match PSFs from one image to the other. They use a simple deconvolution solution to determine the kernel by calculating the ratio of the Fourier transform of a bright star or a pre-computed PSF of each image. However, this approach cannot guarantee optimal subtractions since the division in Fourier space is prone to numerical instability, especially in the noise-dominated high frequencies domain (Alard & Lupton, 1998; Zackay et al., 2016). Given that the PSFs are only modeled from the isolated stars with sufficient signal-to-noise ratios, the method has difficulty in using all statistically valid pixels in kernel determination, which makes it challenging to handle very crowded fields as in microlensing surveys. With the same goal of finding the matching kernel, Kochanski et al. (1996) moved the first step towards kernel determination without any direct knowledge of PSFs. They solved the problem by a least-squares fitting on the image-pair under consideration instead of extracting the light profiles. Nevertheless, the required computing time of the non-linear fitting introduced by Kochanski et al. (1996) is generally formidable (Alard & Lupton, 1998).

Soon after Kochanski et al. (1996), a “fork in this road” was signposted by the pioneering paper of Alard & Lupton (1998). They decomposed the convolution kernel into a basis of functions, converting the problem to be a linear least-squares question. To accommodate the varying PSFs across the image, Alard & Lupton (1998) modeled a spatially variant convolution kernel that evolves with image coordinates in a polynomial form. Subsequently, Alard (2000) simplified the calculations for constructing the least-squares matrix, making it possible to fit the kernel spatial variation with a reasonable computing cost. In the last two decades, the framework outlined in Alard & Lupton (1998) and Alard (2000) serves as the mathematical foundation upon which several successful transient survey programs have been built (e.g., Cao et al., 2016; Morganson et al., 2018; Price & Magnier, 2019). As the approach does not require the existence of isolated stars, it has been applied to very crowded fields, such as microlensing observations toward Galactic bulge (e.g., Sumi et al., 2003, 2006, 2013).

Alard & Lupton (1998) provided the essential building blocks of image subtraction, subsequent studies continue to move the field forward, with a focus on improving the kernel basis functions and developing kernel regularization techniques. The Gaussian basis functions adopted in Alard & Lupton (1998) only allow for incomplete expansion of the convolution kernels. As a result, the method is constrained by the bases’ intrinsic symmetry and hinders the ability to construct a “shape-free” kernel (Becker et al., 2012). Moreover, one has to configure a variety of hyper-parameters for the kernel basis, e.g., the number and width of the Gaussians. In order to achieve sheer kernel flexibility and minimize user-adjustable parameters, Bramich (2008) and Miller et al. (2008) introduced the delta basis functions (DBFs) for the construction of complete kernel space. With the DBFs, image subtraction is capable of compensating for the sub-pixel astrometric misalignment through an unconstrained flux redistribution within the scale of kernel size (Bramich, 2008; Becker et al., 2012). Albrow et al. (2009) confirmed the compelling advantage of DBFs by showing a distinct improvement in photometry accuracy over the traditional Gaussian basis functions. Bramich et al. (2013) further developed the DBFs-based approach by taking the spatially varying photometric scale into account, aimed to accommodate the variation of transparency and airmass across the field in wide-field surveys.

The flip side of the ultimate flexibility of DBFs is that the resulting kernel solution is more susceptible to noise. To alleviate the overfitting problem, Becker et al. (2012) conceived a Tikhonov regularization by adding a penalty term so that the solution would favor compact and smooth kernels. Masci et al. (2017) adopted an easily implemented way to regularize the kernel with DBFs for iPTF transient discovery. They used to solve the least-squares but dropped the eigenvalues with low statistical significance. Regularizing the kernel itself is not the unique option to fight against the overfitting problem. Bramich et al. (2016) found that using a parsimonious choice of unregularized DBFs might be an even better alternative.

Apart from the methods that stem from Alard & Lupton (1998), a numerically stable approach characterized by cross-convolution was proposed by Gal-Yam et al. (2008) and Yuan & Akerlof (2008). This strategy became more prevalent since Zackay et al. (2016) (hereafter ZOGY) presented a closed-form algorithm that yields the optimal subtraction for transient source detection. By its design, ZOGY can result in difference images with uncorrelated background noise. With the noise propagation during the image subtraction process, ZOGY claims optimal detection rates of transients with minimal subtraction artifacts.

In addition to the subtraction algorithms mentioned above, machine learning approaches are making their way into the field. Sedaghat & Mahabal (2018) recently suggested the use of deep convolutional neural networks instead of PSF-matching for transient detection. Hitchcock et al. (2021) (hereafter PyTorchDIA) proposed a novel machine learning approach to optimize the convolution kernel by making use of automatic differentiation in PyTorch instead of constructing a least-squares matrix.

We show in this paper that the entire imaging differencing process can be performed with Fast Fourier Transform (FFT). The FFT can be easily adapted to different computer environments for parallel processing. Our method, Saccadic Fast Fourier Transform (SFFT), provides a massively parallelizable framework for image subtraction and brings substantial processing speed acceleration when implemented on Graphical Processing Units (GPU). Apart from the gain in computing cost, SFFT can retain the crucial features that came from the advances in image subtraction since Alard & Lupton (1998), including (1) SFFT employs flexible DBFs as kernel basis functions; (2) SFFT can adequately handle the spatial variations of convolution kernel, photometric scale, and differential background; (3) SFFT does not rely on the availability and distribution of the observed stellar objects.

The paper is structured as the following: Section 2 provides the mathematical frameworks of SFFT. Section 3 introduces the implementation of SFFT and the details of the software pipeline. Section 4 shows the application of SFFT pipeline to data taken from a variety of telescopes. Section 5 presents the computing performance of SFFT, with comparisons to other existing image subtraction implementations. Section 6 discusses the limitations of SFFT and plans for future works. All the code about SFFT subtraction is available on Github111https://github.com/thomasvrussell/sfft.

2 Methodology of SFFT

2.1 Overview

As the core engine of transient detection, image subtraction is often the most computation-intensive individual task in the data processing pipeline. The ongoing trend of very massive data flow from time-domain surveys is making real-time data reduction increasingly challenging. It motivated us to develop a new tool to relieve the computational bottleneck while reconciling the subtraction performance and the computing cost.

The image subtraction algorithms emanated from Alard & Lupton (1998) have been broadly applied in astronomical transient surveys. Our proposed method SFFT is a new member of this category. The main purpose of the approach aims to perform PSF-matching via image convolution with pixelized kernels formulated as linear combinations of a pre-defined set of basis functions. The fact that astronomical images from wide-field surveys generally possess non-constant PSF across the entire field of view leads to spatial variations of the convolution kernels. Moreover, the spatial varying photometric scale also needs to be taken into account in order to match the images from wide-field surveys.

There have been some attempts to accelerate the calculations involved in image subtraction, either aimed at faster kernel determination or speed-up of the subtraction afterward. For image subtraction, constructing the least-squares matrix to solve the convolution kernels is computationally expensive, especially for spatial variant kernels. Alard (2000) proposed to fit the space-varying kernel on a set of sub-areas of the field, with a simple assumption that the kernel spatial variation within each sub-area can be negligible. The useful strategy has been adopted in the software HOTPANTS, a widely-used implementation of Alard & Lupton (1998). Apart from the efficient simplification in computing, the flexibility of using sub-areas has some additional benefits in practice. One may pre-select an optimal set of sub-areas to exclude the sources in observational data that cannot be perfectly modeled by the image subtraction algorithm. Doing so can also avoid the fitting being strongly misled by specific regions of the field (e.g., the brightest and densest regions).

Very recently, Hitchcock et al. (2021) provided an innovative way (i.e., PyTorchDIA) to bypass the construction of the analytical least-squares matrix. PyTorchDIA finds the kernel solution by optimizing a loss function using the automatic differentiation in PyTorch, which brings a considerable gain in computing cost compared with Bramich (2008). However, PyTorchDIA is incompatible with kernel spatial variation and can only solve a constant kernel for image subtraction. In addition to the efforts on kernel determination, Hartung et al. (2012) successfully implemented fast image convolution with spatial-varying kernel on GPUs, which helps accelerate the subtraction after the convolution kernel has been computed.

The strategy of SFFT is different from the methods mentioned above: we present the least-squares question in Fourier space. By Parseval’s theorem, a least-squares minimization in real space is equivalent to a least-squares minimization in Fourier’s domain. Given that δ\delta-functions have higher flexibility and can maintain simple forms after Fourier transform, here we adopt the DBFs as the kernel basis functions following Bramich (2008) and Miller et al. (2008). Finally, SFFT allows for spatial variations across the field, whether from PSF, photometric scaling, or sky background. The following section will show how the calculations for image subtraction can be reduced to be FFTs and element-wise matrix operations.

2.2 Derivation of Subtraction

Given a reference image RR and a science image SS, PSF-homogenization is carried out by convolving RR or SS with a spatially-varying kernel Kx,yK_{x,y}. Considering that the sky background between the two epochs may change, we introduce an additional term BB to model the sky background difference between the two images. The image subtraction problem can be written in real space as the minimization of the difference image DD, defined as

D(x,y)=S(x,y)𝑑u𝑑vR(xu,yv)Kx,y(u,v)B(x,y)=S(x,y)(RK)(x,y)B(x,y),\begin{split}D(x,y)=S(x,y)&-\int\int dudvR(x-u,y-v)K_{x,y}(u,v)\\ &-B(x,y)\\ =S(x,y)&-(R\circledast K)(x,y)-B(x,y),\end{split} (1)

where the input images RR and SS are image with dimensions (N0,N1)(N_{0},N_{1}), and xx and yy are indices in the ranges of [0,N01][0,N_{0}-1] and [0,N11][0,N_{1}-1], respectively. Note that the kernel Kx,yK_{x,y} is spatially varying, so the integral in the equation above, strictly speaking, is not a convolution, such an integral is denoted by RKR\circledast K. The differential background map BB is modeled as a polynomial form following Alard & Lupton (1998), that is,

B(x,y)=pqbpqxpyqB(x,y)=\sum_{pq}b_{pq}x^{p}y^{q} (2)

where the polynomial power indices pp and qq are in the range of [0,DB][0,D_{B}] and [0,DBp][0,D_{B}-p], respectively. We follow Miller et al. (2008); Hartung et al. (2012) to decompose the kernel Kx,yK_{x,y} into the “shape-free” δ\delta-function basis 𝒦\mathcal{K}. The kernel dimension is assumed to be (L0,L1)(L_{0},L_{1}), with L0L_{0} and L1L_{1} being odd integers, such that L0=2w0+1L_{0}=2w_{0}+1 and L1=2w1+1L_{1}=2w_{1}+1. We assume

𝒦00(u,v)=𝒟00(u,v)=δ(u,v),\mathcal{K}_{00}(u,v)=\mathcal{D}_{00}(u,v)=\vec{\delta}(u,v), (3)

and,

𝒦αβ(u,v)=𝒟αβ(u,v)𝒟00(u,v)=δ(uα,vβ)δ(u,v)\begin{split}\mathcal{K}_{\alpha\beta}(u,v)&=\mathcal{D}_{\alpha\beta}(u,v)-\mathcal{D}_{00}(u,v)\\ &=\vec{\delta}(u-\alpha,v-\beta)-\vec{\delta}(u,v)\end{split} (4)

where 𝒟αβ(u,v)=δ(uα,vβ)\mathcal{D}_{\alpha\beta}(u,v)=\vec{\delta}(u-\alpha,v-\beta) is the standard Cartesian orthonormal basis, which consists of δ\delta functions at each kernel pixel, α\alpha and β\beta are indices in the range of [w0,w0+1)[-w_{0},w_{0}+1) and [w1,w1+1)[-w_{1},w_{1}+1), respectively, u and v are kernel coordinate indices in the range of [w0,w0+1)[-w_{0},w_{0}+1) and [w1,w1+1)[-w_{1},w_{1}+1), respectively, and δ\vec{\delta} is a binary function on integers: δ(ρ,ϵ)=1\vec{\delta}(\rho,\epsilon)=1 if ρ=ϵ=0\rho=\epsilon=0, otherwise δ(ρ,ϵ)=0\vec{\delta}(\rho,\epsilon)=0 with ρ\rho and ϵ\epsilon being any integers. With such a construction, the sum of the convolution kernel is uniquely determined by the coefficient of the basis vector 𝒦00\mathcal{K}_{00}, which simplifies the way we control the photometric scaling through convolution.

The spatial variation of the kernel can be fitted by the sum of the kernel function given above, modulated by a two-dimensional polynomial function to account for their varying contributions across the image field

Kx,y=αβÅxyαβ𝒦αβK_{x,y}=\sum_{\alpha\beta}\mathring{A}_{xy\alpha\beta}\mathcal{K}_{\alpha\beta} (5)
Åxyαβ=ijåijαβxiyj,\mathring{A}_{xy\alpha\beta}=\sum_{ij}\mathring{a}_{ij\alpha\beta}x^{i}y^{j}, (6)

where the polynomial power indices ii and jj are in the range of [0,DK][0,D_{K}] and [0,DKi][0,D_{K}-i], respectively. The spatial variation information of the kernel is encoded in the coefficients åijαβ\mathring{a}_{ij\alpha\beta}, which will be eventually solved by the subsequent linear system during the minimization of the residuals. More specifically, once åijαβ\mathring{a}_{ij\alpha\beta} is known, we can calculate Åxyαβ\mathring{A}_{xy\alpha\beta} for any given pixel coordinate (x,y)(x,y) following Equation (6), and further derive the certain kernel associated with the pixel via the expansion on δ\delta-function basis by Equation (5).

Equations (2), (5) and (6) can be replaced by more complex functions. The code we have developed includes an option for using B-splines to model the PSF and background level variations. For the B-splines cases, the space-varying kernel Kx,yK_{x,y} and differential background B(x, y) are modeled as

Kx,y=αβÅxyαβ𝒦αβK_{x,y}=\sum_{\alpha\beta}\mathring{A}_{xy\alpha\beta}\mathcal{K}_{\alpha\beta} (7)
Åxyαβ=ijåijαβBi;k,t(x)Bj;k,t(y)\mathring{A}_{xy\alpha\beta}=\sum_{ij}\mathring{a}_{ij\alpha\beta}B_{i;k,t}(x)B_{j;k,t}(y) (8)

and

B(x,y)=pqbpqBp;k,t(x)Bq;k,t(y)B(x,y)=\sum_{pq}b_{pq}B_{p;k^{\prime},t^{\prime}}(x)B_{q;k^{\prime},t^{\prime}}(y) (9)

where Bp;k,tB_{p;k,t} (Bp;k,tB_{p;k^{\prime},t^{\prime}}) are B-spline basis functions of degree k (kk^{\prime}) and knots t (tt^{\prime}). For simplicity, in this paper we focus only on the performance with polynomial models.

The pixel-to-pixel flux variations of the two images are accounted for by the coefficients Åxy00=ijåij00xiyj\mathring{A}_{xy00}=\sum_{ij}\mathring{a}_{ij00}x^{i}y^{j}. If we consider the flux level of the image-pair to be well-calibrated, the constant flux scaling between images requires a constant kernel integral, that is, Åxy00=å0000\mathring{A}_{xy00}=\mathring{a}_{0000}. Note that a constant flux scaling was first presented in Alard & Lupton (1998). Having a constant photometric ratio across the entire field is optional in our program. Like Bramich et al. (2013), SFFT allows for space-varying flux scaling with a polynomial form to accommodate the effect of imperfect flat-field correction or cirrus cloud attenuation. Note that the current SFFT does not disentangle the polynomial degrees of spatial variations accounting for the convolution kernel and the photometric sensitivity.

With abbreviation Tρϵ(x,y)=xρyϵT^{\rho\epsilon}(x,y)=x^{\rho}y^{\epsilon} and Rρϵ=TρϵRR^{\rho\epsilon}=T^{\rho\epsilon}R ,where ρ\rho and ϵ\epsilon are any integers, Equation (1) is rewritten as,

D(x,y)=S(x,y)ijαβåijαβ[Tij(R𝒦αβ)](x,y)pqbpqTpq(x,y).\begin{split}D(x,y)=S(x,y)&-\sum_{ij\alpha\beta}\mathring{a}_{ij\alpha\beta}[T^{ij}(R\circledast\mathcal{K}_{\alpha\beta})](x,y)\\ &-\sum_{pq}b_{pq}T^{pq}(x,y).\end{split} (10)

The convolution kernel is typically very small in size, at such scale its spatial variation is expected to be negligible locally. An approximation (see Appendix A) can be made by moving the polynomial functions describing the spatial variation outside the integral in Equation (1). This leads to

D(x,y)=S(x,y)ijαβåijαβ(Rij𝒦αβ)(x,y)pqbpqTpq(x,y),\begin{split}D(x,y)=S(x,y)&-\sum_{ij\alpha\beta}\mathring{a}_{ij\alpha\beta}(R^{ij}\circledast\mathcal{K}_{\alpha\beta})(x,y)\\ &-\sum_{pq}b_{pq}T^{pq}(x,y),\end{split} (11)

and,

D(x,y)=S(x,y)ijαβåijαβRij𝒦αβpqbpqTpq.D(x,y)=S(x,y)-\sum_{ij\alpha\beta}\mathring{a}_{ij\alpha\beta}R^{ij}\circ\mathcal{K}_{\alpha\beta}-\sum_{pq}b_{pq}T^{pq}. (12)

Note the notation \circ in Equation (12)(\ref{eqn:sfft_eq12}) indicates circular convolution and 𝒦αβ\mathcal{K}_{\alpha\beta} can be estimated to generate the convoluted source image that best matches the PSF of the reference image across the entire field.

The δ\delta-function basis we have adopted for 𝒦\mathcal{K} as shown in equations (3) and (4) allows for a simple Fourier space representation of the image difference procedure. In Fourier space Equation (12) becomes

D^=S^ijαβaijαβRij^𝒦αβ^pqbpqTpq^,\widehat{D}=\widehat{S}-\sum_{ij\alpha\beta}a_{ij\alpha\beta}\widehat{R^{ij}}\widehat{\mathcal{K}_{\alpha\beta}}-\sum_{pq}b_{pq}\widehat{T^{pq}}, (13)

where the symbols with a hat denote the Fourier transform of the images, aijαβ=N0N1åijαβa_{ij\alpha\beta}=N_{0}N_{1}\mathring{a}_{ij\alpha\beta} with N0N_{0} and N1N_{1} being the dimensional of the images in xx and yy, respectively. The Discrete Fourier Transform (DFT) of the basis function has the simple form

𝒦αβ^(l,m)=\widehat{\mathcal{K}_{\alpha\beta}}(l,m)= 1N0N1(WN0lαWN1mβ1)\frac{1}{N_{0}N_{1}}({W_{N_{0}}^{l\alpha}W_{N_{1}}^{m\beta}-1}) if α\alpha or β\beta 0\neq 0
= 1/N0N11/{N_{0}N_{1}} if α\alpha = β\beta = 0,
(14)

here WN0=ei2π/N0W_{N_{0}}=e^{-i2\pi/N_{0}} and WN1=ei2π/N1W_{N_{1}}=e^{-i2\pi/N_{1}}, with ii being the unitary imaginary number.

Now define G=D^D^G=\widehat{D}\widehat{D}^{*}, where stands for complex conjugate, we find,

G=2(S^)2ijαβaijαβ[S^Rij^𝒦αβ^]+2ijαβpqaijαβbpq[Rij^𝒦αβ^(Tpq^)]+ijαβijαβaijαβRij^𝒦αβ^aijαβ(Rij^)(𝒦αβ^)2pqbpq[S^Tpq^]+pqpqbpqTpq^bpq(Tpq^).\begin{split}G&=2\Re(\widehat{S})-2\sum_{ij\alpha\beta}a_{ij\alpha\beta}\Re\;[\widehat{S}^{*}\widehat{R^{ij}}\widehat{\mathcal{K}_{\alpha\beta}}]\\ &+2\sum_{ij\alpha\beta}\sum_{pq}a_{ij\alpha\beta}b_{pq}\Re\;[\widehat{R^{ij}}\widehat{\mathcal{K}_{\alpha\beta}}(\widehat{T^{pq}})^{*}]\\ &+\sum_{ij\alpha\beta}\sum_{i^{\prime}j^{\prime}\alpha^{\prime}\beta^{\prime}}a_{ij\alpha\beta}\widehat{R^{ij}}\widehat{\mathcal{K}_{\alpha\beta}}a_{i^{\prime}j^{\prime}\alpha^{\prime}\beta^{\prime}}(\widehat{R^{i^{\prime}j^{\prime}}})^{*}(\widehat{\mathcal{K}_{\alpha^{\prime}\beta^{\prime}}})^{*}\\ &-2\sum_{pq}b_{pq}\Re\;[\widehat{S}^{*}\widehat{T^{pq}}]+\sum_{pq}\sum_{p^{\prime}q^{\prime}}b_{pq}\widehat{T^{pq}}b_{p^{\prime}q^{\prime}}(\widehat{T^{p^{\prime}q^{\prime}}})^{*}.\end{split} (15)

Our goal of optimal subtraction is to minimize the power of the difference image in Fourier space, as given in Equation (15). Let F=l,mG(l,m)F=\sum_{l,m}G(l,m), the minimization in Fourier space for image subtraction has a simple least-square solution given by F=0\nabla F=0 where the gradients are calculated with respect to all the parameters for image matching,

F/ai¯j¯α¯β¯=lm{2[S^Ri¯j¯^𝒦α¯β¯^]+2ijαβaijαβ[(Rij^)(𝒦αβ^)Ri¯j¯^𝒦α¯β¯^]+2pqbpq[Ri¯j¯^𝒦α¯β¯^(Tpq^)]}(l,m)=0\begin{split}\partial F/\partial a_{\bar{i}\bar{j}\bar{\alpha}\bar{\beta}}&=\sum_{lm}\{-2\Re\;[\widehat{S}^{*}\widehat{R^{\bar{i}\bar{j}}}\widehat{\mathcal{K}_{\bar{\alpha}\bar{\beta}}}]\\ &+2\sum_{ij\alpha\beta}a_{ij\alpha\beta}\Re\;[(\widehat{R^{ij}})^{*}(\widehat{\mathcal{K}_{\alpha\beta}})^{*}\widehat{R^{\bar{i}\bar{j}}}\widehat{\mathcal{K}_{\bar{\alpha}\bar{\beta}}}]\\ &+2\sum_{pq}b_{pq}\Re\;[\widehat{R^{\bar{i}\bar{j}}}\widehat{\mathcal{K}_{\bar{\alpha}\bar{\beta}}}(\widehat{T^{pq}})^{*}]\}(l,m)\\ &=0\end{split} (16)
F/bp¯q¯=lm{2[S^Tp¯q¯^]+2ijαβaijαβ[(Rij^)(𝒦αβ^)Tp¯q¯^]+2pqbpq[(Tpq^)Tp¯q¯^]}(l,m)=0\begin{split}\partial F/\partial b_{\bar{p}\bar{q}}&=\sum_{lm}\{-2\Re\;[\widehat{S}^{*}\widehat{T^{\bar{p}\bar{q}}}]\\ &+2\sum_{ij\alpha\beta}a_{ij\alpha\beta}\Re\;[(\widehat{R^{ij}})^{*}(\widehat{\mathcal{K}_{\alpha\beta}})^{*}\widehat{T^{\bar{p}\bar{q}}}]\\ &+2\sum_{pq}b_{pq}\Re\;[(\widehat{T^{pq}})^{*}\widehat{T^{\bar{p}\bar{q}}}]\}(l,m)\\ &=0\end{split} (17)

Equations (16)(\ref{eqn:sfft_eq16}) and (17)(\ref{eqn:sfft_eq17}) form a linear system with the array elements shown in Equation (18)(\ref{eqn:sfft_eq18}).

[\left[\vbox{\hrule height=51.97035pt,depth=51.97035pt,width=0.0pt}\right.]\left.\vbox{\hrule height=51.97035pt,depth=51.97035pt,width=0.0pt}\right]Ai¯j¯α¯β¯ijαβA_{\bar{i}\bar{j}\bar{\alpha}\bar{\beta}ij\alpha\beta}Bi¯j¯α¯β¯pqB_{\bar{i}\bar{j}\bar{\alpha}\bar{\beta}pq}B~p¯q¯ijαβ\tilde{B}_{\bar{p}\bar{q}ij\alpha\beta}Cp¯q¯pqC_{\bar{p}\bar{q}pq} {\left\{\vbox{\hrule height=51.97035pt,depth=51.97035pt,width=0.0pt}\right.}\left.\vbox{\hrule height=51.97035pt,depth=51.97035pt,width=0.0pt}\right\}ai¯j¯α¯β¯a_{\bar{i}\bar{j}\bar{\alpha}\bar{\beta}}bpqb_{pq}== {\left\{\vbox{\hrule height=51.97035pt,depth=51.97035pt,width=0.0pt}\right.}\left.\vbox{\hrule height=51.97035pt,depth=51.97035pt,width=0.0pt}\right\}Di¯j¯α¯β¯D_{\bar{i}\bar{j}\bar{\alpha}\bar{\beta}}Ep¯q¯E_{\bar{p}\bar{q}} (18)

The elements of Equation (18) are given explicitly as the following,

Ai¯j¯α¯β¯ijαβ=lm{[Ri¯j¯^𝒦α¯β¯^(Rij^)(𝒦αβ^)]}(l,m),A_{\bar{i}\bar{j}\bar{\alpha}\bar{\beta}ij\alpha\beta}=\sum_{lm}\{\Re\;[\widehat{R^{\bar{i}\bar{j}}}\widehat{\mathcal{K}_{\bar{\alpha}\bar{\beta}}}(\widehat{R^{ij}})^{*}(\widehat{\mathcal{K}_{\alpha\beta}})^{*}]\}(l,m), (19)
Bi¯j¯α¯β¯pq=lm{[Ri¯j¯^𝒦α¯β¯^(Tpq^)]}(l,m),B_{\bar{i}\bar{j}\bar{\alpha}\bar{\beta}pq}=\sum_{lm}\{\Re\;[\widehat{R^{\bar{i}\bar{j}}}\widehat{\mathcal{K}_{\bar{\alpha}\bar{\beta}}}(\widehat{T^{pq}})^{*}]\}(l,m), (20)
B~p¯q¯ijαβ=lm{[Tp¯q¯^(Rij^)(𝒦αβ^)]}(l,m),\tilde{B}_{\bar{p}\bar{q}ij\alpha\beta}=\sum_{lm}\{\Re\;[\widehat{T^{\bar{p}\bar{q}}}(\widehat{R^{ij}})^{*}(\widehat{\mathcal{K}_{\alpha\beta}})^{*}]\}(l,m), (21)
Cp¯q¯pq=lm{[Tp¯q¯^(Tpq^)]}(l,m),C_{\bar{p}\bar{q}pq}=\sum_{lm}\{\Re\;[\widehat{T^{\bar{p}\bar{q}}}(\widehat{T^{pq}})^{*}]\}(l,m), (22)
Di¯j¯α¯β¯=lm{[S^Ri¯j¯^𝒦α¯β¯^]}(l,m),D_{\bar{i}\bar{j}\bar{\alpha}\bar{\beta}}=\sum_{lm}\{\Re\;[\widehat{S}^{*}\widehat{R^{\bar{i}\bar{j}}}\widehat{\mathcal{K}_{\bar{\alpha}\bar{\beta}}}]\}(l,m), (23)
Ep¯q¯=lm{[S^Tp¯q¯^]}(l,m).E_{\bar{p}\bar{q}}=\sum_{lm}\{\Re\;[\widehat{S}^{*}\widehat{T^{\bar{p}\bar{q}}}]\}(l,m). (24)

These equations can be further simplified as shown in Appendix B. Finally, the difference image DD is calculated from Equation (13) with applying the linear system solution {,aijab,,bpq,}\{...,a_{ijab},...,b_{pq},...\} of Equation (18). Given that the difference image will possess correlated noise on the background, we present a decorrelation process to whiten the background noise in Appendix C.

3 The implementation of SFFT

Refer to caption
Figure 1: Morphological classifier in sparse-flavor SFFT demonstrated by an arbitrary DECam image of Legacy Survey (Blum et al., 2016). The classifier is based on the photometric results of the image using SEXTRACTOR. The data points show the relationship between instrumental magnitude (SEXTRACTOR catalog value MAG_AUTO) and flux radius (SEXTRACTOR catalog value FLUX_RADIUS) for the detected objects with SEXTRACTOR catalog value FLAG being zero. We also group the data by the morphological types in the Tractor catalog of Legacy Survey (Blum et al., 2016) showing with different markers in the figure. The dashed black line is detected by Hough Transformation as the strongest straight line feature with vertical orientation. Two dotted lines are parallel to the dashed line with fixed separation being 0.2 (SFFT parameter -BeltHW), the region between which is referred to as point-source-belt.
Table 1: Technical Specification of the Instruments
Instrument Telescope Pixel Scale Field of View Field Property Comments
(m) (arcsec/pix) (deg2)
   ZTF      1.2 1.0\quad\quad 1.0       47.0      crowded          M31
   AST3-II      0.5 1.0\quad\quad 1.0       4.3      crowded          LMC
   TESS   4×0.1\quad\,\,4\times 0.1 21.0\quad\quad 21.0 4×576.0\quad\quad 4\times 576.0      crowded          space-based
   DECam      4.0 0.262\quad\quad 0.262       3.0      sparse          -
   TMTS   4×0.4\quad\,\,4\times 0.4 1.86\quad\quad 1.86 4×4.5\quad\quad 4\times 4.5      sparse          CMOS detectors

We have presented the mathematical derivation of the SFFT image difference algorithm in Section 2.2. In a nutshell, to calculate the difference image DD from a pair of the reference image (RR) and science image (SS), one can first search for the optimal parameters {,aijab,,bpq,}\{...,a_{ijab},...,b_{pq},...\} by minimizing the power of the resulting difference image of RR and SS in Fourier space via a linear system described in Equation (18). Subsequently, one needs to apply the solution to match image RR to image SS following Equation (13) and get the ultimate difference image DD.

However, saturated sources with a significant non-linear response, casual cosmic rays and moving objects, bad CCD pixels, optical ghosts, and even the variable objects and transients themselves can severely affect the construction of reliable convolution kernels. These objects can be seen as distractions for image subtraction (hereafter referred to as distraction-sources), which are hardly modeled by the image subtraction algorithm but ubiquitous in real observations. We need further to offer an effective channel to prevent the distraction-sources in RR and SS from contributing to the parameter-solving process. One likely choice is to deweight those trivial pixels, but it appears to be tricky to formulate the weight assignment in Fourier space. Instead, we found that a more straightforward approach by adequate image masking is easier to implement and can perform well enough in our study.

In the current implementation of SFFT, image subtraction is developed as a two-step process. First, make a masked version of reference image RR and science image SS, denoted as R˘\breve{R} and S˘\breve{S}, respectively. Second, solve the linear system in Equation (18) using the masked image-pair R˘\breve{R} and S˘\breve{S}, then apply the solution to calculate the difference image DD of the original image-pair RR and SS following Equation (13). The SFFT algorithm does not rely on isolated stellar objects to construct PSF-matching kernels, thereby performing equally well for the observations taken in crowded and sparse fields. Our software provides two flavors for image subtraction, crowded-flavor and sparse-flavor, to accommodate the situations for both crowded and sparse fields. But the flavor for crowded fields can also work for sparse fields, only that the results may be affected by the large number of noisy background pixels that do not contribute to the construction of the convolution kernel. The two flavors follow the same routine for image subtraction and differ only in ways of masking the data.

3.1 Preprocessing for Crowded-Flavor SFFT

Applying SFFT is straightforward for signal-dominated crowded fields. Mostly, saturation is the predominant factor in all distraction-sources for crowded fields. The crowded-flavor SFFT will automatically mask the pixels affected by the saturated sources in the field and replace them with the neighboring background. To further reduce image matching errors, it is allowed to use a more elaborate customized mask instead, e.g., to include the pixels affected by known variables and transients in the field.

3.2 Preprocessing for Sparse-Flavor SFFT

On the flip side, the sparse-flavor SFFT is relatively more sophisticated on image masking. We select a set of sources of astronomical significance in the field and mask all other irrelevant regions so that the selected objects can dominate the parameters-solving process. It is reminiscent of the similar strategy in HOTPANTS, which fits on the rectangle stamps (i.e., “sub-stamps” in HOTPANTS terminology) encompassing selected astronomical objects. The analogous intention of both methods is to restrict the calculation on a properly pre-selected set of sources to eliminate the effect of distraction-sources on the solution of convolution kernels. In this scheme, the regions masked by SFFT have also included abundant background pixels. This is a reasonable consideration in our framework. Pixel uncertainty is not considered as weights in SFFT subtraction. Accordingly, the overwhelming noise-dominated background pixels are more likely to degrade the construction of accurate PSF-matching kernels rather than to contribute (see the same consideration in Kochanski et al. (1996)).

In practice, the input image-pair of sparse-flavor SFFT is required to be sky subtracted. This requirement is to simplify the image-masking process so that all the pixels enclosed in masked regions can be replaced by a constant of zero. As a result, the differential background term in the SFFT algorithm becomes trivial as the background offset between the input image-pair has been minimized by sky subtraction. That is to say, we pass on the function of matching differential background, which was embedded in numerical calculations of SFFT, to a customized sky subtraction as a preliminary process. Fortunately, modeling sky background is usually feasible in sparse fields (e.g., using an interpolation-based method). Note this requirement is not a prerequisite for crowded-flavor SFFT. This is because properly modeling sky background can be tricky for crowded fields: the modeled sky is more susceptible to being biased by the signal harboring in the pixels misidentified as background (e.g., the outskirts of nearby galaxies, see Akhlaghi & Ichikawa (2015)).

We developed a morphological classifier to carry out the source selection in sparse-flavor SFFT. The classifier was initially proposed for PSFEx (Bertin, 2011), which enables PSFEx to select a subset of point sources for constructing the PSF model. Given a photometry catalog generated by SEXTRACTOR (Bertin & Arnouts, 1996), one can draw a figure of instrumental magnitudes (SEXTRACTOR catalog value MAG_AUTO) against flux radius (SEXTRACTOR catalog value FLUX_RADIUS) for all detected photometry objects. Generally, bright point sources tend to stay around a nearly vertical straight line on this figure. PSFEx leverages the statistical feature to select appropriate samples to establish the PSF model. Although the goal of source selection for sparse-flavor SFFT is not entirely aligned to that for PSFEx, it inspires us to make the selection based on SEXTRACTOR parameters and their statistical characters.

To demonstrate the source selection criterion in sparse-flavor SFFT, we show an example of an individual DECam (Honscheid & DePoy, 2008) image in Figure 1. By contrast, the SEXTRACTOR photometry catalog of this image is cross-matched with the Tractor catalog from Legacy Survey (Blum et al., 2016), which offers their own fitted morphological types. As shown in Figure 1, the point sources and extended sources form two conspicuous branches, which intersect at the faint end but become well-separated towards the bright side. According to the Tractor types, the branch with a nearly vertical orientation primarily comprises point-like sources with Tractor type PSF, while the extended sources with Tractor types DEV, EXP, REX are likely to be found in the other branch that sprawls out horizontally. Moreover, the discrete gray dots represent the objects that cannot be found in the Tractor catalog, which are casual detections such as cosmic rays. SFFT uses Hough Transformation (Hough, 1959) to identify the straight line surrounded by the branch of point sources. The figure is first pixelized by counting the number of objects in each small grid. Hough Transformation is applied so that we can search for the strongest line feature with vertical orientation. The thin belt-like region around the detected straight line with a fixed width is referred to as point-source-belt. In SFFT, the parameter -BeltHW describes the belt half-width (default value is 0.2). With this terminology, it is easier to describe the specific selection criteria.

For the source selection, sparse-flavor SFFT will first generate a SEXTRACTOR photometry catalog for reference image and science image, respectively. A source is selected if it lies in point-source-belt or out of point-source-belt from the right side for both images. The extended sources in the field are not excluded, as SFFT can use both stars and galaxies to derive the solution for the matching kernel. However, typical cosmic rays and the faintest astronomical sources will be discarded. Given that each pixel of selected samples is equally weighted no matter bright or faint in SFFT, rejecting the noisiest subset should be appropriate in our framework. Furthermore, SEXTRACTOR has been configured to only output the objects with SEXTRACTOR catalog value FLAG being zero. Namely, this guarantees that the saturated sources and blending objects (relatively rare in sparse fields) are not in the selection.

Significant variable sources in the field should be further rejected. SFFT cross-matches the photometry catalogs of the input image-pair, then calculates the difference in instrumental magnitude for each matched object. The outliers of the distribution of magnitude difference indicating violent brightness change will be discarded from the initial set of selection. In SFFT, the outliers are identified by the threshold parameter -MAGD_\_THRESH (default value is 0.12 mag). The survived selection set is applied for the image-masking in sparse-flavor SFFT. The outlier rejection is usually sufficient enough for a successful image subtraction, but one is also allowed to further refine the automatic selection by removing the known but not recognized variables and transients. Unlike HOTPANTS, SFFT does not enclose each source of the selection within a fixed-size rectangle stamp. Instead, we employ the detection mask of SEXTRACTOR (check-image SEGMENTATION generated by SEXTRACTOR) to define the pixel domain of each selected source. Finally, the pixels not in any pixel domain will be masked by a constant of zero.

3.3 Implementation of SFFT Subtraction

Refer to caption
Figure 2: Image subtraction performance of the ZTF test with observations covering M31. The upper panel, from left to right, shows the input reference image ZTF-REF and science image ZTF-SCI. The lower panel presents the resulting difference image from SFFT (left) and ZOGY (right), where the ZOGY difference is directly downloaded from ZTF Data Release 3. The red dashed square marks the core region of the M31.
Refer to caption
Figure 3: Image subtraction performance of the ZTF test around M31 galaxy center. The panel descriptions are the same as Figure 2, however, in a close-up view of the region enclosed with the red square in Figure 2. In each panel, the solid black squares mark five field stars to be checked in detail in Figure 4.
Refer to caption
Figure 4: Analysis of flux residuals for the ZTF test. The second row and third row show the thumbnail images of the selected five samples from the SFFT difference and ZOGY difference, respectively. From left to right, thumbnail images are sorted by the sample labels shown in Figure 3. For each thumbnail image, flux integral along the y-axis can produce a flux curve as a function of the index of the x-axis. These functions are shown in the first row, using red solid curves for ZOGY and black solid curves for SFFT. In each panel of the first row, the two flux curves have been rescaled with the same factor for display clarity. The green dashed line shows the flux level of constant zero.
Refer to caption
Figure 5: Image subtraction performance of the AST3-II test with observations of LMC center. The figure, from left to right, shows the input reference image AST-REF, science image AST-SCI and resulting difference image by SFFT. The red dashed square at the image center indicates a known RRAB variable TY Dor (RA=05:24:06.35 DEC=-69:25:11.0) from VSX catalog (Watson et al., 2006). The vertical strip reveals the detection readout sections with slightly different gain values.
Refer to caption
Figure 6: Image subtraction performance of the TESS test. The figure, from left to right, shows the input reference image TESS-REF, science image TESS-SCI and resulting difference image by SFFT. The red dashed square at the image center indicates a known RRAB variable CV Scl (RA=23:09:30.52 DEC=-35:47:16.9) from VSX catalog (Watson et al., 2006).

The next step is to perform subtraction with the unmasked and the masked image-pairs, in the same way for the two flavors. We implemented the subtraction algorithm in CUDA following the mathematical reasoning in Section 2.2.

There are a few free parameters in this process. In Section 2.2, the spatial variation of the convolution kernel was modeled as a polynomial form of degree DKD_{K}. Similarly, the differential background is assumed to be a polynomial with degree DBD_{B}. In SFFT, the two free parameters correspond to -KerPolyOrder and -BGPolyOrder, respectively. The default values of the two parameters are 2. Another parameter that should be specified is the pixel size of the convolution kernels. The default way is to determine kernel size as seeing-related, i.e., the kernel half-width is calculated as -KerHWRatio×FWHML\textbf{\text{-KerHWRatio}}\times\text{FWHM}_{\text{L}}, where the ratio -KerHWRatio is a free parameter of SFFT and FWHML\text{FWHM}_{\text{L}} is the worse seeing of the input image-pair. The last free parameter -ConstPhotRatio is boolean, which controls whether SFFT subtraction is subject to a constant photometric ratio or not. The default value of this parameter is True that assumes the input image-pair has been well-calibrated. Setting the parameter to be False means the photometric ratio will also become a polynomial form of degree -KerPolyOrder.

4 Examples of Image Subtraction with SFFT

We show examples of SFFT applied to observations from five different telescopes. These data correspond to a diverse range of characteristics. The technical specifications of the instruments are given in Table 1. To test the two flavors of SFFT, we use ZTF (Bellm et al., 2018), AST3-II (Yuan et al., 2014), and TESS (Ricker et al., 2015) data as examples of crowded fields. Also, the observations from DECam and TMTS with abundant isolated stars are selected as representatives of sparse fields.

The ZTF (Bellm et al., 2019) and AST3-II (Wang et al., 2017; Yuan et al., 2014) data are images of the nearby galaxies M31 and the Large Magellanic Clouds (LMC), respectively. The two wide-field survey telescopes have the same pixel sampling but point to a different hemisphere. We additionally test SFFT with TESS (Ricker et al., 2015) images with a vastly different pixel scale of 21.0 arcsec/pixel where PSF is severely under-sampled. All of these selected observations could be seen as signal-dominated cases so that subtraction tests on them are conducted by the crowded-flavor SFFT.

The DECam and TMTS data were acquired for extragalactic transient surveys (Mould et al., 2017; Zhang et al., 2020). The DECam data are from deep surveys with a large number of isolated point sources and extended galaxies, while the TMTS data are from a shallow nearby survey that recorded plenty of point sources. TMTS has a larger pixel scale than DECam, but its PSF is not under-sampled, unlike TESS. For these observations, the observed stellar objects are generally isolatedly distributed in the field, making it possible to apply the source selection described in Section 3. We use sparse-flavor SFFT for the subtraction tests on DECam and TMTS.

Through this section, SFFT always uses the default configuration of free parameters described in Section 3, which are summarized in Table A1, even though the two sets of images differ drastically. The detailed information for the test data used in this section is presented in Table B. In the context, we will highlight the alias names of the test images in italic. All input image-pairs for image subtraction have been registrated by SWarp (Bertin, 2010) with LANCZOS3 resampling function. For the input images of sparse-flavor SFFT, we have modeled and subtracted their sky using SEXTRACTOR with a mesh size of 64 ×\times 64 pixels.

Refer to caption
Figure 7: Image subtraction performance of the DECam test from DECamERON survey. The upper panel shows the input reference image DECam-SREF and science image DECam-OBS02f. The lower panel shows the resulting difference image by SFFT (left) and HOTPANTS (right). The full field of view of DECam is too large for display, here we only present them in a narrow view of 3 arcmin width.
Refer to caption
Figure 8: Image subtraction performance of the DECam test on the selected sources. The panels are arranged as in Figure 7 but showing the subtraction results on the set of pre-selected individual sources. Each panel shows a synthetic image that combines thumbnail cutouts of 64 sources from the original images. The presented samples are drawn from the brightest end of the complete selection, and the thumbnails in the four panels are placed in order of decreasing brightness.

4.1 Crowded Fields

By design, SFFT does not require isolated sources to solve the image matching. In crowded fields where few or no isolated stars are present, SFFT can perform exceptionally well. The ZTF test images are downloaded from ZTF Data Release 3 222https://www.ztf.caltech.edu/page/dr3, covering the nearby galaxy M31. Figure 2 and Figure 3 show the subtraction performance of both the SFFT and ZOGY method, with a wider view and a close-up view on the galaxy core, respectively.

The difference image generated by SFFT is much cleaner than the ZOGY approach, as indicated by the lower panels of the two figures. One can also notice that the difference image by the ZOGY method appears to have a bias seemingly due to the photometric mismatch of image subtraction. This guess is confirmed in Figure 4 that analyses the flux residuals of five field stars near the galaxy core. ZOGY subtraction uniformly remains negative net flux for these samples, suggesting an improperly-estimated photometric ratio between reference and science image. By contrast, SFFT does not have the same problem. Unlike ZOGY, the photometric ratio (a constant in our default configuration, i.e., å0000\mathring{a}_{0000}) in SFFT is straightforwardly solved from the linear system, rather than an extra value calculated by some other photometric process.

Figure 5 and Figure 6 show SFFT subtraction performance on LMC observations of the Antarctica telescope AST3-II and test data from space-based TESS 30min-cadence Full Frame Images (FFIs), respectively. A known variable star of RRAB type is easily identified at the image center for both cases. It illustrates how the flux variability can be effectively captured by SFFT subtraction from the densely packed fields.

4.2 Sparse Fields

Refer to caption
Figure 9: Clean subtraction rate of galaxies measured from the DECam test. The solid curves show clean subtraction rate as a function of galaxy magnitude for SFFT (blue) and HOTPANTS (red), with magnitude bin width being 0.4 mag. The inset panels show an example of the subtraction performance for a bright galaxy. The first two panels of the insert show the zoomed-in region around the galaxy from the reference image DECam-SREF and the science image DECam-OBS18a, respectively. The last two panels give the resulting difference image by SFFT and HOTPANTS. The yellow dashed circle indicates the searching region for subtraction-induced artifacts with a radius of 11 pixels. The example represents the typical cases when SFFT is able to provide a clean subtraction but HOTPANTS failed.
Refer to caption
Figure 10: Photometric accuracy measured from lightcurves of field stars for DECam test. The light curve of each field star (classied as PSF in Legacy survey) is derived by force aperture photometry on the queue of the convolved images (aliased with initial DECam-OBS). The force photometry is carried out by SEXTRACTOR with Gaussian optimal aperture 1.3462×FWHMPTAR1.3462\times\text{FWHM}_{\text{PTAR}}, where FWHMPTAR\text{FWHM}_{\text{PTAR}} is the FWHM of the specific CCD tile of DECam-PTAR. The photometric uncertainty against star magnitude is shown as blue dots (for SFFT) and red dots (for HOTPANTS). The solid curves give the median level of RMS in each magnitude bin with width 0.2 mag for SFFT (yellow) and HOTPANTS (cyan), respectively.
Refer to caption
Figure 11: Image subtraction performance test using the TMTS images. The figure, from left to right, shows the input reference image TMTS-REF, science image TMTS-SCI and resulting difference images by SFFT and HOTPANTS.

It is also essential to investigate the performance of SFFT subtraction on the ordinary sparse sky fields that are more common in extragalactic transient surveys. For comparison, we additionally employed the widely-used image subtraction software HOTPANTS as a baseline method. As one of specific implementations of Alard & Lupton (1998), HOTPANTS adopts Gaussian basis functions to construct the convolution kernel. In real space, the use of DBFs has been shown to yield better performance than Gaussian basis functions in terms of photometric accuracy (Albrow et al., 2009). Here we present the comparisons to HOTPANTS to confirm that the SFFT, though working in Fourier space, will still inherit the advantage of DBFs over Gaussian basis functions. The parameters of HOTPANTS used for this section are listed in Table A2. Recall that sparse-flavor SFFT restricts the calculations of convolution kernels on a pre-selected set of sources, this source list used by SFFT will be shared by HOTPANTS for the sake of fairness. Besides, both methods always apply the consistent size of convolution kernels and use the same polynomial degree of spatial variation for image subtraction. We selected 25 DECam observations with the same pointing but diverse seeing conditions from our DECamERON survey (Mould et al., 2017) (see Table B). With the set of DECam images, we conduct two types of tests to check the subtraction cleanness and photometric accuracy, respectively.

For the subtraction cleanness test, we use the image DECam-SREF as the shared reference, having the best seeing among all of them. The remaining 23 images aliased by initial DECam-OBS are regarded as science images in this test. Image subtractions are performed for the sequence of science images with a shared reference using sparse-flavor SFFT and HOTPANTS, respectively. An example of the subtraction results is shown in Figure 7 from the observation DECam-OBS02f. For both methods, the calculations involved in parameter-solving have been restricted to the same pre-selected sources, and the minimization aims at optimal subtraction on these sources as clean as possible. It is useful to give a close-up view of subtraction performance specifically for the selection. For each image in Figure 7, we cut a small thumbnail image around each selected source and combine the cutouts into a grid to be a new synthetic image, as shown in Figure 8. Note that the source selection, in this case, is more than 1100, so we only exhibit a subset of size 64 from the bright end of the complete set for a clear display. One can notice that the most conspicuous subtraction-induced artifacts have a dipole-like pattern which is especially prominent for the bright sources. The pattern can be found in both difference images, but much less profound in SFFT subtractions than in HOTPANTS subtractions. It is an expected improvement as the SFFT kernel solution with DBFs allows more degrees of freedom than HOTPANTS using Gaussian basis functions.

To further verify such an improvement is real in a statistical sense, here we defined a naive quantifiable metric to describe the subtraction cleanness and show the performance comparisons with the test data. Note that the subtraction-induced artifacts on difference images are usually detectable by SEXTRACTOR like other real transient and variable objects. Generally, a huge number of artifacts in transient surveys will survive until an AI-based stamp classifier recognizes them. This fact makes it possible to use a simple dichotomous metric to describe the subtraction cleanness. A given source is either clean-subtracted or not according to the existence of SEXTRACTOR detection of its subtraction residuals. Now we can investigate how the probability of clean-subtraction for a given set of sources is related to the employed image subtraction method. For transient surveys, it is essential to probe the subtraction performance over the galaxies in the field, which are potential hosts of transient events. When a transient emerges at a position very close to its host galaxy core, the subtraction-induced artifacts from the galaxy can severely hinder the discovery and photometric measurement of the transient.

Our deep DECam observations in the test (3 square degrees, down to  23.5 mag in i-band) have covered a vast number of galaxies with various morphological types. It is interesting to make statistics for the probability of clean-subtraction for those sources identified as extended galaxies (i.e., Tractor morphological types DEV, EXP, and REX) in the Legacy Survey (Blum et al., 2016). The check radius from the galaxy core for searching subtraction-induced artifacts using SEXTRACTOR is specified as 11 pixels (\sim 2 times median FWHM for DECam). Figure 9 shows the rate of clean-subtraction as a function of the magnitude of the examined galaxy. As expected, the brighter galaxies have a higher probability of leaving detectable subtraction-induced artifacts. However, the SFFT method is more likely to achieve clean-subtraction than HOTPANTS.

For the photometric accuracy test, we use the image DECam-PTAR as the PSF target, which has a median level seeing among all selected DECam observations. The remaining 23 images aliased by initial DECam-OBS are convolved to achieve homogeneous PSF using sparse-flavor SFFT and HOTPANTS, respectively. We derive the light curves of the field stars by conducting photometry on the sequence of convolved images with a fixed aperture. The photometric accuracy measured by the light curves can work as a metric to assess the PSF matching quality. We investigate the aperture photometry of the point sources classified as Tractor morphological type PSF. Figure 10 shows the RMS error of the derived light curves as a function of the star brightness. As the photometric uncertainty from SFFT is systematically lower than that from HOTPANTS especially at the bright end, the improvement in PSF matching is again confirmed.

Figure 11 shows an example with TMTS data. The subtraction artifacts generated by SFFT and HOTPANTS are not identical. HOTPANTS produces relatively circular and symmetric patterns, while SFFT shows more random residuals. This obviously originates from the different base kernel construction in SFFT and HOTPANTS. SFFT uses a δ\delta-basis kernel which is more flexible, while HOTPANTS utilizes Gaussian functions which possess a higher intrinsic symmetry about the kernel center.

5 Computational Performance of SFFT

Figure 12: Computing time on preprocessing versus the image size of input data for different methods. The curves with different colors represent the measured time spent on pre-subtraction procedures using different methods on server 𝐈\mathbf{I} (left) and server 𝐈𝐈\mathbf{II} (right). Note that each test using SFFT, HOTPANTS or PyTorchDIA has been repeated with a specified kernel size in each run. Given that the kernel size is irrelevant to preprocessing, we simply use the average time in the figure.
Figure 13: Computing time on image subtraction versus the image size of input data for different methods. The curves with different colors represent the measured time spent on subtraction using different methods on server 𝐈\mathbf{I} (left) and server 𝐈𝐈\mathbf{II} (right). For SFFT, HOTPANTS or PyTorchDIA, the data points in the curves represent the average time measured from the multiple runs, and the shaded areas indicate the corresponding 1σ\sigma standard deviation.

The most remarkable feature of SFFT is that the image subtraction in Fourier space can be efficiently parallelized in GPU devices. With the simplification described in Appendix B, we have reduced the computation-intensive kernel determination as discrete Fourier transforms (DFTs) and element-wise matrix operations, which are exceptionally suitable for GPU graphic multi-processors. This section will show the excellent computing performance of the SFFT algorithm in comparison with several existing image subtraction methods, including HOTPANTS, ZOGY333https://github.com/pmvreeswijk/ZOGY, and PyTorchDIA444https://github.com/jah1994/PyTorchDIA. Note that the comparisons only focus on the limited specific implementations of image subtraction algorithms. One should not overinterpret the computing costs given in this section to represent the best possible computational performances of the general algorithms. Unless specified otherwise, the parameters of those softwares used for this section are listed in Tables A1,A2,A3,A4.

 
Method Time Cost on Preprocessing (sec) Time Cost on Subtraction (sec)
Intel E5 AMD EPYC Intel E5 AMD EPY Tesla V100 Tesla A100
CPU CPU CPU CPU GPU GPU
SFFT 5.75 ±\pm 0.26 3.35 ±\pm 0.15 - - 1.61 ±\pm 0.10 0.97 ±\pm 0.06
PyTorchDIA 0.11 ±\pm 0.01 0.16 ±\pm 0.07 - - 15.87 ±\pm 3.25 6.45 ±\pm 1.36
HOTPANTS 4.37 ±\pm 0.85 2.43 ±\pm 0.39 26.39 ±\pm 8.50 15.39 ±\pm 3.49 - -
ZOGY 63.59 ±\pm 6.42 42.28 ±\pm 3.74 62.83 ±\pm 9.16 41.01 ±\pm 5.25 - -
 
Table 2: Comparison of the computing time on preprocessing and subtraction measured from the tests on DECam data using different methods.

It is useful to demonstrate the computing performance of the image subtraction methods by testing them with a variety of data on different computation platforms. We select a set of testing input data with diverse image sizes, seeing conditions, and sky areas. The tests are performed on two computing servers with different hardware configurations. One server (denoted by 𝐈\mathbf{I}) is equipped with Intel(R) Xeon(R) CPU E5-2630 (2.20 GHz) and one NVIDIA Tesla V100 GPU, while the other server (denoted by 𝐈𝐈\mathbf{II}) has more advanced configurations with AMD EPYC CPU 7542 and one NVIDIA Tesla A100 GPU. Note that the time spent on preprocessing steps can also be considerable. We additionally record the computing cost of the pre-subtraction procedures in our tests. In this section, we conduct two types of tests using TMTS data and DECam data, respectively.

To explore the relationship between the computing time and input image size, we extract sub-images of different sizes from the original TMTS image-pair (i.e., TMTS-REF and TMTS-SCI). We then perform image subtractions for the trimmed image-pairs on the two servers using the four tested methods. For SFFT, HOTPANTS and PyTorchDIA, in order to test if the computational cost is sensitive to the size of the convolutional kernel, we run the image subtractions repeatedly with a specified kernel size from 15 to 25 pixels in each run (six runs in total).

Figure 12 shows the computing time on the preprocessing as a function of input image size. In general, larger input images consume more computing time on preprocessing. Among the tested methods, ZOGY requires the longest preprocessing time. For ZOGY, the preprocessing is composed mainly of fitting the PSF models for input images and calculating their flux ratio as well as the astrometric registration noises. The preprocessing time of SFFT and HOTPANTS are comparable and much shorter than ZOGY. For these two methods, the goal of the pre-subtraction procedures is to select an optimal set of sources for kernel determination. Like in Section 4.2, we have forced HOTPANTS to use the pre-selected set given by SFFT following Section 3.2. Note that SFFT needs further to perform an image-masking based on the pre-selected set while HOTPANTS does not, that is why the preprocessing time of SFFT is slightly longer than HOTPANTS. For PyTorchDIA, the preprocessing only contains reading the input FITS images. Thus, it can achieve minimal preprocessing time. We note that the robust loss function used in PyTorchDIA is designed to be insensitive to the distraction-sources, as a result, no source selection or image-masking is involved in PyTorchDIA.

Figure 13 presents the computing time on the image subtraction versus the input image size. Unsurprisingly, larger images generally require more computing time for subtraction. The computing speeds for HOTPANTS and ZOGY are broadly comparable, with a typical cost of 40-90s for 4K images. By contrast, the GPU-powered method PyTorchDIA brings considerable speed-up. For 4K images, the computing time is around 30s and 10s on the server 𝐈\mathbf{I} and 𝐈𝐈\mathbf{II}, respectively. Note that PyTorchDIA only solves a spatially invariant kernel while other tested methods can accommodate spatially varying PSF. Remarkably, SFFT is almost an order of magnitude faster than PyTorchDIA. For 4K images, the computing time is close to 4s and 1s on the server 𝐈\mathbf{I} and (𝐈𝐈\mathbf{II}), respectively. As shown in Figure 13, the subtraction speed of SFFT is less affected by the kernel size compared to HOTPANTS and PyTorchDIA.

The second type of test aims to explore the computing expense on a set of images with diverse seeing conditions covering different sky areas. We randomly select 100 CCD images from the 23 DECam observations aliased by initial DECam-OBS (see Table B). Note that one DECam exposure produces 62 CCD images, each with a size of 2046×\times4094 pixels. As shown in Table B, the DECam data were obtained under varying seeing conditions. Although the DECam exposures listed in Table B have similar telescope pointing, the arbitrarily selected CCD images can, to some extent, cover a variety of distributions of the observed stellar objects. In this test, the selected 100 images are regarded as science images, and we use the corresponding CCD images of DECam-SREF as their reference images. We perform image subtractions for the 100 image-pairs on the two servers using the four tested methods. Unlike the above test, we do not specify a given kernel size but leave it automatically determined according to the seeing condition. Table 2 summarizes the time costs on preprocessing and image subtraction for the tested DECam dataset. The results are broadly consistent with the first test. Again, SFFT shows a distinct advantage in the subtraction speed over other tested methods. Given image size, SFFT is the most stable method on subtraction time, with a percentage variation 6%\sim 6\% (the typical value is 20%20\% for other methods).

We note that the software HOTPANTS also allows users to perform image subtraction without a pre-selected source list. In such an automatic mode, HOTPANTS will accomplish the source selection using its built-in functions. One may wonder if the automatic mode can be faster than the manual mode used in this paper. Hence, we additionally perform the image subtraction on the 100 image-pairs using the automatic mode HOTPANTS. It turns out that the total time (preprocessing plus subtraction) for the two modes is very close, with the automatic mode having a slightly higher variation.

For the crowded fields, the computational cost of SFFT will not rise to a level higher than the cost shown in this section. For preprocessing, crowded-flavor SFFT involves much simpler operations than spase-flavor (see Section 3.1). On the other hand, signal-dominated input images will not prolong the computing time on image subtraction in Fourier space.

 
HOTPANTS Total Time Cost (sec)
Mode Intel E5 AMD EPYC
Manual (this work) 30.76 ±\pm 8.81 17.82 ±\pm 3.62
Automatic 30.75 ±\pm 10.54 17.71 ±\pm 4.40
 
Table 3: Comparison of the total computing time measured from the tests on DECam data using HOTPANTS in two modes.

6 Limitations and Future Works

 
Method Convolution Kernels Accommodate Spatial Variations
Gaussian-function δ\delta-function Regularized Convolution Photometric Differential
basis basis Kernel Kernels Scale Factor Background
SFFT
PyTorchDIA
HOTPANTS
ZOGY - - - -
 
Method Kernel Determination
Require PSF Require Isolated Rely on Rectangle Weighting by Construct Least Symmetric to
Knowledge Objects Sub-areas Pixel Noise -squares Matrix Image Exchange
SFFT
PyTorchDIA
HOTPANTS
ZOGY -
 
Method Preprocessing before Subtraction Computing Performance of Subtraction
Stamp Selection PSF Calculate Implemented Built-in CPU Speed Sensitive
/Image Masking Modeling Flux Ratio for GPU Multithreading to Kernel Size
SFFT -
PyTorchDIA -
HOTPANTS
ZOGY - -
 
Table 4: Characteristics of SFFT compared with other existing image subtraction methods.

To get a clear picture of the current SFFT and find its limitations, we summarize a variety of features from different perspectives for SFFT and other existing image subtraction methods, including PyTorchDIA, HOTPANTS and ZOGY in Table 4. Although a general algorithm (e.g., Alard & Lupton, 1998) can have multiple existing implementations, the scope of the comparisons in Table 4 is restricted: we have only considered a specific implementation for each algorithm. Some characteristics of a specific implementation may not necessarily be the intrinsic features of its underlying algorithm (see the note attached to Table 4).

Although SFFT uses the state-of-the-art DBFs as kernel basis functions, the current version does not contain an effective mechanism to aginst the overfitting problem of DBFs. In future work, we may try to incorporate existing solutions into SFFT, e.g., Becker et al. (2012); Bramich et al. (2016); Masci et al. (2017). Moreover, unlike Alard & Lupton (1998); Bramich (2008); Hitchcock et al. (2021), the kernel determination in SFFT is not weighted by pixel noise, which may introduce a possible bias towards the brighter pixels. It looks tricky to design a weighting scheme in Fourier space. Note that some practical implementations, including HOTPANTS and Miller et al. (2008), also ignore the pixel weights in kernel determination.

As discussed in Zackay et al. (2016), the approach proposed by Alard & Lupton (1998) is not symmetric, i.e., changing the convolution direction of image subtraction will generally result in inconsistent difference images. Consequently, SFFT has some limitations inherited from the nature of this kind. In particular, when the direction matches an image to another one with better seeing, the deconvolution effect makes its way into the subtraction to amplify the noise and strengthen noise correlation on the difference image. In many cases, one can steer clear of the deconvolution effect by simply adjusting the direction. However, this strategy is not a panacea; e.g., it may be insufficient when the observations have elliptic-like PSF with varying orientations (Zackay et al., 2016).

Another limitation of the current SFFT is related to the computing cost of preprocessing. The image-masking scheme of SFFT introduced in Section 3 provides a safe and generic approach that has been proved to be reliable through extensive tests by multiple transient surveys. However, its computing cost might become a potential encumbrance for those projects that pursues extremely rapid transient detection. Fortunately, there is ample space for speed-up in a given survey program. One can modify the SFFT code to design a particular image-masking function for optimizing its overall computing expense. For example, the SEXTRACTOR catalogs used for the source selection can be provided by preceding modules (e.g., astrometric calibration) in the pipeline. When processing time-series data taken from the same pointing, one can skip the repeated photometry for the shared reference image to save the preprocessing time. One may also consider using a single pre-defined mask (fixed or seeing-related) for all images in the time series. We note that PyTorchDIA can take very little time on preprocessing as it designs a specific loss function insensitive to outlying values, which provides an alternative to suppress the impact from distraction-sources amid the kernel determination.

In the current implementations of SFFT, the subtraction has two flavors that make image-masking in different ways. However, there is no built-in discriminator for sparse fields and crowded fields in SFFT. One may specify the adopted flavor for each field to be processed. In future work, we may consider developing a more unified way to conduct image-masking rather than dividing the observations into two subgroups. Besides, the limited memory amount of GPU devices can constrain the applicability of the GPU-based SFFT to very large images. To allows for large image cases, we have provided a Numpy-based backend for SFFT without GPU requirement. This is also helpful for users who do not have available GPU resources.

7 Summary and Conclusions

SFFT is a novel image subtraction algorithm formulated in Fourier space. Like in the classic framework of Alard & Lupton (1998), SFFT addresses the PSF discrepancy between two images by the convolution with pixelized kernels that are decomposed into pre-defined basis functions. In our work, we adopted the δ\delta-function basis proposed by Miller et al. (2008) for kernel flexibility and minimal hyper-parameters. SFFT solves the least-squares problems of image subtraction in the Fourier domain, and it allows for space-varying PSF, photometric scaling, and sky background modeling across the entire field-of-view. In particular, SFFT can reduce the computation-intensive kernel determination to FFTs and element-wise matrix operations. By leveraging CUDA-enabled GPU acceleration, SFFT empowers a great leap forward in computational performance of astronomical image subtraction with around one order of magnitude speed gain.

We demonstrated in this paper the power of the method on real astronomical images taken by a variety of telescopes. We show that SFFT can accommodate imaging data with diverse characteristics, including sparse fields, crowded fields, and under-sampled PSFs. The examples of SFFT for image subtraction are presented in Section 4. We confirm that SFFT yields a high quality of PSF-matching when compared with the widely-used image subtraction software HOTPANTS using Gaussian kernel basis for models of the PSFs. A comprehensive investigation of the computing performance of SFFT is presented in Section 5. We find that SFFT is not only faster compared to other existing image subtraction methods but is also more stable and efficient.

We also explored the limitations of the current SFFT implementation in Section 6. One prominent weakness of the current SFFT is that the kernel solutions may suffer from the overfitting problem due to the high degree of freedom of DBFs. A few approaches have been proposed to alleviate the overfitting issue of DBFs, e.g., regularizing the kernel solutions (Becker et al., 2012). However, the DBFs employed by the current SFFT are unregularized. The regularization techniques will be included in future works. In the meantime, proper image masking is required in the current version of SFFT to identify the pixels that are not correctly modeled by SFFT. In principle, SFFT also provides a generic and robust function to perform preprocessing of the data, which has been extensively tested with data from various transient surveys. In contrast to the high speed of the image subtraction, however, the computing performance of the generic preprocessing is less remarkable. Given a particular time-domain program, we believe there is plenty of room for further optimization of the computing expense on the preprocessing.

We conclude that SFFT has the potential to be the optimal image subtraction engine for future time-domain surveys with massive data flows that require differential image subtractions for transient detection and precision differential photometry.

L.H. acknowledges the supports from the National Natural Science Foundation of China (11761141001) and the Major Science and Technology Project of Qinghai Province (2019-ZJ-A10). L.W., X.C. and J.Y. acknowledge supports from an NSF grant AST1817099. We thank Bo Yu and Tianrui Sun for useful discussions on mathematical derivation and package developments. The authors are also grateful to an anonymous referee whose report has significantly improved this manuscript.

Appendix A The Approximation in SFFT

Here we will prove the approximation applied to Equation (10). Given any image R and a kernel Q, where Q has a much smaller size than R as it is in most astronomical applications.

Tρϵ(RQ)RρϵQ.T^{\rho\epsilon}(R\circledast Q)\approx R^{\rho\epsilon}\circledast Q. (A1)

Writing the Left Hand Side (LHS) and Right Hand Side (RHS) as follows,

LHS(r,s)=rρsϵc=w0w0d=w1w1Q(c,d)R𝔭(rc,sd)=c=w0w0d=w1w1Q(c,d)[rρsϵR𝔭(rc,sd)].\begin{split}\textbf{LHS}(r,s)&=r^{\rho}s^{\epsilon}\sum_{c=-w_{0}}^{w^{\prime}_{0}}\sum_{d=-w_{1}}^{w^{\prime}_{1}}Q(c,d)R_{\mathfrak{p}}(r-c,s-d)\\ &=\sum_{c=-w_{0}}^{w^{\prime}_{0}}\sum_{d=-w_{1}}^{w^{\prime}_{1}}Q(c,d)[r^{\rho}s^{\epsilon}R_{\mathfrak{p}}(r-c,s-d)].\end{split} (A2)
RHS(r,s)=c=w0w0d=w1w1Q(c,d)R𝔭ρϵ(rc,sd)=c=w0w0d=w1w1Q(c,d)(TρϵR)𝔭(rc,sd).\begin{split}\textbf{RHS}(r,s)&=\sum_{c=-w_{0}}^{w^{\prime}_{0}}\sum_{d=-w_{1}}^{w^{\prime}_{1}}Q(c,d)R_{\mathfrak{p}}^{\rho\epsilon}(r-c,s-d)\\ &=\sum_{c=-w_{0}}^{w^{\prime}_{0}}\sum_{d=-w_{1}}^{w^{\prime}_{1}}Q(c,d)(T^{\rho\epsilon}R)_{\mathfrak{p}}(r-c,s-d).\end{split} (A3)

Note that the indices of kernel QQ are modified with origin at its center pixel, and the subscript 𝔭\mathfrak{p} is employed to indicate the periodic extension.

For rr and ss, (rc,sd)(r-c,s-d) is a vector within the image frame and (rc,sd)(r,s)(r-c,s-d)\approx(r,s) for nearly all possible cc and dd.

LHS(r,s)=c=w0w0d=w1w1Q(c,d)[rρsϵR(rc,sd)]c=w0w0d=w1w1Q(c,d)[(rc)ρ(sd)ϵR(rc,sd)]=RHS(r,s).\begin{split}\textbf{LHS}(r,s)&=\sum_{c=-w_{0}}^{w^{\prime}_{0}}\sum_{d=-w_{1}}^{w^{\prime}_{1}}Q(c,d)[r^{\rho}s^{\epsilon}R(r-c,s-d)]\\ &\approx\sum_{c=-w_{0}}^{w^{\prime}_{0}}\sum_{d=-w_{1}}^{w^{\prime}_{1}}Q(c,d)[(r-c)^{\rho}(s-d)^{\epsilon}\\ &\;\;\;\;\;\;R(r-c,s-d)]=\textbf{RHS}(r,s).\end{split} (A4)

For the particular case ρ=ϵ=0\rho=\epsilon=0, it becomes a rigorous equation rather than an approximation.

Appendix B Calculation Simplification

The δ\delta-function basis facilitates further simplifications. Equation (19) will be re-expressed as

Ai¯j¯α¯β¯ijαβ=Ωi¯j¯ij(α¯,β¯)Ωi¯j¯ij(α,β)+Ωi¯j¯ij(α¯α,β¯β)+Ωi¯j¯ij(0,0)if (α¯,β¯)0 and (α,β)0Ai¯j¯α¯β¯ijαβ=Ωi¯j¯ij(α,β)Ωi¯j¯ij(0,0)if (α¯,β¯)=0 and (α,β)0Ai¯j¯α¯β¯ijαβ=Ωi¯j¯ij(α¯,β¯)Ωi¯j¯ij(0,0)if (α¯,β¯)0 and (α,β)=0Ai¯j¯α¯β¯ijαβ=Ωi¯j¯ij(0,0)if (α¯,β¯)=0 and (α,β)=0,\begin{split}A_{\bar{i}\bar{j}\bar{\alpha}\bar{\beta}ij\alpha\beta}&=-\Omega_{\bar{i}\bar{j}ij}(\bar{\alpha},\bar{\beta})-\Omega_{\bar{i}\bar{j}ij}(-\alpha,-\beta)\\ &\;\;\;\;+\Omega_{\bar{i}\bar{j}ij}(\bar{\alpha}-\alpha,\bar{\beta}-\beta)+\Omega_{\bar{i}\bar{j}ij}(0,0)\\ &\;\;\;\;\;\;\;\;\;\;\textbf{{if }}(\bar{\alpha},\bar{\beta})\neq\vec{0}\textbf{{ and }}(\alpha,\beta)\neq\vec{0}\\ A_{\bar{i}\bar{j}\bar{\alpha}\bar{\beta}ij\alpha\beta}&=\Omega_{\bar{i}\bar{j}ij}(-\alpha,-\beta)-\Omega_{\bar{i}\bar{j}ij}(0,0)\\ &\;\;\;\;\;\;\;\;\;\;\textbf{{if }}(\bar{\alpha},\bar{\beta})=\vec{0}\textbf{{ and }}(\alpha,\beta)\neq\vec{0}\\ A_{\bar{i}\bar{j}\bar{\alpha}\bar{\beta}ij\alpha\beta}&=\Omega_{\bar{i}\bar{j}ij}(\bar{\alpha},\bar{\beta})-\Omega_{\bar{i}\bar{j}ij}(0,0)\\ &\;\;\;\;\;\;\;\;\;\;\textbf{{if }}(\bar{\alpha},\bar{\beta})\neq\vec{0}\textbf{{ and }}(\alpha,\beta)=\vec{0}\\ A_{\bar{i}\bar{j}\bar{\alpha}\bar{\beta}ij\alpha\beta}&=\Omega_{\bar{i}\bar{j}ij}(0,0)\\ &\;\;\;\;\;\;\;\;\;\;\textbf{{if }}(\bar{\alpha},\bar{\beta})=\vec{0}\textbf{{ and }}(\alpha,\beta)=\vec{0},\end{split} (B1)

where

Ωi¯j¯ij(ρ,ϵ)=Ω̊i¯j¯ij(ρmodN0,ϵmodN1)Ω̊i¯j¯ij=1N0N1[DFT(Ri¯j¯^(Rij^))].\begin{split}\Omega_{\bar{i}\bar{j}ij}(\rho,\epsilon)&=\mathring{\Omega}_{\bar{i}\bar{j}ij}(\rho\bmod{N0},\epsilon\bmod{N1})\\ \mathring{\Omega}_{\bar{i}\bar{j}ij}&=\frac{1}{N_{0}N_{1}}\Re\;[\textbf{DFT}(\widehat{R^{\bar{i}\bar{j}}}(\widehat{R^{ij}})^{*})].\end{split} (B2)

Equation (20) can be rewritten as

Bi¯j¯α¯β¯pq=Λi¯j¯pq(α¯,β¯)Λi¯j¯pq(0,0)if(α¯,β¯)0Bi¯j¯α¯β¯pq=Λi¯j¯pq(0,0)if(α¯,β¯)=0,\begin{split}B_{\bar{i}\bar{j}\bar{\alpha}\bar{\beta}pq}&=\Lambda_{\bar{i}\bar{j}pq}(\bar{\alpha},\bar{\beta})-\Lambda_{\bar{i}\bar{j}pq}(0,0)\;\;\;\textbf{{if}}(\bar{\alpha},\bar{\beta})\neq\vec{0}\\ B_{\bar{i}\bar{j}\bar{\alpha}\bar{\beta}pq}&=\Lambda_{\bar{i}\bar{j}pq}(0,0)\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\textbf{{if}}(\bar{\alpha},\bar{\beta})=\vec{0},\end{split} (B3)

where

Λi¯j¯pq(ρ,ϵ)=Λ̊i¯j¯pq(ρmodN0,ϵmodN1)Λ̊i¯j¯pq=[DFT(Ri¯j¯^(Tpq^)].\begin{split}\Lambda_{\bar{i}\bar{j}pq}(\rho,\epsilon)&=\mathring{\Lambda}_{\bar{i}\bar{j}pq}(\rho\bmod{N_{0}},\epsilon\bmod{N_{1}})\\ \mathring{\Lambda}_{\bar{i}\bar{j}pq}&=\Re\;[\textbf{DFT}(\widehat{R^{\bar{i}\bar{j}}}(\widehat{T^{pq}})^{*}].\end{split} (B4)

Equation (21) is written as

B~p¯q¯ijαβ=Ψp¯q¯ij(α,β)Ψp¯q¯ij(0,0)if(α,β)0B~p¯q¯ijαβ=Ψp¯q¯ij(0,0)if(α,β)=0,\begin{split}\tilde{B}_{\bar{p}\bar{q}ij\alpha\beta}&=\Psi_{\bar{p}\bar{q}ij}(-\alpha,-\beta)-\Psi_{\bar{p}\bar{q}ij}(0,0)\;\;\;\textbf{{if}}(\alpha,\beta)\neq\vec{0}\\ \tilde{B}_{\bar{p}\bar{q}ij\alpha\beta}&=\Psi_{\bar{p}\bar{q}ij}(0,0)\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\textbf{{if}}(\alpha,\beta)=\vec{0},\end{split} (B5)

where

Ψp¯q¯ij(ρ,ϵ)=Ψ̊p¯q¯ij(ρmodN0,ϵmodN1)Ψ̊p¯q¯ij=[DFT(Tp¯q¯^(Rij^))].\begin{split}\Psi_{\bar{p}\bar{q}ij}(\rho,\epsilon)&=\mathring{\Psi}_{\bar{p}\bar{q}ij}(\rho\bmod{N_{0}},\epsilon\bmod{N_{1}})\\ \mathring{\Psi}_{\bar{p}\bar{q}ij}&=\Re\;[\textbf{DFT}(\widehat{T^{\bar{p}\bar{q}}}(\widehat{R^{ij}})^{*})].\end{split} (B6)

Equation (22) turns out to be

Cp¯q¯pq=Φp¯q¯pq(0,0),\begin{split}C_{\bar{p}\bar{q}pq}&=\Phi_{\bar{p}\bar{q}pq}(0,0),\end{split} (B7)

where

Φp¯q¯pq(ρ,ϵ)=Φ̊p¯q¯pq(ρmodN0,ϵmodN1)Φ̊p¯q¯pq=N0N1[DFT(Tp¯q¯^(Tpq^))]\begin{split}\Phi_{\bar{p}\bar{q}pq}(\rho,\epsilon)&=\mathring{\Phi}_{\bar{p}\bar{q}pq}(\rho\bmod{N_{0}},\epsilon\bmod{N_{1}})\\ \mathring{\Phi}_{\bar{p}\bar{q}pq}&=N_{0}N_{1}\Re\;[\textbf{DFT}(\widehat{T^{\bar{p}\bar{q}}}(\widehat{T^{pq}})^{*})]\end{split} (B8)

Likewise, Equation (23) becomes

Di¯j¯α¯β¯=Θi¯j¯(α¯,β¯)Θi¯j¯(0,0)if(α¯,β¯)0Di¯j¯α¯β¯=Θi¯j¯(0,0)if(α¯,β¯)=0,\begin{split}D_{\bar{i}\bar{j}\bar{\alpha}\bar{\beta}}&=\Theta_{\bar{i}\bar{j}}(\bar{\alpha},\bar{\beta})-\Theta_{\bar{i}\bar{j}}(0,0)\;\;\;\textbf{{if}}(\bar{\alpha},\bar{\beta})\neq\vec{0}\\ D_{\bar{i}\bar{j}\bar{\alpha}\bar{\beta}}&=\Theta_{\bar{i}\bar{j}}(0,0)\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\textbf{{if}}(\bar{\alpha},\bar{\beta})=\vec{0},\end{split} (B9)

where

Θi¯j¯(ρ,ϵ)=Θ̊i¯j¯(ρmodN0,ϵmodN1)Θ̊i¯j¯=[DFT(S^(Ii¯j¯^)].\begin{split}\Theta_{\bar{i}\bar{j}}(\rho,\epsilon)&=\mathring{\Theta}_{\bar{i}\bar{j}}(\rho\bmod{N_{0}},\epsilon\bmod{N_{1}})\\ \mathring{\Theta}_{\bar{i}\bar{j}}&=\Re\;[\textbf{DFT}(\widehat{S}^{*}(\widehat{I^{\bar{i}\bar{j}}})^{*}].\end{split} (B10)

Equation (24) at the right-hand-side becomes

Ep¯q¯=Δp¯q¯(0,0),\begin{split}E_{\bar{p}\bar{q}}&=\Delta_{\bar{p}\bar{q}}(0,0),\end{split} (B11)

where

Δp¯q¯(ρ,ϵ)=Δ̊p¯q¯(ρmodN0,ϵmodN1)Δ̊p¯q¯=N0N1[S^Tp¯q¯^]\begin{split}\Delta_{\bar{p}\bar{q}}(\rho,\epsilon)&=\mathring{\Delta}_{\bar{p}\bar{q}}(\rho\bmod{N_{0}},\epsilon\bmod{N_{1}})\\ \mathring{\Delta}_{\bar{p}\bar{q}}&=N_{0}N_{1}\Re\;[\widehat{S}^{*}\widehat{T^{\bar{p}\bar{q}}}]\end{split} (B12)

Now the equations (19)-(24) have been converted to equations (B1), (B3), (B5), (B7), (B9), and (B11). These equations used to establish the linear system are mainly comprised of DFTs and element-wise matrix operations, which allows for highly efficient parallel computations on GPU architecture.

Appendix C Noise Decorrelation

Refer to caption
Figure 14: Noise decorrelation test with DECam data. The upper panels show the zoomed-in region of SN candidate AT 2018fjd (RA=21:12:25.980 DEC=-66:00:56.50) discovered by DECamERON (Mould et al., 2017; Hu et al., 2018). R0\text{R}_{\text{0}} (S0\text{S}_{\text{0}}) is from indivial observations DECam-OBS18a (DECam-OBS04a). R (S) is the stacked reference (science) image. The subtraction between R and S results in the difference image D, and Ddc\text{D}_{\text{dc}} is the decorrelated difference image. The black dashed boxes (41 ×\times 41 pixels) are selected on the a proximate background region. The lower panel shows the corresponding covariance matrix measured from the boxes. To probe the local correlation of background pixels, we constructed a multivariate random variable XX for the flux of adjacent pixels with fixed positional relationship, where XX = (X(0,0)X_{(0,0)}, X(1,0)X_{(1,0)}, X(1,0)X_{(-1,0)}, X(0,1)X_{(0,1)}, X(0,1)X_{(0,-1)}, X(1,1)X_{(1,1)}, X(1,1)X_{(1,-1)}, X(1,1)X_{(-1,1)}, X(1,1)X_{(-1,-1)}, X(2,0)X_{(2,0)}, X(2,0)X_{(-2,0)}, X(0,2)X_{(0,2)}, X(0,2)X_{(0,-2)}, X(3,0)X_{(3,0)}, X(3,0)X_{(-3,0)}, X(0,3)X_{(0,3)}, X(0,3)X_{(0,-3)}, X(4,0)X_{(4,0)}, X(4,0)X_{(-4,0)}, X(0,4)X_{(0,4)}, X(0,4)X_{(0,-4)}, X(5,0)X_{(5,0)}, X(5,0)X_{(-5,0)}, X(0,5)X_{(0,5)}, X(0,5)X_{(0,-5)}). Note the subscripts represent the relative pixel locations with respect to the first element. Only the pixels within the boxes are allowed to be involved in the random vector. The covariance matrix is calculated by exhausting all possible realization of XX.
Table A1: SFFT Parameters
Parameter Value Note Comment
-BeltHW 0.2    Half-width of the point-source-belt only for sparse-flavor
-MAGD_THRESH 0.12    Outlier threshold to reject variable sources (mag) only for sparse-flavor
-KerPolyOrder 2    Spatial order of kernel variation -
-BGPolyOrder 2    Spatial order of background variation -
-KerHWRatio 2    The ratio between seeing and convolution kernel half-width -
-ConstPhotRatio True    Constant photometric ratio between reference and science -

Note. — For PyTorchDIA, the kernel regularization has been mentioned in Hitchcock et al. (2021) whereas no regularization has been implemented in the software PyTorchDIA; For HOTPANTS, the kernel determination relies on a set of stamps encompassing isolated objects. Note that requiring isolated objects is not a feature of Alard & Lupton (1998). Moreover, pixel noise is not used in the matrix calculation in HOTPANTS though formulated in Alard & Lupton (1998); For ZOGY, all the convolutions involved in image subtraction are determined by pre-calculated PSFs. Generally, constructions of the PSF models are based on a sample of rectangle sub-images (e.g., SExtractor VIGNETS) centered at isolated bright point sources.

Like in other subtraction methods emanated from Alard & Lupton (1998), SFFT will introduce correlated errors on the difference image through the convolution process. For the cross-convolution approach, Zackay et al. (2016) has proved that one can whiten the difference image by one convolution with a decorrelation kernel. Later, Reiss & Lupton (2016) presented a noise decorrelation strategy for image subtraction in the framework of Alard & Lupton (1998). Here we extend to a more general case. That is, the subtraction can be performed with images constructed from the average or median co-addition of individual observations, and the original images are preprocessed by convolutions to match their PSFs before the co-additions.

The following derivation does not consider the spatial variation of convolution kernels across the field-of-view. However, it is appropriate to perform the operation by splitting the images into smaller segments to minimize the effect of PSF variation on correlated background noise. Likewise, the spatial variation of the background map for the input images is not considered. Note that a constant map has nothing to do with the noise correlation. Therefore, it is appropriate to assume that all the input images have zero mean background in our derivation. Note that noise correlation caused by resampling for image alignment and drizzling is not considered here, as such operations cannot be simplified as convolution, and it is not easy to formulate how these procedures affect the statistical properties of the noise. Finally, we assume that the noise of the original images before convolution to be uncorrelated Poisson noise.

Given MM science images Sj𝒩(0,σSj2)S_{j}\sim\mathcal{N}(0,\sigma_{S_{j}}^{2}) with jj being integers from 0, M1M-1, and reference images Ri𝒩(0,σRi2)R_{i}\sim\mathcal{N}(0,\sigma_{R_{i}}^{2}) with ii being integers from 0, N1N-1, respectively. We consider the generic case of subsequent average or median co-additions produce the stacked science and reference images. The image subtraction employed to obtain the final difference image DD is given by

D=j=0M1SjGj[i=0N1RiHi]KD=\sum_{j=0}^{M-1}S_{j}\circledast G_{j}-[\sum_{i=0}^{N-1}R_{i}\circledast H_{i}]\circledast K (C1)

For simplicity, the convolution kernels GjG_{j} and HiH_{i} for PSF-homogenisation are divided by number of science (SjS_{j}) and reference (RiR_{i}) images MM and NN, respectively. Assuming that a decorrelation kernel QQ exists which can whiten the noise of DD, we can calculate QQ using the equation 𝔇=DQ\mathfrak{D}=D\circledast Q where 𝔇𝒩(0,σ𝔇2)\mathfrak{D}\sim\mathcal{N}(0,\,\sigma_{\mathfrak{D}}^{2}).

The covariance matrix of 𝔇\mathfrak{D} in Fourier space can be written as

Cov(𝔇^(p),𝔇^(q))=LxLyδ(p,q)Q^(p)Q^(q){jσSj2Gj^(p)Gj^(q)+iσRi2K^(p)K^(q)Hi^(p)Hi^(q)},\begin{split}{\rm Cov}(\widehat{\mathfrak{D}}(p),\widehat{\mathfrak{D}}(q))=L_{x}&L_{y}\delta(p,q)\widehat{Q}(p)\widehat{Q}(q)^{*}\\ \{\sum_{j}{\sigma_{S_{j}}^{2}\widehat{G_{j}}(p)\widehat{G_{j}}(q)^{*}}&+\sum_{i}{\sigma_{R_{i}}^{2}\widehat{K}(p)\widehat{K}(q)^{*}\widehat{H_{i}}(p)\widehat{H_{i}}(q)^{*}}\},\end{split} (C2)

where LxL_{x} and LyL_{y} are the image dimensions in xx and yy directions, respectively, and pp and qq are pixel indices of the image frame.

The Foruier Transform of the decorrelation kernel Q^\widehat{Q} can be derived by setting q=pq=p,

|Q^(p)|2=σ𝔇2/{jσSj2|Gj^(p)|2+iσRi2|K^(p)|2|Hi^(p)|2}.\begin{split}\mathinner{\!\left\lvert\widehat{Q}(p)\right\rvert}^{2}=\sigma_{\mathfrak{D}}^{2}/\{\sum_{j}{\sigma_{S_{j}}^{2}\mathinner{\!\left\lvert\widehat{G_{j}}(p)\right\rvert}^{2}}+\sum_{i}{\sigma_{R_{i}}^{2}\mathinner{\!\left\lvert\widehat{K}(p)\right\rvert}^{2}\mathinner{\!\left\lvert\widehat{H_{i}}(p)\right\rvert}^{2}}\}.\end{split} (C3)

The final solution to Q^\widehat{Q} should be conjugate symmetric to ensure its inverse Fourier Transformation to be real. Here we consider the most straightforward solution with Q^\widehat{Q} being a real function only, that is

Q0^=σ𝔇2/{jσSj2|Gj^|2+iσRi2|K^|2|Hi^|2}.\begin{split}\widehat{Q_{0}}=\sqrt{\sigma_{\mathfrak{D}}^{2}/\{\sum_{j}{\sigma_{S_{j}}^{2}\mathinner{\!\left\lvert\widehat{G_{j}}\right\rvert}^{2}}+\sum_{i}{\sigma_{R_{i}}^{2}\mathinner{\!\left\lvert\widehat{K}\right\rvert}^{2}\mathinner{\!\left\lvert\widehat{H_{i}}\right\rvert}^{2}}\}}.\end{split} (C4)

Note σ𝔇\sigma_{\mathfrak{D}} is the desired noise of decorrelated difference image. In principle, it should be set to be as close as possible to the true background in regions free of astronomical objects. In practice, this normalization can also be set by requiring the decorrelation procedure to preserve the flux zero-point of the images. In the latter case, SFFT simply normalizes the decorrelation kernel QQ to have a unit kernel sum.

There is a major difference between SFFT and ZOGY (Zackay et al., 2016) for noise decorrelation, although they share the same statistical principles. In ZOGY, convolution kernels for co-addition and subtraction are tied to the PSFs of the images. SFFT does not need to model the PSFs for the images SjS_{j} and RiR_{i} for the noise decorrelation process. Only the match kernels GjG_{j}, HiH_{i}, and KK are needed for SFFT. This can be even more convenient for images with simple co-additions of original observations without matching the PSFs, such as observations taken under stable seeing conditions, only the match kernel KK is needed for SFFT, and no PSF construction is necessary.

We select ten DECam images from Table B for testing the performance of noise decorrelation. The generic case of image subtraction follows Equation (C1), with {R0R_{0}, R1R_{1}, R2R_{2}, R3R_{3}, R4R_{4}} = {DECam-OBS18a, DECam-OBS18b, DECam-OBS18c, DECam-OBS18d, DECam-OBS18e} being the individual reference images, and {S0S_{0}, S1S_{1}, S2S_{2}, S3S_{3}, S4S_{4}} = {DECam-OBS04a, DECam-OBS04b, DECam-OBS04c, DECam-OBS04d, DECam-OBS04e} being the individual science images. All the images have been astronomically aligned to S0S_{0} by SWarp. We create the stacked reference image by median co-addition of the five individual reference images with PSF homogenization matching to R0R_{0}. Similarly, the stacked science image is the median coadd of the five individual science images after matching their PSFs to S0S_{0}. The final subtraction is performed between the stacked reference and stacked science image. Noise decorrelation for the difference image is conducted by convolving the decorrelation kernel calculated by Equation (C4). As the spatial variation has been ignored, here, the example only focuses on a small area around the supernova candidate AT 2018fjd discovered in DECamERON survey (Hu et al., 2018).

We trace the background pixel correlation along with the coadd and subtraction processes, shown in Figure 14. Note that image alignment can also introduce pixel correlation via a localized resampling function (LANCZOS3 function of SWarp in this case). One can notice that the pixel correlation in resampled image R0R_{0} is already slightly higher than un-resampled image S0S_{0}. The correlation is increased drastically in co-added images as multiple convolutions for PSF homogenization come into play in this process. It becomes even stronger after the final subtraction. Nevertheless, our decorrelation scenario can effectively reduce the noise correlation on the final difference image to a quite low level comparable with that of a resampled individual image R0R_{0}.

Table A2: HOTPANTS Parameters
Parameter Value Note
-r 2×FWHML\quad\text{2}\times\text{FWHM}_{\text{L}} Convolution kernel half-width (pixel)
-rss 6×FWHML\quad\text{6}\times\text{FWHM}_{\text{L}} Substamp half-width (pixel)
-nsx    NX / 200 Image segmentation of stamps (x axis)
-nsy    NY / 200 Image segmentation of stamps (y axis)
-ko    2 Spatial order of kernel variation
-bgo    2 Spatial order of background variation
-tu    saturation recorded in reference header Upper valid flux of the reference image
-tl sky(reference)10×skysigma(reference)\quad\text{sky(reference)}-\text{10}\times\text{skysigma(reference)} Lower valid flux of the reference image
-iu    saturation recorded in science header Upper valid flux of the science image
-il sky(science)10×skysigma(science)\quad\text{sky(science)}-\text{10}\times\text{skysigma(science)} Lower valid flux of the science image

Note. — FWHML\text{FWHM}_{\text{L}} is the worse seeing measured from the input image-pair. Note the ratio of 2 in parameter r-r is consistent with the default configuration of SFFT (see -KerHWRatio). The parameters -ko and -bgo are equivalent to SFFT paramters -KerPolyOrder and -BGPolyOrder, respectively. The symbols NX and NY indicate the image size along x axis and y axis, respectively. sky and skysigma describe the sky background measured by MMM algorithm. The HOTPANTS configurations here largely refer to those in iPTF image subtraction pipeline (Cao et al., 2016).

Table A3: ZOGY Parameters
Parameter Value Note
-subimage_size    256 Size of subimages (pixel)
-subimage_border    32 Border around subimage to avoid edge effects (pixel)
-fratio_local    F Flux ratio from subimage (T) or full frame (F)
-psf_poldeg    2 Polynomial degree for PSF spatial variation
-size_vignet    49 Size of the SExtractor VIGNETS for PSF construction
-nthreads    32 Number for CPU multithreading
Table A4: PyTorchDIA Parameters
Parameter Value Note
-loss_fn    robust loss function (robust or Gaussian)
-flat    1 Initialization value of the convolution kernel
-ks 4×FWHML+1\quad\text{4}\times\text{FWHM}_{\text{L}}+1 Kernel size
-poly_degree    2 Polynomial degree for background fit

Note. — FWHML\text{FWHM}_{\text{L}} is the worse seeing measured from the input image-pair.

Table B: Specification of the test data
Instrument File Alias File Name Exposure Time FWHM 5σ\sigma Lim. Mag
(s) (arcsec) (mag)
   ZTF    ZTF-REF    ztf_\_001735_\_zg_\_c01_\_q2_\_refimg       1200    2.02       22.89
   ZTF    ZTF-SCI    ztf_\_20180705481609_\_001735_\_zg_\_c01_\_o_\_q2_\_sciimg       30    1.80       20.68
   AST3-II    AST-REF    a0331.94       60    2.41       -
   AST3-II    AST-SCI    a0405.162       60    2.96       -
   TESS    TESS-REF    tess2018258205941-s0002-1-1-0121-s_\_ffic.001       1440    36.95       -
   TESS    TESS-SCI    tess2018258225941-s0002-1-1-0121-s_\_ffic.001       1440    36.89       -
   DECam    DECam-SREF    c4d_\_180806_\_052738_\_ooi_\_i_\_v1       330    0.85       24.35
   DECam    DECam-PTAR    c4d_\_150821_\_001224_\_ooi_\_i_\_v1       330    1.40       22.73
   DECam    DECam-OBS18a    c4d_\_160818_\_043331_\_ooi_\_i_\_v1       330    1.04       23.28
   DECam    DECam-OBS18b    c4d_\_160818_\_020339_\_ooi_\_i_\_v1       330    1.07       23.35
   DECam    DECam-OBS18c    c4d_\_160818_\_030325_\_ooi_\_i_\_v1       330    0.96       23.45
   DECam    DECam-OBS18d    c4d_\_160818_\_053313_\_ooi_\_i_\_v1       330    1.12       23.09
   DECam    DECam-OBS18e    c4d_\_160818_\_065148_\_ooi_\_i_\_v1       330    1.01       23.32
   DECam    DECam-OBS02a    c4d_\_180802_\_052807_\_ooi_\_i_\_v1       330    1.38       23.40
   DECam    DECam-OBS02b    c4d_\_180802_\_055800_\_ooi_\_i_\_v1       330    1.31       23.55
   DECam    DECam-OBS02c    c4d_\_180802_\_062754_\_ooi_\_i_\_v1       330    1.22       23.60
   DECam    DECam-OBS02d    c4d_\_180802_\_065746_\_ooi_\_i_\_v1       330    1.41       23.33
   DECam    DECam-OBS02e    c4d_\_180802_\_072740_\_ooi_\_i_\_v1       330    1.21       23.58
   DECam    DECam-OBS02f    c4d_\_180802_\_075732_\_ooi_\_i_\_v1       330    1.29       23.62
   DECam    DECam-OBS02g    c4d_\_180802_\_085719_\_ooi_\_i_\_v1       330    1.24       23.55
   DECam    DECam-OBS02h    c4d_\_180802_\_092739_\_ooi_\_i_\_v1       330    1.35       23.42
   DECam    DECam-OBS04a    c4d_\_180804_\_092331_\_ooi_\_i_\_v1       330    1.41       23.50
   DECam    DECam-OBS04b    c4d_\_180804_\_052409_\_ooi_\_i_\_v1       330    1.37       23.62
   DECam    DECam-OBS04c    c4d_\_180804_\_055402_\_ooi_\_i_\_v1       330    1.57       23.43
   DECam    DECam-OBS04d    c4d_\_180804_\_075344_\_ooi_\_i_\_v1       330    1.36       23.61
   DECam    DECam-OBS04e    c4d_\_180804_\_082338_\_ooi_\_i_\_v1       330    1.10       23.89
   DECam    DECam-OBS04f    c4d_\_180804_\_045412_\_ooi_\_i_\_v1       330    1.46       23.45
   DECam    DECam-OBS04g    c4d_\_180804_\_062356_\_ooi_\_i_\_v1       330    1.68       23.35
   DECam    DECam-OBS04h    c4d_\_180804_\_065350_\_ooi_\_i_\_v1       330    1.45       23.58
   DECam    DECam-OBS04i    c4d_\_180804_\_072342_\_ooi_\_i_\_v1       330    1.66       23.22
   DECam    DECam-OBS04j    c4d_\_180804_\_085332_\_ooi_\_i_\_v1       330    1.40       23.51
   TMTS    TMTS-REF    f20191103_\_1_\_NT0023_\_L_\_1965_\_1970       60    6.45       -
   TMTS    TMTS-SCI    f20191028_\_1_\_NT0023_\_L_\_755_\_760       60    7.46       -

Note. — ZTF-REF, directly retreived from ZTF Data Release 3, is coadded from 40 individual observations as a deep reference. TESS-REF and TESS-SCI are Full-Frame images (FFIs) recorded at 30 minutes cadence, with effective integration time of 1440s. TMTS-REF (TMTS-SCI) is median stacked from 6 consecutive observations, each of which has exposure time of 10 seconds. Other images in the table are single-exposure observations. Each DECam exposure is comprised of 62 CCD images, the FWHM and limiting magnitude for each exposure in the table shows the median measurement over all CCD tiles.

References

  • Akhlaghi & Ichikawa (2015) Akhlaghi, M., & Ichikawa, T. 2015, ApJS, 220, 1, doi: 10.1088/0067-0049/220/1/1
  • Alard (2000) Alard, C. 2000, A&AS, 144, 363, doi: 10.1051/aas:2000214
  • Alard & Lupton (1998) Alard, C., & Lupton, R. H. 1998, ApJ, 503, 325, doi: 10.1086/305984
  • Albrow et al. (2009) Albrow, M. D., Horne, K., Bramich, D. M., et al. 2009, MNRAS, 397, 2099, doi: 10.1111/j.1365-2966.2009.15098.x
  • Astropy Collaboration et al. (2013) Astropy Collaboration, Robitaille, T. P., Tollerud, E. J., et al. 2013, A&A, 558, A33, doi: 10.1051/0004-6361/201322068
  • Baillon et al. (1993) Baillon, P., Bouquet, A., Giraud-Heraud, Y., & Kaplan, J. 1993, A&A, 277, 1. https://arxiv.org/abs/astro-ph/9211002
  • Becker (2015) Becker, A. 2015, HOTPANTS: High Order Transform of PSF ANd Template Subtraction. http://ascl.net/1504.004
  • Becker et al. (2012) Becker, A. C., Homrighausen, D., Connolly, A. J., et al. 2012, MNRAS, 425, 1341, doi: 10.1111/j.1365-2966.2012.21542.x
  • Bellm et al. (2018) Bellm, E. C., Kulkarni, S. R., Graham, M. J., et al. 2018, Publications of the Astronomical Society of the Pacific, 131, 018002, doi: 10.1088/1538-3873/aaecbe
  • Bellm et al. (2019) Bellm, E. C., Kulkarni, S. R., Graham, M. J., et al. 2019, PASP, 131, 018002, doi: 10.1088/1538-3873/aaecbe
  • Bertin (2010) Bertin, E. 2010, SWarp: Resampling and Co-adding FITS Images Together. http://ascl.net/1010.068
  • Bertin (2011) Bertin, E. 2011, in Astronomical Society of the Pacific Conference Series, Vol. 442, Astronomical Data Analysis Software and Systems XX, ed. I. N. Evans, A. Accomazzi, D. J. Mink, & A. H. Rots, 435
  • Bertin & Arnouts (1996) Bertin, E., & Arnouts, S. 1996, A&AS, 117, 393, doi: 10.1051/aas:1996164
  • Blum et al. (2016) Blum, R. D., Burleigh, K., Dey, A., et al. 2016, in American Astronomical Society Meeting Abstracts, Vol. 228, American Astronomical Society Meeting Abstracts #228, 317.01
  • Bramich (2008) Bramich, D. M. 2008, Monthly Notices of the Royal Astronomical Society: Letters, 386, L77, doi: 10.1111/j.1745-3933.2008.00464.x
  • Bramich et al. (2016) Bramich, D. M., Horne, K., Alsubai, K. A., et al. 2016, MNRAS, 457, 542, doi: 10.1093/mnras/stv2910
  • Bramich et al. (2013) Bramich, D. M., Horne, K., Albrow, M. D., et al. 2013, MNRAS, 428, 2275, doi: 10.1093/mnras/sts184
  • Cao et al. (2016) Cao, Y., Nugent, P. E., & Kasliwal, M. M. 2016, PASP, 128, 114502, doi: 10.1088/1538-3873/128/969/114502
  • Crotts (1992) Crotts, A. P. S. 1992, ApJ, 399, L43, doi: 10.1086/186602
  • Gal-Yam et al. (2008) Gal-Yam, A., Maoz, D., Guhathakurta, P., & Filippenko, A. V. 2008, ApJ, 680, 550, doi: 10.1086/587680
  • Givon et al. (2019) Givon, L. E., Unterthiner, T., Erichson, N. B., et al. 2019, scikit-cuda 0.5.3: a Python interface to GPU-powered libraries, doi: 10.5281/zenodo.3229433
  • Harris et al. (2020) Harris, C. R., Millman, K. J., van der Walt, S. J., et al. 2020, Nature, 585, 357–362, doi: 10.1038/s41586-020-2649-2
  • Hartung et al. (2012) Hartung, S., Shukla, H., Miller, J. P., & Pennypacker, C. 2012, in 2012 19th IEEE International Conference on Image Processing, 1685–1688, doi: 10.1109/ICIP.2012.6467202
  • Hitchcock et al. (2021) Hitchcock, J. A., Hundertmark, M., Foreman-Mackey, D., et al. 2021, MNRAS, 504, 3561, doi: 10.1093/mnras/stab1114
  • Honscheid & DePoy (2008) Honscheid, K., & DePoy, D. L. 2008, arXiv e-prints, arXiv:0810.3600. https://arxiv.org/abs/0810.3600
  • Hough (1959) Hough, P. 1959, Conf. Proc. C, 590914, 554
  • Hu et al. (2021) Hu, L., Wang, L., & Chen, X. 2021, sfft, 1.0.3, Zenodo, doi: 10.5281/zenodo.5521634
  • Hu et al. (2018) Hu, L., Wang, L., Koekemoer, A., et al. 2018, Transient Name Server Discovery Report, 2018-1238, 1
  • Hunter (2007) Hunter, J. D. 2007, Computing in Science Engineering, 9, 90, doi: 10.1109/MCSE.2007.55
  • Ivezić et al. (2019) Ivezić, Ž., Kahn, S. M., Tyson, J. A., et al. 2019, The Astrophysical Journal, 873, 111, doi: 10.3847/1538-4357/ab042c
  • Klöckner et al. (2012) Klöckner, A., Pinto, N., Lee, Y., et al. 2012, Parallel Computing, 38, 157, doi: https://doi.org/10.1016/j.parco.2011.09.001
  • Kochanski et al. (1996) Kochanski, G. P., Tyson, J. A., & Fischer, P. 1996, AJ, 111, 1444, doi: 10.1086/117889
  • Lam et al. (2015) Lam, S. K., Pitrou, A., & Seibert, S. 2015, in Proceedings of the Second Workshop on the LLVM Compiler Infrastructure in HPC, LLVM ’15 (New York, NY, USA: Association for Computing Machinery), doi: 10.1145/2833157.2833162
  • Mao & Paczynski (1991) Mao, S., & Paczynski, B. 1991, ApJ, 374, L37, doi: 10.1086/186066
  • Masci et al. (2017) Masci, F. J., Laher, R. R., Rebbapragada, U. D., et al. 2017, PASP, 129, 014002, doi: 10.1088/1538-3873/129/971/014002
  • Miller et al. (2008) Miller, J. P., Pennypacker, C. R., & White, G. L. 2008, Publications of the Astronomical Society of the Pacific, 120, 449, doi: 10.1086/588258
  • Morganson et al. (2018) Morganson, E., Gruendl, R. A., Menanteau, F., et al. 2018, PASP, 130, 074501, doi: 10.1088/1538-3873/aab4ef
  • Mould et al. (2017) Mould, J., Abbott, T., Cooke, J., et al. 2017, Science Bulletin, 62, 675, doi: 10.1016/j.scib.2017.04.007
  • Okuta et al. (2017) Okuta, R., Unno, Y., Nishino, D., Hido, S., & Loomis, C. 2017, in Proceedings of Workshop on Machine Learning Systems (LearningSys) in The Thirty-first Annual Conference on Neural Information Processing Systems (NIPS). http://learningsys.org/nips17/assets/papers/paper_16.pdf
  • Phillips & Davis (1995) Phillips, A. C., & Davis, L. E. 1995, in Astronomical Society of the Pacific Conference Series, Vol. 77, Astronomical Data Analysis Software and Systems IV, ed. R. A. Shaw, H. E. Payne, & J. J. E. Hayes, 297
  • Price & Magnier (2019) Price, P. A., & Magnier, E. A. 2019, arXiv e-prints. https://arxiv.org/abs/1901.09999
  • Reiss & Lupton (2016) Reiss, D. J., & Lupton, R. H. 2016, DMTN-021: Implementation of Image Difference Decorrelation, doi: 10.5281/zenodo.192833
  • Ricker et al. (2015) Ricker, G. R., Winn, J. N., Vanderspek, R., et al. 2015, Journal of Astronomical Telescopes, Instruments, and Systems, 1, 014003, doi: 10.1117/1.JATIS.1.1.014003
  • Sedaghat & Mahabal (2018) Sedaghat, N., & Mahabal, A. 2018, Monthly Notices of the Royal Astronomical Society, 476, 5365, doi: 10.1093/mnras/sty613
  • Sumi et al. (2003) Sumi, T., Abe, F., Bond, I. A., et al. 2003, The Astrophysical Journal, 591, 204, doi: 10.1086/375212
  • Sumi et al. (2006) Sumi, T., Woźniak, P. R., Udalski, A., et al. 2006, The Astrophysical Journal, 636, 240, doi: 10.1086/497951
  • Sumi et al. (2013) Sumi, T., Bennett, D. P., Bond, I. A., et al. 2013, The Astrophysical Journal, 778, 150, doi: 10.1088/0004-637x/778/2/150
  • Tomaney & Crotts (1996) Tomaney, A. B., & Crotts, A. P. S. 1996, AJ, 112, 2872, doi: 10.1086/118228
  • Virtanen et al. (2020) Virtanen, P., Gommers, R., Oliphant, T. E., et al. 2020, Nature Methods, 17, 261, doi: 10.1038/s41592-019-0686-2
  • Wang et al. (2017) Wang, L., Ma, B., Li, G., et al. 2017, AJ, 153, 104, doi: 10.3847/1538-3881/153/3/104
  • Watson et al. (2006) Watson, C. L., Henden, A. A., & Price, A. 2006, Society for Astronomical Sciences Annual Symposium, 25, 47
  • Yuan & Akerlof (2008) Yuan, F., & Akerlof, C. W. 2008, The Astrophysical Journal, 677, 808, doi: 10.1086/529040
  • Yuan et al. (2014) Yuan, X., Cui, X., Gu, B., et al. 2014, in Society of Photo-Optical Instrumentation Engineers (SPIE) Conference Series, Vol. 9145, Ground-based and Airborne Telescopes V, 91450F, doi: 10.1117/12.2055624
  • Zackay et al. (2016) Zackay, B., Ofek, E. O., & Gal-Yam, A. 2016, The Astrophysical Journal, 830, 27, doi: 10.3847/0004-637x/830/1/27
  • Zhang et al. (2020) Zhang, J.-C., Wang, X.-F., Mo, J., et al. 2020, PASP, 132, 125001, doi: 10.1088/1538-3873/abbea2
  • Zwicky (1964) Zwicky, F. 1964, Annales d’Astrophysique, 27, 300