# Smoothing an SED with binning

I have an (observed) SED of a galaxy, and am attempting to match model SEDs to it. To do this I need to be able to see its shape better, which would involve some sort of smoothing of the spectrum. I would like to do this in Python. I've looked through scipy's various smoothing tools (like UnivariateSpline), but don't know if that's on the right track since that would only be some best fit to my spectral data.

I also used the Iris software to perform an interpolation of my spectrum with 1000 bins and the smoothing option turned on, but I do not understand the computational process behind this. How might I accomplish this in Python?

• Are you trying to fit to the continuum level, in which a low order polynomial or spline (as you suggest) will work or trying to smooth the absorption/emission line features to make the model and observed SED match better ? In the latter case, something like Box1DKernel  or Gaussian1DKernel from astropy.convolution would probably work better – astrosnapper Apr 12 at 21:04
• Yes, I'm interested in the latter case. However I'm struggling to come to terms with how a Gaussian filter would be appropriate for smoothing an SED. Do you mind elaborating on why this might be preferred? – curious_cosmo Apr 12 at 21:18
• Sorry Friday's reply vanished into the ether. You want a resolution in your model SED that matches the instrumental resolution so that you don't overfit to features that aren't resolvable in the data. The effect of the finite spectrograph slit width is to add broadening which is normally approximated by a Gaussian. In addition a spread in velocity of the stars making up the galaxy's SED will also cause broadening of the model. There is more information on the fitting in this review and in general at sedfitting.org – astrosnapper Apr 16 at 1:15