REVIEW 3 major objections 5 minor 1 cited by
dfreproject: A Python package for astronomical reprojection
T0 review · 3 major / 5 minor · reviewed 2026-08-15 · deepseek-v4-flash
Pith's one-line read A Python package makes astronomical reprojection up to 20× faster on GPUs by factoring the coordinate transform into vectorized Gnomonic steps.
desk verdict A useful, genuinely faster TAN/SIP reprojection package whose 'direct replacement' claim overreaches beyond its Gnomonic-only implementation. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The load-bearing device is a factored Gnomonic-projection transform. Instead of calling a general WCS engine for every pixel, the package writes the mapping as a composition of four invertible stages: a shift to the reference pixel, an SIP (standard imaging polynomial) distortion, a 2-by-2 CD matrix encoding rotation, scale, and skew, and the Gnomonic projection to celestial coordinates. Because each stage is expressed as a uniform array operation, the whole chain can be vectorized across the image and executed on a GPU. A second mechanism is the footprint tensor: an identity array projected through the same transform and used to normalize the interpolated image, giving local flux conservation.
What would settle it
Feed the package a FITS file whose header uses a non-Gnomonic projection such as AIT or SIN and run the same interpolating-reprojection call; if it fails or disagrees with the standard result beyond interpolation noise, the direct-replacement claim is false for that input class.
Extended reading notes
Core claim
The paper claims that dfreproject can serve as a direct replacement for the standard interpolating reprojection routine: given a source image in FITS form, a target World Coordinate System, and an optional output shape, one call returns the reprojected image. The speed comes from factoring the forward and inverse coordinate transforms into four stages—pixel-origin shift, SIP polynomial distortion, a 2-by-2 CD matrix, and the Gnomonic projection—computed as whole-array operations. A footprint identity tensor is projected alongside the image and used to normalize the interpolation, giving local flux conservation. In the demonstration, a 50-by-50 image shifted by half a pixel and 0.005 degrees reproduces the standard bilinear result to within noise, with small normalization differences at Gaussian peaks. Benchmarks from 256-by-256 up to 4000-by-6000 images report up to 20× speedup on an RTX 4060 GPU and up to 10× on an i9-14900HX CPU, with the largest gains when SIP distortion is included.
Load-bearing premise
The load-bearing premise is that every source and target image can be represented with a Gnomonic (TAN) projection plus optional SIP distortion, so the direct-replacement claim only holds for that class of images.
Editorial extensions
If this is right
- A pipeline that already uses the standard interpolating reprojector can switch with a one-line import change and get the speedup for Gnomonic (TAN) images with SIP distortion.
- For large survey frames, the reprojection step no longer needs to dominate the reduction time.
- The scheme keeps its performance advantage when SIP distortion is present, which matters for wide-field cameras with significant optical distortion.
- Local flux conservation via the footprint means the faster path is usable for photometric work, not only for display or warping.
- The accuracy ceiling is set by the underlying interpolation scheme: the demo shows agreement with the standard bilinear output to within noise.
Reading between the lines
- Because the method explicitly instantiates only the Gnomonic stage, a natural extension is to implement the same factorization for AIT or SIN projections and measure how much of the speedup transfers; the paper does not attempt this.
- The composed, vectorized transform is amenable to gradient-based optimization of the WCS parameters or per-frame alignment offsets, a capability the paper leaves implicit.
- If used inside large stacking loops, the total gain may exceed the per-image speedup because fixed import and setup costs are amortized across thousands of exposures.
Signed reviews
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The manuscript introduces dfreproject, a Python/PyTorch package for astronomical image reprojection. The method computes pixel-by-pixel shifts between a source and target WCS by decomposing the transformation into a Gnomonic (TAN) projection, SIP polynomial distortion, and CD matrix rotation/scaling, then interpolates the source image with a flux-conserving footprint. The authors report speedups over the commonly used reproject package of up to 20X on a GPU and 10X on a CPU, and they claim in Section 2 that dfreproject 'can be used as a direct replacement for reproject.reproject_interp'. Accuracy is demonstrated with a single 50x50 TAN image shifted by 0.5 pixels and 0.005 degrees, where the difference with reproject is described qualitatively as noise. The paper concludes that the package is intended primarily for the high-volume data stream of the forthcoming Dragonfly Telephoto Array.
Significance. If the speedup and accuracy claims hold, the package addresses a genuine bottleneck in modern imaging pipelines: the paper's target use case (>1000 simultaneous exposures) makes per-image reprojection cost a real operational concern. Using PyTorch for GPU vectorization is a sensible engineering choice, and the 'direct replacement' API is convenient if the supported WCS regime is sufficient. The manuscript is honest that the method uses Gnomonic projections, but it overreaches by claiming drop-in compatibility with reproject, which supports the full set of FITS projections. The accuracy validation is currently too thin to support the generality of the claim. The strengths are the clear motivation, the availability of demo scripts for reproducibility, and the explicit reference to the FITS/SIP standards papers. The weaknesses are the unqualified generality claim, an underspecified SIP sign convention, and a purely qualitative accuracy comparison.
major comments (3)
- [§2, §3.1, §4.1] The claim in Section 2 that dfreproject 'can be used as a direct replacement for reproject.reproject_interp' is not supported for the general inputs that reproject accepts. Section 3.1, step 1 fixes the deprojection to the Gnomonic projection, and Section 3.2 derives only TAN formulas. Reproject delegates to astropy/wcslib and supports standard FITS projections such as SIN, AIT, and AZP. For any source or target WCS with a non-TAN projection, the package cannot reproduce the reproject transformation. The Section 4.1 demo tests only a TAN image with a small shift and therefore does not demonstrate broader compatibility. Please either qualify the 'direct replacement' claim to explicitly state the TAN/SIP-only regime, or implement and test the general projection path.
- [§3.2.1, §3.2.2] The SIP sign convention is not specified and appears to be opposite to the standard convention. The forward equations subtract the SIP polynomials (u = u - SIP_A(u,v), v = v - SIP_B(u,v)), and the inverse equations subtract the inverse polynomials, whereas the SIP convention of Shupe et al. (2005), as implemented in astropy, applies the forward distortion by adding A and B to the pixel coordinates. If a standard FITS header is read and the coefficients are used in the equations as written, the distortion correction will be applied with the wrong sign. This is a load-bearing point for the direct-replacement claim even within the TAN+SIP regime. Please state the sign convention explicitly and verify the implementation against a standard SIP header.
- [§4.1] The accuracy validation is not quantitative. The demo compares one 50x50 TAN image and reports that differences in noisy regions are 'pure noise' and that there are 'slight differences' at the Gaussian locations, but no numerical error metrics are given (no RMS, maximum absolute error, or centroid offsets). The text also attributes some differences to normalization, which suggests the flux-conservation footprint normalization does not exactly match reproject's behavior. Please add quantitative metrics for the current demo and test at least one image with nonzero SIP distortion to confirm that the coordinate model in Section 3.2 is implemented correctly.
minor comments (5)
- [§1] There is a typo in the first sentence: 'digitially' should be 'digitally'.
- [§3.1] The subsection list numbering is inconsistent: step 1 contains substeps all numbered 1-4, and step 2 likewise restarts at 1. Please renumber to 1a/1b/2a/2b or use a nested list format.
- [§3.2] The variable theta is used without a definition. From the formulas it appears to be the angular separation from the reference direction (a colatitude-like coordinate), but this should be stated explicitly. The constant r0 = 180/pi is also introduced without explanation.
- [§4.1] 'heeader' is a typo for 'header'.
- [§4.2] The speedup claim is central, but the text gives no numerical values and no description of the benchmarking methodology (number of runs, warm-up, GPU memory transfer, or whether the same pixel grid is used for both packages). The scripts are mentioned as being in the demos directory, so this is a reproducibility concern rather than a fatal one; please add a short methodology paragraph or table.
Circularity Check
No circularity: speed and accuracy claims are benchmarked against the external reproject package, and the coordinate transformations follow the cited FITS/SIP standards.
full rationale
The paper's central claims are empirical performance and functional agreement: dfreproject's routines are timed against reproject (§4.2) and its output is compared pixel-by-pixel with reproject's output (§4.1). These are external baselines, not quantities defined in terms of dfreproject itself. The coordinate transformation in §3.2 is built directly from the FITS and SIP conventions cited in Greisen & Calabretta (2002), Calabretta & Greisen (2002), and Shupe et al. (2005), with no fitted parameters and no self-citation chain carrying the argument. The main weakness, that §3.1 fixes the WCS deprojection to the Gnomonic (TAN) projection while reproject supports many FITS projections, is a scope limitation and a potential overclaim of the 'direct replacement' statement, but it is not a circularity: the package does not define its target result in terms of its inputs, nor does it rename a fitted quantity as a prediction. Accordingly, the appropriate circularity score is 0.
Assumptions & free parameters
assumptions (4)
- domain assumption FITS World Coordinate System standard as defined in Greisen & Calabretta (2002) and Calabretta & Greisen (2002)
- domain assumption SIP distortion convention as defined by Shupe et al. (2005)
- ad hoc to paper Gnomonic (TAN) projection is sufficient for the intended images
- domain assumption PyTorch GPU/CPU environment provides the needed vectorized operations
Cite this review
Pith. "Pith review of dfreproject: A Python package for astronomical reprojection." pith.science (2026). https://pith.science/paper/6BRCV5OO
@misc{pith2026250503932,
author = {Pith},
title = {Pith review of: dfreproject: A Python package for astronomical reprojection},
year = {2026},
howpublished = {\url{https://pith.science/paper/6BRCV5OO}},
note = {Machine review of arXiv:2505.03932}
}
read the original abstract
Deep astronomical images are often constructed by digitially stacking many individual sub-exposures. Each sub-exposure is expected to show small differences in the positions of stars and other objects in the field, due to the movement of the celestial bodies, changes/imperfections in the opto-mechanical imaging train, and other factors. To maximize image quality, one must ensure that each sub-exposure is aligned to a common frame of reference prior to stacking. This is done by reprojecting each exposure onto a common target grid defined using a World Coordinate System (WCS) that is defined by mapping the known angular positions of reference objects to their observed spatial positions on each image. The transformations needed to reproject images involve complicated trigonometric expressions which can be slow to compute, so reprojection can be a major bottleneck in image processing pipelines. To make astronomical reprojections faster to implement in pipelines, we have written `dfreproject`, a Python package of GPU-optimized functions for this purpose. The package's functions break down coordinate transformations using Gnomonic projections to define pixel-by-pixel shifts from the source to the target plane. The package also provides tools for interpolating a source image onto a target plane with a single function call. This module follows the FITS and SIP formats laid out in the seminal papers. Compared to common alternatives, `dfreproject`'s routines result in speedups of up to 20X when run on a GPU and 10X when run on a CPU.
Figures
Forward citations
Cited by 1 Pith paper
-
Numerous bow shocks in the outer Helix Nebula
Twenty-two bow shocks in the outer Helix Nebula trace the progressive fragmentation of AGB shell clumps and imply a ~10,000 year timescale for their disruption into the ISM.
Reference graph
Works this paper leans on
-
[1]
M., Lim, P
Astropy Collaboration, Price-Whelan, A. M., Lim, P. L., Earl, N., Starkman, N., Bradley, L., Shupe, D. L., Patil, A. A., Corrales, L., Brasseur, C. E., Nöthe, M., Donath, A., Tollerud, E., Morris, B. M., Ginsburg, A., Vaher, E., Weaver, B. A., Tocknell, J., Jamieson, W., Astropy Project Contributors. (2022). The Astropy Project : Sustaining and Growing a ...
2022
-
[2]
Astropy Collaboration, Price-Whelan, A. M., Sipőcz, B. M., Günther, H. M., Lim, P. L., Crawford, S. M., Conseil, S., Shupe, D. L., Craig, M. W., Dencheva, N., Ginsburg, A., VanderPlas, J. T., Bradley, L. D., Pérez-Suárez, D., Val-Borro, M. de, Aldcroft, T. L., Cruz, K. L., Robitaille, T. P., Tollerud, E. J., Astropy Contributors. (2018). The Astropy Proje...
doi:10.3847/1538-3 2018
-
[3]
Astropy Collaboration, Robitaille, T. P., Tollerud, E. J., Greenfield, P., Droettboom, M., Bray, E., Aldcroft, T., Davis, M., Ginsburg, A., Price-Whelan, A. M., Kerzendorf, W. E., Conley, A., Crighton, N., Barbary, K., Muna, D., Ferguson, H., Grollier, F., Parikh, M. M., Nair, P. H., Streicher, O. (2013). Astropy: A community Python package for astronomy....
-
[4]
Beroiz, M., Cabral, J. B., & Sanchez, B. (2020). Astroalign: A Python module for astronomical image registration. Astronomy and Computing, 32, 100384. https://doi.org/10.1016/j.ascom.2020.100384
arXiv 2020
-
[5]
Calabretta, M. R., & Greisen, E. W. (2002). Representations of celestial coordinates in FITS . A&A, 395(3), 1077--1122. https://doi.org/10.1051/0004-6361:20021327
-
[6]
Crameri, F. (2023). Scientific colour maps. Zenodo. https://doi.org/10.5281/zenodo.8409685
-
[7]
Greisen, E. W., & Calabretta, M. R. (2002). Representations of world coordinates in FITS . Astronomy and Astrophysics, 395, 1061--1075. https://doi.org/10.1051/0004-6361:20021326
-
[8]
Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury, J., Chanan, G., Killeen, T., Lin, Z., Gimelshein, N., Antiga, L., Desmaison, A., Köpf, A., Yang, E., DeVito, Z., Raison, M., Tejani, A., Chilamkurthy, S., Steiner, B., Fang, L., Chintala, S. (2019). PyTorch : An Imperative Style , High - Performance Deep Learning Library . https://doi.org/10.48550/arX...
Show all 10 references
-
[9]
Robitaille, T., Deil, C., & Ginsburg, A. (2020). Reproject: Python -based astronomical image reprojection. Astrophysics Source Code Library, ascl:2011.023. https://ui.adsabs.harvard.edu/abs/2020ascl.soft11023R
2020
-
[10]
## 999S V``TfM5nX 6oN:u=8qBϟׅ mܸQ ֹs 4 *THE U*UTF uA-Z zKKKөSta> Z.]Rxx.]K.)&&F7 tq Ο?SN|& 1 kԨA]C 1WPPΜ9㺐 f: Uۚ:u ܹs8q&NzO>Q۶ms, /^ӵl2mڴ Ҕ(= V 7n:t蠇 X =\]] ?[6lؠsj:u]ϏW||
Shupe, D. L., Moshir, M., Li, J., Makovoz, D., Narron, R., & Hook, R. N. (2005). The SIP Convention for Representing Distortion in FITS Image Headers . 347, 491. https://ui.adsabs.harvard.edu/abs/2005ASPC..347..491S CSLReferences document sip_comparison_line_cpu.png00006640000...
2005
Reviewed August 15, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.