PSI sics-cvs-psi_pre-ansto

This commit is contained in:
2003-06-13 00:00:00 +00:00
committed by Douglas Clowes
parent 2e3ddfb6c6
commit 3ffd0d8af4
1099 changed files with 318432 additions and 0 deletions

18
difrac/cartc.f Normal file
View File

@@ -0,0 +1,18 @@
C-----------------------------------------------------------------------
C This subroutine calculates the Cartesian coordinates of a reflection
C-----------------------------------------------------------------------
SUBROUTINE CARTC (XP,YP,ZP)
INCLUDE 'COMDIF'
CO = COS((OMEGA)/DEG)
SO = SIN((OMEGA)/DEG)
CC = COS((CHI)/DEG)
SC = SIN((CHI)/DEG)
CP = COS((PHI)/DEG)
SP = SIN((PHI)/DEG)
ENGTH = 2*SIN((THETA/2)/DEG)
XP = ENGTH*(CO*CC*CP - SO*SP)
YP = ENGTH*(CO*CC*SP + SO*CP)
ZP = ENGTH*CO*SC
RETURN
END