AstroBkgInterp is a Python tool designed to provide robust, flexible background subtraction for sources observed on top of complex regions. It implements a flexible source-masking and polynomial interpolation routines to model spatially and spectrally varying backgrounds without relying on separate sky exposures. The tool supports both 2D images and 3D data cubes (e.g., integral field spectroscopy), offering wavelength-dependant masking and background modelling that account for PSF variations across spectral slices.
AstroBkgInterp is particularly effective in scenarios where traditional background subtraction methods struggle, such as extended sources embedded in structured backgrounds, IFU data with spatial-spectral variability, and imaging data affected by instrumental gradients or artifacts.
- Clone the
AstroBkgInterprepository:
git clone https://github.com/brynickson/AstroBkgInterp/
cd AstroBkgInterp
- Create a new Conda environment with the required Python packages:
conda env create --file environment.yml
conda activate abi_env
- Install the package using:
pip install -e .
To help you get started with AstroBkgInterp, we have provided a series of
hands-on tutorials. These notebooks walk you through applying the
package's tools and techniques to real datasets. Following them will give you the
skills to handle similar datasets, whether 2D or 3D data, or obtained from
other instruments or telescopes.