# How to predict magnitudes from spectra

**URL:** <https://www.rubin.community/t/how-to-predict-magnitudes-from-spectra/6561>\
**Category:** Support\
**Tags:** photometry, smwlv, dp0\
**Created:** [May 16, 2022, 10:45pm UTC](https://www.rubin.community/t/how-to-predict-magnitudes-from-spectra/6561 "2022-05-16T22:45:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jgizis](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/jgizis/32/419_2.png) [@jgizis](https://www.rubin.community/u/jgizis)\
**Post date:** [May 16, 2022, 10:45pm UTC](https://www.rubin.community/t/how-to-predict-magnitudes-from-spectra/6561/1 "2022-05-16T22:45:44Z")

</div>

I was wondering if there is an official (preferably Python) tool to compute synthetic LSST photometry given a spectrum.

---

<div class="post-metadata">

**Author:** ![MelissaGraham](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/melissagraham/32/2549_2.png) [@MelissaGraham](https://www.rubin.community/u/MelissaGraham)\
**Post date:** [May 17, 2022, 3:46am UTC](https://www.rubin.community/t/how-to-predict-magnitudes-from-spectra/6561/2 "2022-05-17T03:46:45Z")

</div>

Hi @jgizis,

Yes there is, and it is in the [rubin\_sim package](https://github.com/lsst/rubin_sim), specifically the [photUtils module](https://github.com/lsst/rubin_sim/tree/main/rubin_sim/photUtils). In a separate repo there are also [tutorial notebooks for rubin\_sim](https://github.com/lsst/rubin_sim_notebooks), and one of them in the Photometry directory is “Calculating Magnitudes”. It provides an example of calculating the expected AB magnitude in each filter for a user-provided spectral energy distribution (SED) with Rubin Observatory.

Let me know if that’s what you’re looking for?
