Oscillator strengths for excitons bound to impurities and quantum wells