A Python package for stacking faint galaxy images from multiple broadband filters and preparing them for Spectral Energy Distribution (SED) analysis.
- Galaxy Image Stacking: Robust stacking of hundreds of faint galaxy cutouts using trimmed mean statistics
- Error Propagation: Automatic calculation of uncertainty maps using Median Absolute Deviation (MAD)
- Radial Photometry: Azimuthally averaged surface brightness profiles with background subtraction
- Publication-Ready Plots: Automated generation of multi-filter comparison plots
- Command-Line Tools: Simple
sed-stackandsed-photomcommands for easy workflow execution
pip install stacked-sedsFor contributors or to get the latest features:
git clone https://github.com/ryantrainor/stacked-seds.git
cd stacked-seds
pip install -e ".[dev]"# Test command-line tools
sed-stack --help
sed-photom --help
# Test Python imports
python -c "import stacked_seds; print(f'Successfully installed version {stacked_seds.__version__}')"- Python ≥ 3.8
- NumPy ≥ 1.20.0
- SciPy ≥ 1.7.0
- Astropy ≥ 5.0.0
- Matplotlib ≥ 3.5.0
- PhotoUtils ≥ 1.5.0
All dependencies are automatically installed with pip.
# 1. Create configuration file
cp config/params.yml my_config.yml
# 2. Edit my_config.yml with your data paths
# 3. Run stacking workflow
sed-stack my_config.yml
sed-photom my_config.ymlfrom stacked_seds import stacking, photometry
# Load and stack galaxy images
pixel_coords = stacking.get_galaxy_pixel_coords("image.fits", "galaxies.reg")
stamps = stacking.create_stamps(image_data, wcs_obj, pixel_coords)
stacked_image, error_map = stacking.stack_images(stamps)
# Perform radial photometry
radii, profile, errors = photometry.get_radial_profile(stacked_image, center)- Full Documentation: https://stacked-seds.readthedocs.io/
- API Reference: API Documentation
- Tutorial: Getting Started Guide
- Configuration Guide: Configuration Examples
We welcome contributions! Please see our Contributing Guide for details.
git clone https://github.com/ryantrainor/stacked-seds.git
cd stacked-seds
pip install -e ".[dev]"
make testThis project uses modern Python development tools:
- Black for code formatting
- flake8 for linting
- pytest for testing
- GitHub Actions for CI/CD
# Run all quality checks
make check
# Format code
make format
# Run tests
make testIf you use this software in your research, please cite:
@software{stacked_seds,
title={Stacked SEDs: Galaxy Image Stacking and Photometry},
author={Abraham, O. and Chapman, C. and Garcia, E. and Trainor, R.},
year={2025},
url={https://github.com/ryantrainor/stacked-seds},
doi={10.5281/zenodo.XXXXXX}
}This project is licensed under the MIT License - see the LICENSE file for details.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: [email protected]
This project was developed at Franklin & Marshall College. We thank the astronomy community for their valuable feedback and contributions.