PSI sics-cvs-psi_pre-ansto
This commit is contained in:
18
difrac/cartc.f
Normal file
18
difrac/cartc.f
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user