     	SUBROUTINE LAMDAP
C
C  PROGRAMMER:  R.S. ZHOU
C		ALFRED UNIVERSITY, FEB-1987
C
C	THIS ROUTINE CALCULATES THE ANGULER PEAK POSITION
C	ACCORDING TO THE CURRENT SPECIFIED RADIATION SOURCES.
C
     	INCLUDE 'FILECONV.CBS'

     	DO I=1, NPKS
C
C  GET THE PEAK TYPE...
C
     	   ID = 1
     	   IF( PEAK(I).EQ.'KA2' ) ID = 2
     	   IF( PEAK(I).EQ.'KA' )  ID = 3
     	   IF( PEAK(I).EQ.'KB1' ) ID = 4
C
C  CALCULATE THE NEW TWO-THETA...
C
     	   DUMY = 0.5*WAVE(ID,IELE)/FDSP(I)
     	   IF( DUMY.GE.1.0 ) GOTO 222
     	   F2TH(I) = RTOD*ASIN( DUMY )
     	   DUMY = 0.5*WAVE(ID,IELE)/CDSP(I)
     	   IF( DUMY.GE.1.0 ) GOTO 222
     	   C2TH(I) = RTOD*ASIN( DUMY )
     	ENDDO
     	GOTO 333
222	CALL CURSOR( 22, 1 )
     	WRITE(6,223) NPKS-I+1
223	FORMAT(10X,I3,' NUMBER OF PEAKS TRUNCATED (TWO-THETA>180.0)')
     	NPKS = I-1
333	CALL CURSOR( 23, 1 )
     	CALL COLORS(-1)
     	WRITE(6,111)
111	FORMAT(' _NOTE: peak two-thetas have been reset',
     	1' to the new radiation source.')

999	RETURN
     	END
