Photoluminescence in polythiophene and polyselenophene