GANDALF (Gas AND Absorption Line Fitting) accurately separates the stellar and emission-line contributions to observed spectra. The IDL code includes reddening by interstellar dust and also returns formal errors on the position, width, amplitude and flux of the emission lines. Example wrappers that make use of pPXF (ascl:1210.002) to derive the stellar kinematics are included.
https://ui.adsabs.harvard.edu/abs/2006MNRAS.366.1151S ; if also using pPFX, cite https://ui.adsabs.harvard.edu/abs/2004PASP..116..138C as well