Home > pubtools > Aperture > SetPhysicalAperture.m

SetPhysicalAperture

PURPOSE ^

ringapert=SetPhysicalAperture(ring,apertureX,apertureY)

SYNOPSIS ^

function ringapert=SetPhysicalAperture(ring,apertureX,apertureY)

DESCRIPTION ^

ringapert=SetPhysicalAperture(ring,apertureX,apertureY)

 defines an aperture element before and after each element in ring
 describing the chamber dimensions.
 
 apertureX,apertureY are the chamber vertical and horizontal aperture.

 chamber size will be [-apertureX,apertureX] in the horizontal plane  
 chamber size will be [-apertureY,apertureY] in the vertial plane  

 length(apertureX)==length(apertureY)==length(ring)
 
 Example:
 define apertures.
 Xapert=0.06*ones(size(ring));
 Yapert=0.04*ones(size(ring));
 ring=SetPhysicalAperture(ring,Xapert/2,Yapert/2);

 atplot(ringinj,@plotAperture);

See also: ATAPERTURE, plotAperture

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function ringapert=SetPhysicalAperture(ring,apertureX,apertureY)
0002 %ringapert=SetPhysicalAperture(ring,apertureX,apertureY)
0003 %
0004 % defines an aperture element before and after each element in ring
0005 % describing the chamber dimensions.
0006 %
0007 % apertureX,apertureY are the chamber vertical and horizontal aperture.
0008 %
0009 % chamber size will be [-apertureX,apertureX] in the horizontal plane
0010 % chamber size will be [-apertureY,apertureY] in the vertial plane
0011 %
0012 % length(apertureX)==length(apertureY)==length(ring)
0013 %
0014 % Example:
0015 % define apertures.
0016 % Xapert=0.06*ones(size(ring));
0017 % Yapert=0.04*ones(size(ring));
0018 % ring=SetPhysicalAperture(ring,Xapert/2,Yapert/2);
0019 %
0020 % atplot(ringinj,@plotAperture);
0021 %
0022 %See also: ATAPERTURE, plotAperture
0023 
0024 
0025 if length(apertureX)==length(ring) &&  length(apertureY)==length(ring)
0026     ap=ataperture('AP',...
0027         mat2cell([-apertureX,+apertureX,-apertureY,+apertureY]...
0028         ,ones(size(ring)),4));
0029     
0030     ap=mat2cell(ap,ones(size(ring)));
0031     
0032     %ringapert=reshape([ap';ring';ap'],length(ring)*3,1);
0033     ringapert=reshape([ap';ring'],length(ring)*2,1); % only one aperture restriction
0034 else
0035     error('size of ring and apertureX or apertureY are not the same')
0036 end
0037     
0038 return
0039 
0040 
0041

Generated on Thu 24-Aug-2017 18:47:33 by m2html © 2005