Specifying lens or spectrometer coefficients

 

These coefficients give the dependence of the final coordinates and velocity components on the initial coordinates, velocity components and energy.

 

Examples of coefficients can be found in the files test2d09.dat, xmpl2d08.dat, test3d09.dat and xmpl3d32.dat

 

In CPO2D do not use this option to calculate the paraxial properties of a lens: see note on lens properties for an accurate and fast way to do this.


This option is accessed from databuilder/setting up rays/sources of rays/lens coefficients.

 

The 'coefficients' that are dealt with in this option are the rates of change of the final parameters with respect to the initial parameters, eg the rate of change of y with respect to the energy e, which is an energy dispersion.

 

The final parameters are measured at the first test plane. Therefore the position of the first test plane must be carefully chosen. It is usually the Gaussian image plane. To find its position (when it is the Gaussian image plane) start by tracing a series of rays that start from an axial object and have a range of values of the angle á to the axis. Then look at the values of z at which they cross the axis to form the image. Then plot z versus á to find the value of z when á = 0 (a quadratic dependence is expected).

 

The 'optic axis' is defined by a median ray, and so can be straight or curved.

 

The user starts by specifying the initial parameters of the median ray (that is, the central or reference ray, defining the optic axis). In CPO2D there are 5 initial parameters that is, 2 coordinates, 2 angles and the energy- while in CPO3D there are 7 -that is, 3 coordinates, 3 direction cosines and the energy.. Instead of the direction cosines, any numbers proportional to them can be used, such as the velocity components. The energy is the kinetic energy of the particle (the option of specifying the total energy is not available here).

 

The user then gives the increments (that is, the step lengths or times) by which the initial parameters will be changed. The user should experiment with these increments. If they are too large then higher order coefficients will affect the results. If they are too small then the coefficients will be affected by the inaccuracies of the ray tracings.

 

The user then specifies an integer for each of the parameters, to give the 'order' of each parameter. If the 'order' of a parameter is 0 it is not incremented -that is, it is kept constant. If the 'order' of an initial parameter is n the program finds the dependence of the final parameters on the nth power of that initial parameter. For example if the 'order' of cosy (which is essentially the angle to the y direction) is 2, while all the other orders are 0 (as in file test3d09.dat) then the program will find the dependence of each of the final parameters on changes to the square of cosy. In other words the program would give the coefficients in the expansion

 p - p_median = (p/cc)*dc*dc +…

where p represents a final parameter, dc represents the changes in the initial value of cosy respectively, and the notation p/cc is used for the coefficients. Here y/cc is an angular aberration coefficient. As another example, when the incremented parameter is the energy and the final parameter is y, the coefficient p/e becomes y/e, which is the rate at which the final y changes as the initial energy e is changed -that is, it is an energy dispersion dy/de.

 

The program can be asked to give any first order coefficient p/u, second order coefficient p/uv or third order coefficient p/uvw, except that the energy is treated only to first order (and be careful not to vary only the energy if the corresponding ray follows the path of the median ray). In CPO2D, only one initial angle can be incremented, so therefore the 3rd and 4th orders cannot both be non-zero.

 

For a full set of coefficients it is necessary to call the program more than once, using different choices of the 'orders'.

 

The calculated ray information is automatically saved at the end of the binary part of the processed dat file, file, and is available for re-use, provided that the present input data file is identical to the one used previously and the processed data file is also the one generated previously.

 

See also the footnotes of files test2d09.dat, xmpl2d08.dat, test3d09.dat and xmpl3d32.dat

 

Examples

As explained above, the coefficients given by the program have one of the 3 forms p/u, p/uv or p/uvw. Here p is a final parameter and u,v and w are final parameters. For example in CPO2D p and u might be the final and initial radial positions r respectively, in which case p/u is the linear magnification M. Or p might be the final radial positions r and u might be the initial angle á, in which case p/uuu is M*Cs, where Cs is the spherical aberration coefficient (related to the object, see note on aberration coefficients). As a further example, p might be the final radial positions r, u might be the initial energy E and the initial angle á of the median ray might be non-zero, which case p/u is M*á*Cc/E, where Cc is the chromatic aberration coefficient. Note that in CPO2D the angle to the z axis is referred to as cos_z, while in CPO3D cos_x is effectively the angle á to the z axis in the zx plane, assuming that á is small (because the angle to the x axis is 90-á degrees, the cosine of which is small and is approximately equal to á).

 

