- Fixed a bug which caused the SICServer to die when a socket was broken.

- Fixed many things in DIFRAC subsystem:
  * Recoded tcentr.f etc so that the course centering will work and will not
    go into an endless loop.
  * fixed boundary overwrites which occurred when yesno or alfnum where
    uset to get a single character and several were given.
  * Addeded documentation for DIFRAC
- Added tcl-files which  support the WWW status system
This commit is contained in:
cvs
2000-03-31 13:16:50 +00:00
parent d02a81400f
commit 714b8ae84d
35 changed files with 3069 additions and 203 deletions

View File

@@ -1,8 +1,9 @@
C-----------------------------------------------------------------------
C Find the Coarse setting for 2-Theta
C-----------------------------------------------------------------------
SUBROUTINE TFIND (TIM)
SUBROUTINE TFIND (TIM, MAXCOUNT)
INCLUDE 'COMDIF'
REAL MAXCOUNT, MCOUNT
DIMENSION TCOUNT(NSIZE)
EQUIVALENCE (ACOUNT(9*NSIZE+1),TCOUNT(1))
STEPM = 0.01
@@ -10,6 +11,7 @@ C-----------------------------------------------------------------------
TSTEP = 0.25
NATT = 0
NPTS = 10
NRUN = 0
100 THEOFF = THETA
OMEOFF = OMEGA
CALL ANGSET (THETA,OMEGA,CHI,PHI,NATT,ICOL)
@@ -17,6 +19,11 @@ C-----------------------------------------------------------------------
MCOUNT = 0
DO 110 I = 1,NPTS
CALL CCTIME (TIM,TCOUNT(I))
CALL KORQ (IFLAG1)
IF (IFLAG1 .NE. 1) THEN
KI = 'O4'
RETURN
ENDIF
IF (TCOUNT(I) .GT. MCOUNT) THEN
MCOUNT = TCOUNT(I)
ICOUNT = I
@@ -25,10 +32,20 @@ C-----------------------------------------------------------------------
OMEGA = OMEGA - SENSE*TSTEP*0.5
CALL ANGSET (THETA,OMEGA,CHI,PHI,NATT,ICOL)
110 CONTINUE
MAXCOUNT = MCOUNT
IF (ICOUNT .EQ. 1) THEN
C
C try, the other direction. But only once as checked by NRUN
C otherwise we end in an endless loop.
C
IF (NRUN .GT. 0) THEN
MAXCOUNT = 0.
RETURN
ENDIF
SENSE = -SENSE
THETA = THEOFF + 9.0*SENSE*TSTEP
OMEGA = OMEOFF - 9.0*SENSE*TSTEP/2
NRUN = NRUN + 1
GO TO 100
ENDIF
IF (ICOUNT .EQ. 10) THEN
@@ -36,14 +53,6 @@ C-----------------------------------------------------------------------
OMEGA = OMEOFF + 3.0*SENSE*TSTEP/2
GO TO 100
ENDIF
THETA = THEOFF + (ICOUNT - 2.25)*SENSE*TSTEP
OMEGA = OMEOFF - 0.5*(ICOUNT - 2.25)*SENSE*TSTEP
TIM = 500.0*TIM/TCOUNT(ICOUNT)
IF (TIM .LT. 10000.0) THEN
IF (TIM .LT. 1000.) TIM = 1000.
TSTEP = TSTEP/4.0
IF (TSTEP .GT. STEPM) GO TO 100
ENDIF
THETA = THEOFF + ICOUNT*SENSE*TSTEP
OMEGA = OMEOFF - ICOUNT*SENSE*TSTEP/2
RETURN