The ray trace point spread function (PSF)

The ray trace optics calculation is illustrated with a point array scene. The scene with a set of points is transformed to an optical image using ray trace methods based on the aspherical, 2mm lens computed in Zemax.

The scene is also transformed using diffraction limited methods (shift-invariant). The f# and focal length of the diffraction model are set equal to those of the ray trace lens.

The illuminance computed the two ways is then compared.

See also: oiCompute, imageMultiview

Copyright ImagEval Consultants, LLC, 2008



% To help the user, turn the wait bar on so they can see the
% calculation is progressing
wbStatus = ieSessionGet('waitbar');


scene = sceneCreate('pointArray',512,32);
scene = sceneInterpolateW(scene,450:100:650);
scene = sceneSet(scene,'hfov',15);
scene = sceneSet(scene,'name','psf Point Array');

ieAddObject(scene); sceneWindow;


oi = oiCreate('ray trace');

% Load the example Zemax file
fname = fullfile(isetRootPath,'data','optics','rtZemaxExample.mat');

oi = oiSet(oi,'name','ray trace case');
oi = oiSet(oi,'optics',optics);


oi = oiSet(oi,'optics model','ray trace');
oi = oiCompute(scene,oi);
oi = oiSet(oi,'name','ray trace case');
ieAddObject(oi); oiWindow;
Scene distance (1.20 m) does not match ray trace assumption (2.00 m)
Adjusting scene distance.
Geometric distortion ...
Pre-computing PSFs...Eccentricity bands: 0.000 (um)
Eccentricity bands: 51.825 (um)
Eccentricity bands: 103.650 (um)
Eccentricity bands: 155.475 (um)
Eccentricity bands: 207.300 (um)
Eccentricity bands: 259.125 (um)
Eccentricity bands: 310.950 (um)
Eccentricity bands: 362.775 (um)
Eccentricity bands: 414.601 (um)
PSF sample grid: 31 by 31
Done precomputing PSFs.
Applying PSFs.
9 eccentricity bands
Done applying PSFs.

Compute the diffraction limited case

oiDL = oiSet(oi,'name','diffraction case');
optics = oiGet(oiDL,'optics');
fNumber = opticsGet(optics,'rt fnumber');
optics = opticsSet(optics,'fnumber',fNumber*0.8);
oiDL = oiSet(oiDL,'optics',optics);

oiDL = oiSet(oiDL,'optics model','diffraction limited');
oiDL = oiCompute(scene,oiDL);
oiDL = oiSet(oiDL,'name','psf diffraction case');
ieAddObject(oiDL); oiWindow;

Render the images

imageMultiview('oi',[1 2],1);

Reset the original wait bar status