Return to specifying the initial ray conditions.

 

For users who are editing or constructing an 'input data file' without the use of the data-builder -that is, pre-processor:

But Manual editing is certainly not recommended -it is a relic from the time when the databuilder was not available All users are strongly encouraged to use the databuilder, which always gives the correct formats and which has many options for which the formats are not described or easily deduced.

 

CPO2D:

 

Typical data, taken from the ‘example’ file xmpl2d08.dat, are:

 

coefficients of lens -definition of rays

0. -4. 0. 1. 1. 0. r, z, vr, vz, eV, mA of median ray

0.1 0. 0. .03 0. increments for initial parameters

1 0 0 3 0 choice of coefficients

 

Lens or spectrometer coefficients, giving the dependence of 4 final ray parameters (r, z, r_angle and z_angle) on 5 initial parameters (r,z, r_angle, z_angle and kinetic energy, where r becomes x for planar symmetry

 

The first line must start with 'coe', for 'coefficients'.

 

The next line specifies the 5 initial parameters of the median ray (that is, the central or reference ray, defining the optic axis):

r, z, r-velocity, z_velocity, energy(eV),

where r_velocity and z_velocity are any numbers proportional to the velocity components, and the energy is the kinetic energy of the particle.

 

The next line gives the increments or step lengths for the initial parameters.

 

The last line must contain 5 integers, to specify the 'order' of each of the initial parameters. For example if the line is entered as

1 0 0 3 0

(as in file xmpl2d08.dat) then the non-zero integers are those for the initial values of r and the angle z_angle with respect to the z axis. (Note that the 3rd and 4th parameters are re-defined here as the angles (in radians) with respect to the r and z directions.) The 'order' is 1 for r and 3 for z_angle, so the program will find the dependence of each of the 4 final parameters r, z, r_angle and z_angle on r_initial and on the cube of z_angle_initial. In other words the program would give the coefficients in the expansion

p - p_median = (p/r)*dr + (p/aaa)*da*da*da

where p represents a final parameter, and dr and da are the changes in the initial values of r_initial and z_angle. For example, the coefficient r/r is the linear magnification, and r/aaa gives the spherical aberration coefficient. A third term (p/raaa)*dr*da*da*da is excluded because it is a fourth order term (and the maximum order is 3).

 

Another example is the line

0 0 0 1 1

in file xmpl2d08.dat. Here the program would give the coefficients in the expansion

p - p_median = (p/a)*da + (p/e)*de + (p/ae)*da*de

where de is the change in the initial value of the energy. For example the coefficient r/ae is the Cc*M, where Cc is the chromatic aberration coefficient.

 

Only one initial angle can be incremented, so therefore the 3rd and 4th integers in the defining lines cannot both be non-zero.

 

To re-use ray data that was calculated previously the present file should be identical to the previous one except that the line

 'y trace rays? (y/n)'

should be replaced by the line

 'previously calculated rays'

(or any line that starts with 'p').

 

CPO3D:

 

Typical data, taken from the 'benchmark test' file test3d09.dat, are:

 

coefficients, aberration -definition of rays

0. -1. 0. 1. 0. 0. 1. 0. x,y,z,vx,vy,vz,eV,I of median ray

0. .01 0. 0. .05 0. .01 increments for initial parameters

0 1 0 0 2 0 1 choice of coefficients

 

The first line must start with 'coe', for 'coefficients'.

 

The next line specifies the 7 initial parameters of the median ray (that is, the central or reference ray, defining the optic axis):

x, y, z, cosx, cosy, cosz, en

where cosx etc can be any numbers proportional to the velocity components, and the energy is the kinetic energy of the particle.

 

The next line gives the increments or step lengths for the initial parameters.

 

The last line must contain 7 integers, to specify the 'order' of each of the initial parameters. For example if the line is entered as

0 1 0 0 2 0 1

(as in file test3d09.dat) then the non-zero integers are those for the initial values of y, cosy and en.

 

To re-use ray data that was calculated previously the present file should be identical to the previous one except that the line

 'start of ray information'

should be replaced by the line

 'previously calculated rays'