Solution (source code)

= Solution

The first-order <grating equation> is $d\sin\theta=\lambda$, so \b[$d=2.879\,\mathrm{\mu m}$], about $347$ lines per millimetre. For $N$ equally illuminated lines,
$$
I(\theta)\propto I_1(\theta)\left|\frac{\sin(N\delta/2)}{\sin(\delta/2)}\right|^2,\qquad
\delta=2\pi d\sin\theta/\lambda.
$$
Principal maxima stay at the same angles, their peaks scale as $N^2$ for fixed illumination per line, and their angular widths shrink as $1/N$. The <resolving power of a diffraction grating> is $\lambda/\Delta\lambda=mN$. Thus first order needs \b[$N=1000$ and illuminated width $Nd\simeq2.88\,\mathrm{mm}$].

The <grating dispersion> follows by differentiation: $d\theta/d\lambda=1/(d\cos\theta)$. With a detector centred on the chief ray, one pixel corresponds approximately to
$$
\boxed{\Delta\lambda_{\rm pixel}=\frac{w d\cos\theta}{f}=2.27\,\mathrm{nm}.}
$$
This exceeds the nominal $0.5\,\mathrm{nm}$ grating width. The practical resolution scale is therefore a few nanometres; two-pixel sampling gives about \b[$4.5\,\mathrm{nm}$]. Exact resolvability also depends on slit width and image sampling. Taking the detector coordinate as $f\tan\theta$ about the original axis instead changes the single-pixel estimate only to $2.20\,\mathrm{nm}$.

For ideal <photon counting>, <Poisson distribution> statistics give SNR $=\sqrt{N_\gamma}$. Hence $N_\gamma=10^4$ and \b[$t_{\min}=10^4/(2\times10^5)=0.050\,\mathrm s$].

Use a <lock-in amplifier> for <phase-sensitive detection>: chop or otherwise modulate the source before the entrance slit, retaining a synchronous reference. At each grating setting amplify the <photodiode> output, multiply it by a reference and <low-pass filter>. For a signal $s\cos(\omega_rt+\phi)$ and reference $2\cos\omega_rt$, the low-pass output is $s\cos\phi$; <quadrature demodulation> also recovers $s\sin\phi$. Choose the modulation <frequency> above slow drift while within the source/detector bandwidth and away from strong electrical <interference>. Average for many cycles before changing the grating setting.

\Image[/past-exam-of-the-physics-course-of-the-year-4-of-the-natural-sciences-course-of-the-university-of-cambridge/2012/paper-1-gp2012-lock-in.png]
{title=Chopped-source spectral detection}
{description=Original functional diagram separates modulation of the wanted source from unmodulated detector dark current and stray light. A shared reference drives demodulation; low-pass averaging sets the detected bandwidth.}

This rejects steady backgrounds and reduces low-frequency noise through narrow-band detection. It does not remove random dark-current/stray-light <shot noise> within that bandwidth, nor a background modulated coherently with the source. The chopping geometry must therefore distinguish wanted light from stray paths.<About Lock-In Amplifiers by Stanford Research Systems>[physical pp. 1–2: phase-sensitive multiplication, low-pass filtering, bandwidth and quadrature outputs]{ref}