Skip to content

yaq-project/yaqd-pi

Repository files navigation

yaqd-pi

PyPI Conda yaq black ver log

yaq daemons for Princeton Instruments spectrographs and cameras.

This package contains the following daemon(s):

yaqd-pi-proem: Spectrometer configuration

Wavelength mappings are calculated using grating equation. The diffracted angle $\beta$, incidence angle $\alpha$, and wavelength $\lambda$ are related by: $$ \frac{m \lambda}{d} = \sin \beta - \sin \alpha, $$ where $m$ is the diffraction order and $d$ is the grating groove spacing. Note that with a transmissive grating, the incidence angle is internal to the grating and will be affected by refraction.

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 $f$ is the focal length of the imaging optic, and $\beta_0$ the angle of the color that propagates along the optic axis of lens. $\delta x$ is the position along the plane of the camera, relative to the $\beta_0$ ray.

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.

An example calibration routine

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 $\beta_0$ is the special normal ray (that in turn is related to a special color). Since angles are small, we can use the paraxial approximation: $$ \delta x \approx f \frac{\beta - \beta_0}{}$$

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 6

Languages