DIFF_PAT
========

This directory contains the source for diff_pat, a program to calculate
perfect and mosaic crystals rocking curves.


To build the program:
gmake all
gmake install /* to install it in the XOP binary directory */
gmake clean /* to clean the directory from unnecesary files */


To test the program:
cd TEST
./RUN.sh

Note that the numbers gived by different platforms may be slightly
different or in different format.


This program is used by XOP/XCrystal




====================================================================

DEVELOPMENT NOTES
=================

renamed from diff_pattern to diff_pat in Unix
MSR 00/06/13

I passed from DIFF_PAT.F to diff_pat.f [Win32 and Unix
versions, respectively], by changing "aimag" by "imag"
MSR 97/02/04

Makefile: for hp800 I linked with ../lin.hp800, for the rest I used
/pgexp/...  
MSR 97/10/07

changed diff_pat.f -> diff_pat.F with preprocessor commands to create
the Lahey version.
IMPORTANT: the output file is called *.flahey and has to be moved to *.f
in the PC before compiling. 
MSR 97/10/30

Inserted the mac version from Potee 00/07/11

Corrected a bug in calculating the extinction length in Bragg
symmetrycal and asymmetrical cases. 01/09/14


BUG fixed 2006-09015 
====================
Calculation if diffraction profile widths in diff_pat.par. The asymmetry 
factor was not squated (in fact SSR is already affected by it!)

Dear Hwa Shik,

you are absolutely right. There is a bug in the program and in the listing output, the width is
multiplied twice by the square root of the asymmetry factor, thus is affected by the asymmetry
factor with no square root. I fixed it for the next xop version. However, the bug is only at the
level of printing that number, the curve is calculated correctly.

Many thanks for pointing out the problem.

Best regards,

Manuel



??? wrote:
>
> Dear Manual,
>
> If you put AS(asymmetry angle) = -9 degrees at 7 keV for Si(111), you get rocking curve width of
> 135 micro-radian. On the other hand 41 micro-radian with AS = 0 degrees. This ratio (135/41) is
> a lot larger than 1.82, which is a square root of the asymmetry factor.
>
> Hwa Shik 
>
>
>     > Dear Mr. del Rio,
>     >
>     > We found the 'XOP' program very useful in the applications of x-rays.
>     >
>     > I just used it to figure out the Darwin width of Ge(111) crystal at 7 keV.
>     >
>     > We noticed there seems some problem(s) with asymmetric reflection.
>     >
>     > If I put a positive number for the asymmetry angle, the width gets
>     > narrower, this is fine. However if I put a negative value for the
>     > asymmetry angle, the width gets TOO wide compared to theory. See the
>     > attached paper.
>     >
>     > Hwa Shik
>     >
>
>     Hello,
>
>     Could you provide me some numbers of the inconsistences? I am very
>     surprise, as this code is very well tested. Regarding your reference,
>     you can also read:
>     M. Sanchez del Rio and F. Cerrina
>     "Comment on Comments on the use of asymmetric monochromators for X-Ray
>     diffraction on a synchrotron source [Rev. Sci. Instrum. 66, 2176 (1995)]"
>     / Rev. Sci. Instrum. 67(10), 3766-3768, 1996.
>
>     Best regards,
>
>     Manuel
