Home > ISET > vcamera > optics > opticsSet.m

opticsSet

PURPOSE ^

Set optics structure parameters

SYNOPSIS ^

function optics = opticsSet(optics,parm,val,varargin)

DESCRIPTION ^

 Set optics structure parameters

   optics = opticsSet(optics,parm,val,varargin)

 The optics structure contains the basic optics parameters used to control image formation.
 The parameters define parameters used in the diffraction-limited,
 shift-invariant, or ray trace optics models.  See opticsGet for further
 information about these models.

 The optics structure is normally part of the optical image and can be
 retrieved using

   oi = vcGetObject('OI'); optics = oiGet(oi,'optics');

 See oiCompute for a discussion of the different optics models and how
 they are used.  

Example:
   optics = opticsSet(optics,'fnumber',2.8);
   optics = opticsSet(optics,'model','diffractionLimited');

 Optics parameters are:

 Optics model  - 
      {'model'}  -  DiffractionLimited, ShiftInvariant, RayTrace, or
                    UserSupplied

 Diffraction limited optics specifications.
      {'name'}    - This optics name
      {'type'}    - Always 'optics'

      {'fnumber'}       - f# is focal length / aperture (dimensionless)
      {'focallength'}   - Focal distance for image at infinity (meters)
      {'transmittance'} - Wavelength transmittance  ([0,1])

 Wavelength information
      {'spectrum'}  - Wavelength information structure
        {'wave'}   - Wavelength samples

 OTF Information for shift-invariant optics model
      {'otfmethod'}   - diffractionlimited, shiftinvariant, raytrace, {'usersupplied','custom'}, or ...
      {'otfdata'}     - Used to store custom data.  Row x Col x Wave
      {'otffx'}       - frequency samples across col of otfdata
      {'otffy'}       - frequency samples down rows of otfdata
      {'otfwave'}     - otf wavelengths

 Relative illumination data
      {'relillummethod'}- 
      {'cos4thmethod'}  - Skip or cos4th
      {'cos4thdata'}    - Cache location occasionally used for cos4th data

 Ray trace optics specifications
     {'raytrace'}     - The entire ray trace structure
      {'rtopticsprogram'}     - Optics program used (Zemax or Code V)
      {'rtlensfile'}          - Lens file name
      {'rteffectivefnumber'}  - Effective f-number
      {'rtfnumber'}           - F-number
      {'rtmagnification'}     - Magnification
      {'rtreferencewavelength'}  - Lens design reference wavelength
      {'rtobjectdistance'}       - Lens design object distance
         % Distance to object plane in mm.  NOTE bad unit!
      {'rtfieldofview'}          - Maximum horizontal field of view
         % Maximum field of view for the ray trace calculation (not the
         % computed image).  This is horizontal field of view.  DB Wants us
         % to change to diagonal.
      {'rteffectivefocallength'}  - Effective focal length (units?)
         % Effective focal length computed by the ray trace program.
      {'rtpsf'} - PSF structure
      {'rtpsfdata'}
         % Data are stored as 4D (row,col,fieldHeight,wavelength) images
         You can set opticsSet(.,.,fieldHeight,wavelength);
        {'rtpsfwavelength'}    - Sample wavelengths
        {'rtpsffieldheight'}   - Sample image field heights
        {'rtpsfsamplespacing','rtpsfspacing'}  - Spacing of PSF samples
         % These are stored in mm
      {'rtrelillum'}  - Relative illumination structure
        {'rtrifunction'}
        {'rtriwavelength'}
        {'rtrifieldheight'}
      {'rtgeometry'}  - Geometrical distortion function
      {'rtgeomfunction','rtgeometryfunction','rtdistortionfunction','rtgeomdistortion'}
         % opticsGet(optics,'rtdistortionfunction',wavelength);
         % Either return the whole thing or just the one at the called
         % wavelength, which is specified by an index into the function.
         % Maybe this should really be wavelength and we look it up.
      {'rtgeometrywavelength'}
      {'rtgeometryfieldheight'}

 Computational parameters
      {'rtPSFSpacing'} - Wedge size for PSF calculation (meters)

 Copyright ImagEval Consultants, LLC, 2005.

CROSS-REFERENCE INFORMATION ^

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