# Calculation of the geometric profile by raytracing

In that example and URD-65 diffractometer (manufacturer: Rich. Seifert & Co. Freiberger Präzisionsmechanik GmbH) equipped with a curved secondary graphite monochromator was used. Select
BGMN→Open Control File
browse to the `PLASTER\urdneu11.sav` file and open it:

The file contains the data as necessary for the calculation of the geometric profile. The unit of distances and lengths is mm. Comment lines start with %. For an extended explanation of a variable put the cursor of your BGMNwin window to that variable and press F1 or see the following image:

or see the list of variables.

The calculation is carried out in two steps. First, a raytracing algorithm models the distorted profiles at discrete 2Θ angles (`zweiTheta[..]`). In BGMNwin, select
Run→Geomet
browse to the above file and open it:

A raytracing algorithm needs to millions of events. Don't be astonished at the time-intensive calculation. After the raytracing calculation an interpolation is necessary to construct a file for the Rietveld calculation with BGMN. Select
Run→MakeGEQ
browse to the above file and open it. The interpolation starts and the actual angular steps will be displayed.

Now the instrumental function is ready to use. You can display its shape at each 2Θ position by selecting
Tools→Show Device Function
Again, browse to the above file and open it. wait some seconds, and shift the bottom slider to the 2Θ value you wish.

In the figure the shape of the instrumental function for 2Θ=20° is shown.

Please note the distortion and the shift of the maximum to lower angles.These effects are later automatically considered in the Rietveld calculation. You can see some more

and explanations to this problem.

## Tube tails

Since the time of our first usage of fundamental parameters profile model, our measurements are disturbed by so-called "tube tails". Tube tails mean: A small part of the X-rays emitted by the tube originates not inside the focus, but up to 1cm outside the focus. This means 1mm equatorial broadening towards both sides of the optical focus. If not corrected, this tube tails may totally disturb the profile shapes calculated by fundamental parameters. Starting from Version 2.4.0, BGMN includes an optional Tube Tails correction.