Home > ISET > vcamera > optics > dlMTF.m

dlMTF

PURPOSE ^

Gateway routine that assembles parameters to compute diffraction limited OTF.

SYNOPSIS ^

function [OTF2D, fSupport,inCutoffFreq] = dlMTF(oi,fSupport,wavelength,units)

DESCRIPTION ^

Gateway routine that assembles parameters to compute diffraction limited OTF.
 
 [OTF2D, fSupport,inCutoffFreq] = dlMTF(oi,[fSupport],[wavelength = :],[units='cyclesPerDegree'])

 Compute the diffraction limited 2D OTF (OTF2D) at each wavelength for the
 optics within the optical image. 

 The diffraction limited OTF only depends on the optics.  But for some
 units and conditions we need to know properties of the optical image to
 perform the calculation.  If you know these parameters, we make it
 possible to call this routine using dlMTF(optics, ...).  This is possible
 because we check at the beginning of the routine to see whether the first
 argument is of type optical image or of type optics.

 The frequency support(fSupport) and the incoherent cutoff frequency as a
 function of wavelength (in nm) can also be calculated and returned.  The
 units for the frequency support, cycles/{meters,millimeters,microns}, can
 be specified (units).
 
 The formulae are described in dlCore.m

 Examples:
 If you send in only one argument, it must be the optical image structure.
 In this first example, We calculate all of the OTFs (one for each
 wavelength). 

   OTF2D = dlMTF(oi);

 To plot the result, we center DC using fftshift

  figure(1); 
  mesh(fSupport(1,:,1),fSupport(:,1,2),fftshift(OTF2D(:,:,1))); 
  colorbar; xlabel('cyc/mm'); ylabel('cyc/mm');

 If you have pre-computed the arguments, then you can use the
 optics structure, as in this example

  oi = vcGetObject('oi'); wavelength = 400; unit = 'mm';
  fSupport = oiGet(oi,'fSupport',unit);
  OTF2D = dlMTF(optics,fSupport,wavelength,unit);

  figure(1); mesh(fSupport(1,:,1),fSupport(:,1,2),fftshift(OTF2D)); colorbar 
  xlabel('cyc/mm'); ylabel('cyc/mm');

 But, if you want units in cycles/deg, you must sent in the optical image.

  See also
     plotOTF, oitCalculateOTF, dlCore.m

 Copyright ImagEval Consultants, LLC, 2003.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Sun 14-Jan-2007 10:24:23 by m2html © 2003