
CD-Section: Select and Find Reflection Sets
C These are a series of routines to set which classes of singles reflections
C are to be retrieved from a Laue Integrated Reflection List (LIRL) for
C use in LSM parameter refinement or analysis or scaling of the reflection
C data.
CD-end


C LAST UPDATE:
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C
C***********************
C**     LSM_OMIT      **
C***********************
C
C
CD-Routine: Omit packs - LSM_OMIT
C This routine is used to omit selected packs from the scaling process.
C The reflections from such packs will not be used in determining or
C refining any scaling parameters and will not be included in any
C R-factor analyses done using the supplied LSM routines. It is
C intended to provide a simple means of excluding poor packs without
C having to make extensive modifications to the input LSM containing
C data file. This will normally be called before using routines
C LSM_SELECT_PKPL (and related routines), LSM_SET_RFLAGS  (and related 
C routines) and LSC_RFACTS (and related routines). Such routines will
C need to be called again if the list of omitted packs is changed.
C The routine may also be used to clear the omitted packs list.
C On program startup, there will be no omitted packs
CD-end
CD-Fortran:
      SUBROUTINE LSM_OMIT (NOMIT, IPACKS)
CD-end
C
      INCLUDE 'implicit_none.finc'
C
C Purpose: Select Packs and Plates for retrieving data from LIRL
C
C Author:  Steffi Arzt, John Campbell, July 1997
C
C Arguments:
C
C
      INTEGER NOMIT
      INTEGER IPACKS(*)
C
CD-Parameters:
C  NOMIT       i (R)   No. of packs to be omitted (0 clears the
C                      omitted packs list)
C  IPACKS()    i (R)   If NOMIT > 0 then this array gives a list of
C                      the NOMIT packs to be omitted; if NOMIT = 0,
C                      a dummy array may be given.
CD-end
C
C Implementation note: Sets 'markup_required' flag
C Implementation note: Sets 'select required' flag
C
C====== PARAMETERS:
C
      INCLUDE 'limits.finc'
C
C====== GLOBALS:
C
      INCLUDE 'lsm_flags.finc'
      INCLUDE 'use_reflns.finc'
C
C====== LOCALS:
C
      INTEGER I
      INTEGER IPK

C
C-------------------------------------------------------------------------------
C
      MARKUP_REQUIRED = .TRUE.
      SELECT_REQUIRED = .TRUE.

      DO 10 I = 1, MAXPACK
         OMIT(I) = .FALSE.
 10   CONTINUE
      IF (NOMIT.GT.0) THEN
         DO 20 I = 1, NOMIT
            IPK = IPACKS(I)
            IF (IPK.GE.1.AND.IPK.LE.MAXPACK) OMIT(IPK) = .TRUE.
 20      CONTINUE
      END IF

      RETURN

      END
