SUBROUTINE YDCF(X,GRAT,A,WAVE) * * Module number: 14.8.2.2 * * Module name: YDCF * * Keyphrase: * ---------- * Compute wavelength for given x position * * Description: * ------------ * This routine computes the wavelength given the x (diode position) * * FORTRAN name: YDCF * * Keywords of accessed files and tables: * -------------------------------------- * none * Subroutines Called: * ------------------- * none * History: * -------- * Version Date Author Description * 1 Jan 88 D. Lindler Designed and coded *------------------------------------------------------------------------------- C C INPUT PARAMETERS C C X - X POSITION (DIODE NUMBER) REAL*8 C GRAT - GRATING MODE CHAR*3 C A - COEFFICIENTS REAL*8 VECTOR C C OUTPUT PARAMETERS C C WAVE - WAVELENGTH (REAL*8) C C---------------------------------------------------------------------------- DOUBLE PRECISION X,A(*),WAVE,XX CHARACTER*3 GRAT C C IS IT THE PRISM C IF(GRAT.EQ.'PRI')THEN XX=X-A(6) WAVE=A(1)+A(2)/XX+A(3)/XX**2+A(4)/XX**3+A(5)/XX**4 ELSE C C GRATING MODE C WAVE=A(1)+A(2)*X+A(3)*X**2+A(4)*X**3 ENDIF RETURN END