Padova-Asiago Supernova Group
ECsnoopy: a package for transient photometry.
powered by AstroPy


ECsnoopy is a Python package developed by Enrico Cappellaro to streamline the analysis of transient photometry obtained by diverse telescopes and instruments. The package provides tools for accurately measures transient magnitudes while effectively removing the host-galaxy contribution using techniques such as PSF fitting and/or reference-image subtraction.

Code description

ECsnoopy leverages the astropy ecosystem and in particular it makes use of Photutils (Bradley L., et al., 2025, zndo. doi:10.5281/zenodo.14889440) for PSF modelling and fitting. It integrates HOTPANTS (Becker A., 2015, ascl.soft. ascl:1504.004) to perform efficient PSF-matched image differencing.
Additionally, ECsnoopy employs SExtractor (Bertin,E. and Arnout,S. 1996 A&AS. 317,393) for source extraction, SCAMP (Bertin E., 2006, ASP Conf. Ser., 351, 112) for astrometric calibration and SWARP for image resampling and coaddition.

The transient magnitudes are measured using the PSF-fitting technique, following subtraction of the sky background estimated from the surrounding regions. The PSF model is constructed by averaging the profiles of isolated field stars automatically selected in the observed frame. After fitting the target, the source is removed from the original frames, a new estimate of the local background is derived, and the fitting process is iterated to refine the result. In typical runs, the residuals are visually inspected to assess the quality of the fit.

Uncertainties are evaluated through artificial star experiment. A synthetic star, with a magnitude similar to that of the transient, is inserted in the PSF-fit residual image in a position close to - but not coincident with - the real source. The image is then reprocessed through the PSF fitting procedure and the dispersion of the recovery magnitudes from multiple trials (with slightly different placements of the fake stars), is adopted as an estimate of the instrumental magnitude error. This value is combined in quadrature with the formal PSF-fit error to obtain the final error estimate.

If a suitable template image is available, the user may opt to measure the transient magnitude using template subtraction-technique, following PSF matching performed with HOTPANTS. In this case the residual sources is still measured via PSF fitting, as this approach has been found to be less sensitive to noise in the difference image.

The multi-band instrumental magnitudes are calibrated using the instrument color terms and photometric zero points that are obtained from standard stars observations. A useful feature is the ability to automatically match and compare the photometry of field stars in the transient field across different nights often with multiple telescopes. This enable the calibration of a local sequence of reference stars and to adjustment of photometric zero point for non-photometric nights. Alternatively, photometric calibration can be performed by comparising of field star magnitudes retrieved from public survey archives. Additional service modules are employed to perform specific tasks, including automatic astrometry, combination of dithered images, measurement of seeing.

Portability and Distribution

The latest version require python 3.10 or later. At present THE CODE IS NOT PUBLICLY AVAILABLE.
The main reasons is that comphrehensive documentation is not yet complete. Currently, the code is accessible via GitLab only to members of our group and to collaborators.

Acknowledgment

The following footnote is suggested as minimal acknowledgment in papers:
ECsnoopy is a Python package by Enrico Cappellaro that streamlines transient photometry analysis, providing accurate transient magnitudes while removing host-galaxy contributions via PSF fitting and/or reference-image subtraction. A package description is available at http://sngroup.oapd.inaf.it/ecsnoopy.html.

Short history

The original SNooPy package concept was conceived almost 30 yr ago by Nando Patat (F. Patat 1996, PhD Thesis, Universita' di Padova). Unfortunately, its initial implementation suffered from poor portability and became incompatible with subsequent operating system upgrades.
This necessity prompted the development of a new package at the close of the millennium, delivered as a suite of IRAF scripts. This IRAF-based software proved successful within our group and among collaborators, with the last major version, dated $\mathbf{2000}$, remaining in usefor over a decade (cf. Nicholl et al. $\mathbf{2013}$, Nature $\mathbf{502}$, $\mathbf{346}$). However, being strictly confined to the IRAF environment imposed a number of limitations that were difficult to resolve.A significant step forward was therefore required.

The primary objective of the new effort was to drastically reduce the time needed to derive accurate SN photometry while maintaining full user control over every analysis step. Secondary goals for the package's development included enhancing user interaction, software reliability, and portability.

The evolution of the Astropy ecosystem provided the means to replace the cumbersome IRAF/PyRAF dependency. This led to the creation of a fully refurbished python package. Following extensive debugging and validation, the latest stable version of ecsnoopy is currently employed by members of our research group in Padua and a number of external collaborators.

The package was renamed to ecsnoopy to prevent a naming conflict with a similar named project in GitHub.

Here a brief selection of papers that have made use of ECsnoopy:

Tomasella et al. 2013 MNRAS 434, 1636
Benetti et al. 2014 MNRAS 441, 298
Tartaglia et al. 2014 MNRAS 447, 117
Elias-Rosa N., et al., 2016, MNRAS, 463, 3894
Cai Y.Z., et al., 2021, A∧A, 654, A157
Pastorello A., et al., 2021, A\&A, 646, A119
Reguitti A., et al., 2021, MNRAS, 501, 1059
Fiore A., et al., 2022, MNRAS, 512, 4484
Salmaso I., et al., 2023, A\&A, 673, A127
Valerin G., et al., 2025, A\&A, 695, A42
Duffy C., et al. , 2025, arXiv, arXiv:2503.15334

Revision history

  • 0.5 - [2014/01/01] First ALFOSC/AFOSC version
  • 0.6 - [2016/10/01] Porting to astroconda/astropy
  • 1.0 - [2019/04/01] Implemented as python package. Named ecsnoopy for GitLab distribution
  • 2.0 - [2021/09/15] Revised management of parameter files and using private uparm for iraf
  • 3.0 - [2023/03/06] Remove iraf/pyraf dependency. daophot replaced with photutils