I encounter some bugs when running Shadow for hyperbolic crystals in
Laue. These are the the three patches I used:
i) in intercept.F the CCC(10) must be absent in BB:
This is a general bug (irrelevant when the mirror is centered at
(0,0,0), i.e., in most cases)
BB = CCC(1)*XIN(1)*VIN(1)*2
$ + CCC(2)*XIN(2)*VIN(2)*2
$ + CCC(3)*XIN(3)*VIN(3)*2
$ + CCC(4)*(XIN(2)*VIN(1)
$ + XIN(1)*VIN(2))
$ + CCC(5)*(XIN(3)*VIN(2)
$ + XIN(2)*VIN(3))
$ + CCC(6)*(XIN(1)*VIN(3)
$ + XIN(3)*VIN(1))
$ + CCC(7)*VIN(1)
$ + CCC(8)*VIN(2)
$ + CCC(9)*VIN(3)
Csrio $ + CCC(10)
ii) in intercept.F Shadow takes the solution closer to the source. This
gives problems with hyperbolas, and it may give problems when source
plane is virtual (not checked). I propose to change to the solution
that presents a ray trajectory closer to the source-oe distance:
C
C tests for convexity
C
Csrio IF (FMIRR.NE.7.AND.F_CONVEX.NE.1) THEN
Csrio TPAR = MAX (TPAR1,TPAR2)
Csrio ELSE
Csrio TPAR = MIN (TPAR1,TPAR2)
Csrio END IF
C
C Changed to take the solution closer to the mirror pole.
C This was needed to correctly calculate hyperbolic Laue crystals
C srio_at_esrf.eu 2008-10-15
C
IF ( ABS(TPAR1-T_SOURCE).LE.ABS(TPAR2-T_SOURCE) ) THEN
TPAR=TPAR1
ELSE
TPAR=TPAR2
ENDIF
ii) in mirror.F a chenge of sign is needed before computing crystal
reflectivity (CALL CRYSTAL). This patch is not fully checked.
Csrio
Csrio
Csrio trick for calculation Hyperbolic Laue using external ccc conic coeffs
Csrio
Csrio
IF (SIN_VAL*SIN_REF.LE.0) THEN
SIN_REF=SIN_REF*-1.0D0
END IF
CALL CRYSTAL (WAVEN, SIN_VAL, SIN_REF, SIN_BRG, REF_S, REF_P,
$ PHASES, PHASEP, DEPTH_MFP_S, DEPTH_MFP_P, DELTA_REF, THETA_B,1)
Manuel Sanchez del Rio srio_at_esrf.eu