Automatic iteration to optimise a focus, introduction


For detailed information see the detailed note on automatic focusing. 


The focus is defined as the set of crossing points at the  beam section, which is the first test plane, or in the case ofcathodes, the second test plane.


Minimising the size of a focus

The program will adjust the electrode voltages to minimise the size of this focus, where the size can be defined in several different ways. The maximum number voltages that can be adjusted is 20. The scale factor of the magnetic field (if this exists) can be included in CPO3D with the voltages to be varied.  Alternatively, the current that falls within a given circle on the test plane can be maximised.


One way to control when the iteration should stop is for the user to specify an acceptable value of the fractional change in the quantity being minimised at each iteration.  Another way is to specify the maximum number of iterations. 


Several different forms of restraint are also available, see the detailed note on automatic focusing.


The position of the centre of the focus can be specified by the user or it be left free on the test plane (except under some special circumstances).


Some rays might fail to cross the test plane, for various reasons, and so it is necessary for the user to specify the total number of rays that will be considered.


To prevent answers being distorted by rays that are very much out-of-focus, the user can choose to specify a maximum distance and a penalty factor, see the detailed note on automatic focusing.


If the kinetic energy of a particle needs to be one of the adjustable parameters, the total energy option can be used and the voltage of an electrode near the ray starting position can be varied.

Examples are given in xmpl2d07 and xmpl3d06.

Further information can be found in the detailed note on automatic focusing.