Accurate methods for study of light emission from quantum wells confined in a microcavity