Flame test through a spectroscopic diffraction grating