      subroutine find_constants(spd_start,spd_end,cat_start,cat_end)
C
C Description:
C
C This routine finds the index limits for the bands in declination.
C Each band is 7.5 deg wide and the indices start at zero at the south pole.
C
C Programming Interface:
C
C Name       in/out type     structure  meaning
C
C spd_start  in     real*8   scalar     The south limit of declination (spd)
C spd_end    in     real*8   scalar     The north limit of declination (spd)
C cat_start  out    integer  scalar     The index of the southern region
C cat_end    out    integer  scalar     The index of the northern region
C
C Errors:
C
C This routine does not trap or report any errors. 
C
      implicit none
      include 'std_io.for'
      include 'include_.for'
      real*8 spd_start,spd_end,seg_width
      integer cat_start,cat_end
      seg_width=pi/dble(dec_regions)
      cat_start=int(spd_start/seg_width)
      cat_end=int(spd_end/seg_width)
C
C When spd_end is at a declination band limit, it will mistakenly include
C the adjacent band to the north. This next line detects that mistake
C and fixes it.
C
      if (dabs(spd_end-dble(cat_end)*seg_width) .lt. 1.0d-8) then
         cat_end=cat_end-1
      end if
      return
      end
