
C LAST UPDATE:
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C
C*****************************
C**    LSM_LAMBDALIMITS     **
C*****************************
C
C **** LSM SERVICE ROUTINE ONLY ****
C
      SUBROUTINE LSM_LAMBDALIMITS (NR, ALAMMIN, ALAMMAX, THEMIN,
     +             THEMAX, STOLMIN, STOLMAX, AIMIN, AIMAX)
C
      INCLUDE 'implicit_none.finc'
C
C Purpose : returns lambda limits of ranges used for normalisation
C
C Author:  Steffi Arzt, John Campbell, July 1997
C
C Arguments:
C
      INTEGER NR
      REAL ALAMMIN, ALAMMAX
      REAL THEMIN, THEMAX
      REAL STOLMIN, STOLMAX
      REAL AIMIN, AIMAX
C
C Parameters:
C
C   NR      i  (R)    no. of lamda range 
C   ALAMMIN r  (W)    minimum lambda value for range
C   ALAMMAX r  (W)    maximum lambda value for range
C   THEMIN  r  (W)    minimum theta value for range    
C   THEMAX  r  (W)    maximum theta value for range    
C   STOLMIN r  (W)    minimum sin**2theta/lambda**2 value for range    
C   STOLMAX r  (W)    maximum sin**2theta/lambda**2 value for range    
C   AIMIN   r  (W)    minimum unscaled intensity for range 
C   AIMAX   r  (W)    maximum unscaled intensity for range  
C
C====== PARAMETERS:
C
      INCLUDE 'limits.finc'
C
C====== GLOBALS:
C
      INCLUDE 'scp.finc'

      ALAMMIN = NORMLAMMIN(NR)
      ALAMMAX = NORMLAMMAX(NR)
      THEMIN = THETAMIN
      THEMAX = THETAMAX
      STOLMIN = STOL2MIN 
      STOLMAX = STOL2MAX
      AIMIN = AINTMIN
      AIMAX = AINTMAX

      END
