source: trunk/fsource/pypowder.for @ 353

Last change on this file since 353 was 353, checked in by vondreele, 11 years ago

modify psvfcj.for to use sh/l only
add derivative routine to pypowder.for
GSASIIgrid.py - new LS controls for derivative type
GSASIIlattice.py - work on docs as per P Jemian
GSASIIpwd.py - major mods to use FCJpsvoight fortran code & derivatives
GSASIIpwdGUI.py - mod to use LS controls

File size: 1.7 KB
Line 
1      SUBROUTINE PYPSVFCJ(NPTS,DTT,TTHETA,SIG,GAM,SPH,PRFUNC)
2C DTT in degrees
3C TTHETA in degrees
4C SPH is S/L + H/L
5C RETURNS FUNCTION ONLY
6Cf2py intent(in) NPTS
7Cf2py intent(in) DTT
8cf2py depend(NPTS) DTT
9Cf2py intent(in) TTHETA
10Cf2py intent(in) SIG
11Cf2py intent(in) GAM
12Cf2py intent(in) SPH
13Cf2py intent(out) PRFUNC
14Cf2py depend(NPTS) PRFUNC
15
16      REAL*4 DTT(0:NPTS-1),PRFUNC(0:NPTS-1)
17      FW = (2.355*SQRT(SIG)+GAM)/100.0
18      FMIN = 10.0*(-FW-SPH*COSD(TTHETA))
19      FMAX = 15.0*FW
20      DO I=0,NPTS-1
21        CALL PSVFCJ(DTT(I)*100.,TTHETA*100.,SIG,GAM,SPH,
22     1    PRFUNC(I),DPRDT,SIGPART,GAMPART,SLPART)
23      END DO
24      RETURN
25      END
26
27      SUBROUTINE PYDPSVFCJ(NPTS,DTT,TTHETA,SIG,GAM,SPH,PRFUNC,
28     1  DPRDT,SIGPART,GAMPART,SLPART)
29C DTT in degrees
30C TTHETA in degrees
31C SPH is S/L + H/L
32C RETURNS FUNCTION & DERIVATIVES
33Cf2py intent(in) NPTS
34Cf2py intent(in) DTT
35cf2py depend(NPTS) DTT
36Cf2py intent(in) TTHETA
37Cf2py intent(in) SIG
38Cf2py intent(in) GAM
39Cf2py intent(in) SPH
40Cf2py intent(out) PRFUNC
41Cf2py depend(NPTS) PRFUNC
42Cf2py intent(out) DPRDT
43Cf2py depend(NPTS) DPRDT
44Cf2py intent(out) SIGPART
45Cf2py depend(NPTS) SIGPART
46Cf2py intent(out) GAMPART
47Cf2py depend(NPTS) GAMPART
48Cf2py intent(out) SLPART
49Cf2py depend(NPTS) SLPART
50
51      REAL*4 DTT(0:NPTS-1),DPRDT(0:NPTS-1),SIGPART(0:NPTS-1),
52     1  GAMPART(0:NPTS-1),SLPART(0:NPTS-1),PRFUNC(0:NPTS-1)
53      FW = (2.355*SQRT(SIG)+GAM)/100.0
54      FMIN = 10.0*(-FW-SPH*COSD(TTHETA))
55      FMAX = 15.0*FW
56      DO I=0,NPTS-1
57        CALL PSVFCJ(DTT(I)*100.,TTHETA*100.,SIG,GAM,SPH,
58     1    PRFUNC(I),DPRDT(I),SIGPART(I),GAMPART(I),SLPART(I))
59        DPRDT(I) = DPRDT(I)*100.
60      END DO
61      RETURN
62      END
63
Note: See TracBrowser for help on using the repository browser.