The correlation between structural and optical properties of luminescent porous silicon