ImagingPath.chiefRay
- raytracing.ImagingPath.chiefRay(self, y=None)
This function returns the chief ray for a height y at object. The chief ray for height y is the ray that goes through the center of the aperture stop.
- Parameters:
y (float) – The starting height of the chief ray at the object (default=None) If no height is provided, then the function uses the limit of the field of view.
- Returns:
chiefRay – The properties (i.e. height and the angle of the chief ray.)
- Return type:
object of Ray class
Examples
>>> from raytracing import * >>> path = ImagingPath() # define an imaging path >>> # use append() to add elements to the imaging path >>> path.append(Space(d=20)) >>> path.append(Lens(f=20,diameter=2,label="f=20")) >>> path.append(Space(d=30)) >>> path.append(Lens(f=10,diameter=10,label="f=10")) >>> path.append(Space(d=10)) >>> print(path.chiefRay()) y = 3.333 theta = -0.167 z = 0.000
See also
raytracing.ImagingPath.marginalRays,raytracing.ImagingPath.axialRay,raytracing.ImagingPath.principalRayNotes
The calculation is simple: obtain the transfer matrix to the aperture stop, then we know that the input ray (which we are looking for) will end at y=0 at the aperture stop. If the element B in the transfer matrix for the imaging path is zero, there is no value for the height and angle that makes a proper chief ray. So the function will return None. If there is no aperture stop, there is no chief ray either. None is also returned.