For high-resolution spectrographs with large phase-space acceptance the har
dware correction of all the relevant aberrations requires so many multipole
elements that software correction methods are often more adequate. In this
case, the obligatory computation of the higher-order transfer map becomes
feasible if the (three-dimensional) magnetic field within the spectrograph
can be approximated with sufficient accuracy in an analytical form. For thi
s purpose, we present an approach that allows the use of midplane measureme
nts or alternatively measurements in several planes resulting in a global M
axwellian field that suppresses local measurement inaccuracies. It is based
on a modified charge density method generating the magnetic field by a sup
erposition of Gaussian charge distributions. The accuracy of the method is
assessed through test cases for which analytical solutions of the field com
ponents are known. A maximum relative inaccuracy of the magnetic field in t
he midplane smaller than +/- 10(-4) is obtained in the relevant field area.
In addition, we obtain a good agreement comparing the multipole content of
the analytical field solution with the one of the approximated field. (C)
1999 Published by Elsevier Science B.V. All rights reserved.