yaq daemons for Princeton Instruments spectrographs and cameras.
This package contains the following daemon(s):
Wavelength mappings are calculated using grating equation. The diffracted angle
A cone of diffracted rays are captured with a lens and Fourier mapped on the camera. The lens and camera are aligned such that the normal ray hits the center of the camera. The diffracted rays angles are related to the camera pixel position by: $$ \delta x = f \tan \left( \beta - \beta_0 \right), $$
$$ \implies \beta = \beta_0 + \tan^{-1} \frac{\delta x}{f} $$
where
Using both equations, we can relate imaging position to wavelength: $$ \beta_0 + \tan^{-1} \frac{\delta x}{f} = \sin^{-1}\left(\frac{m\lambda}{d} - \sin \alpha \right) $$ or $$ \lambda(\delta x; f, m, d, \alpha, \beta_0) = \frac{d}{m} \sin \left[ \beta_0 + \tan^{-1} \left(\frac{\delta x}{f}\right) \right] + \sin\alpha $$ To set these parameters, confer the configuration file schema.
TODO To perform a single-point calibration, send in a known wavelength and find the position on the camera.
A more convenient approximation measures displacement from the nominal ray.
Suppose the lens is aligned so that a normal ray hits the center of the camera.
We can then describe deviations from the camera center in terms of the normal ray:
$$ \delta x = f \tan \left(\beta - \beta_0 \right) $$
Where