Home > ISET > vcamera > optics > siOptics > siSynthetic.m

siSynthetic

PURPOSE ^

Create synthetic shift-invariant optics

SYNOPSIS ^

function optics = siSynthetic(psfType,oi,varargin)

DESCRIPTION ^

Create synthetic shift-invariant optics 

  optics = siSynthetic(psfType,oi,varargin)

 This code was used for testing the shift-invariant optics.  We build on
 this to let the user create a custom shift-invariant optics.

 By default, the optics (custom) fields are filled in using simple values.

 psfType:  'gaussian' --  bivariate normals.  
           'custom'   --  read a file with variables explained below
                          others will be defined
 waveSpread: size of the PSF spread at each of the wavelength
             for gaussian this is in microns (um)
 xyRatio:   Ratio of spread in x and y directions
 oi:        Optical image
 filename:  Output file name for the optics

 See also:  s_SIExamples, ieSaveSIOpticsFile
  s_FFTinMatlab for an explanation of some of the operations in here.

 Examples:
  oi = vcGetObject('oi'); wave = oiGet(oi,'wave');
  psfType = 'gaussian';
  waveSpread = wave/wave(1);

 Circularly symmetric Gaussian
  xyRatio = ones(1,length(wave));
  optics = siSynthetic(psfType,oi,waveSpread,xyRatio);

 Make one with an asymmetric Gaussian
  xyRatio = 2*ones(1,length(wave));
  optics =  siSynthetic(psfType,oi,waveSpread,xyRatio);

 Convert a custom file
  ieSaveSIOpticsFile(rand(128,128,31),(400:10:700),[0.25,0.25],'custom');
  optics = siSynthetic('custom',oi,'custom','deleteMe');

 Suppress writing out file
  optics = siSynthetic('custom',oi,'custom',[]);

 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