Detection of vapours and their refractive indices using photorefractive crystals