CARPEM: a computer code for predicting the diffraction efficiency of soft x-ray gratings and its application to VGD gratings optimization

We have developed a LURE a code to predict the efficiency of gratings. The code is based on differential theory and uses a simplified R-matrix propagation algorithm to obtain numerical stability on the whole range from visible to hard x-rays. Experimental and numerical studies have been performed on some test cases at a synchrotron source. A good agreement between numerical prediction and measurements has been found. The code is a rigorous application of electromagnetic theory and gives exact results as long as accurate optical constants can be attributed to grating materials. Such rigorous calculations provide an important tool for the optical engineering of modern synchrotron monochromator gratings. We give an example of application of this code to the engineering of a modern beam line and for the optimization of harmonic rejection.