An optimal extraction of spatially blended spectra
We describe an algorithm to optimally extract individual spectra of blended sources from a long slit spectrum. A semi-analytic model for the spatial profile is used: a Voigt profile for the undersampled core with a numerical correction applied to the wings. This is derived from an isolated source which must also be placed on the slit. Chi^2 fitting is used to separate the blended components with maximum weight given to the best data. We demonstrate the successful application of the algorithm to data on two X-ray binaries in crowded fields: XTE J2012+381 and V404 Cyg.