function varargout = ASP( U1,z,dxy1,lambda,varargin )
%ASP Diffraction calculation by Angular Spectrum Propagation method
% Syntax:
% [U2,dxy2] = ASP(U1,z,dxy1,'PropertyName','PropertyValue',...)
% [U2,...] = ASP(U1,z,dxy1,...)
% ASP(U1,z,dxy1,...)
%
% U1 is the wavefront of the object plane
% U2 is the wavefront of the diffraction plane
% U1 and U2 are all two-dimensional array
% size of U1 and U2 are even
% z is the distance between object plane and diffraction plane
% dxy1 is the sampling distance of the object, dxy1=[dx1,dy1]
% lambda is the wavelength of the laser
%
% if there is no output, image on diffraction plane will be displayed
% else, no image will be displayed
%
% the origin of coordinates is at M/2+1,N/2+1
%
%--------------------------------------------------------------------------
% PropertyName and PropertyValue:
%
% piz {off} | t
% pad the input array with zeros
% off - do not pad
% t - paste U1 to an all zeros array whose size is t*size(U1)
%
% iiz {off} | t
% interpolate t