Illuminated width for spectral resolution (source code)

= Illuminated width for spectral resolution

Near order $m$, the first angular zero from a principal maximum is $\delta\theta=\lambda/(ND\cos\theta)$. Two wavelengths have peak separation $\Delta\theta=m\Delta\lambda/(D\cos\theta)$. Equating them applies the <Rayleigh criterion> and gives the <resolving power of a diffraction grating>,
$$
\boxed{\frac\lambda{\Delta\lambda}=mN}.
$$
Here the required resolving <power> is $400/0.2=2000$, so in second order $N\geq1000$. The illuminated width is therefore
$$
\boxed{W\simeq ND=2.00\,\mathrm{mm}}.
$$
Whether one counts the full illuminated window or the first-to-last slit-centre distance changes the width by one pitch and is immaterial at this precision. The result assumes negligible aberrations and adequate slit illumination and coherence.