
C LAST UPDATE: 
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C
C**************************
C**     LSC_MENU1        **
C**************************
C
CD-Routine: Graphical output of scaling results - LSC_MENU1
C This subroutine outputs statistics after internal scaling when no 
C reference data set is present and no absorption correction has been 
C refined. It is called by the main programm LSCALE.
CD-end
CD-Fortran:
      SUBROUTINE LSC_MENU1 (MINDX, EXOUT, CUTOFF)
CD-end
C
      INCLUDE 'implicit_none.finc'
C
C Purpose: Output histograms of scaling results
C
C Author:  S. Arzt, September 1997
C
C Arguments:
C
      INTEGER MINDX
      REAL CUTOFF      
      LOGICAL EXOUT
      
CD-Parameters:
C MINDX   i    (R)    The index of the Laue Integrated Reflections List     
C CUTOFF  r    (R)    Outlier cutoff
C EXOUT   l    (R)    Outlier exclusion flag 
C                     .true.  = exclude outliers
C                     .false. = include outliers
CD-end

C
C====== PARAMETERS:
C 
      INCLUDE 'limits.finc'
C
C====== GLOBALS:
C
      INCLUDE 'view_handles.finc'
      INCLUDE 'get_soft.finc'
      INCLUDE 'screen_params.finc'
C
C====== FUNCTION TYPES:
C
      INTEGER XDLSTR
C
C====== LOCALS:
C
      INTEGER M_REFANA
      INTEGER NVIEW
      INTEGER IVH
      INTEGER IQUIT
      INTEGER IVHLIST(2)
      INTEGER ITEM
      INTEGER IERR
      CHARACTER*19 NAMES
      CHARACTER*25 QUITNAM

      DATA NAMES /'Internal Refinement'/
      DATA QUITNAM /'Quit Program'/

      M_REFANA = 1

600   CALL XDLF_MENU_AREA_SETMENU (IVH_MENU, 1, XDLSTR(NAMES), 
     +                 19, XDLSTR('Internal Refinement Results'), 27,
     +                 XDLSTR(QUITNAM), 12, 0, IERR)

      NVIEW = 1
      IVHLIST(1) = IVH_MENU
      CALL XDLF_GET_EVENTS (NVIEW, IVHLIST, IVH)
      IF (IVH.EQ.IVH_MENU) THEN
         CALL XDLF_MENU_AREA_GETITEM (IVH_MENU,ITEM, IQUIT)
         IF (IQUIT.EQ.1) THEN
            RETURN
         END IF

         IF (ITEM.EQ.M_REFANA) THEN
            CALL LSC_ANALYSES(MINDX, .FALSE., 1, 1, EXOUT, CUTOFF)
            GO TO 600
         END IF
      END IF

      RETURN

      END
