;+ ; NAME: OHM72 ; ; PURPOSE: ; To generate a synthetic spectrum of the OH M (7,2) band. ; ; CATEGORY: ; ; CALLING SEQUENCE: ; OHM72,TEMP,HW,W1,Y [,PS=PS] ; ; INPUTS: ; TEMP: The rotational temperature in calvins. ; ; HW: FWHM , in angstroms. ; ; KEYWORD PARAMETERS: ; PS: Will produce a poscript file for the synthetic spectrum. ; ; OUTPUTS: ; W1: A 1-d array containing the wavelengths of the spectrum ; in angstroms. ; ; Y: A 1-d array containing the relative brightness of the ; spectrum,corresponding to the wavelengths contained in W1. ; ; COMMON BLOCKS: ; None. ; ; SIDE EFFECTS: ; If the keyword is set, the postscript file ...... is produced. ; ; RESTRICTIONS: ; The file ..../ohm72.pmt must exist, as it will hold the rotational ; line wavelenghts, oscillator strength, rotational term values, ect., ; that are needed to generate the synthetic spectrum. ; ; PROCEDURE: ; .... ; ; MODIFICATION HISTORY: ; Modified July 19, 1994, by T A Oliynyk ; ;- PRO ohm72,temp,hw,w1,y,ps=ps w1=0.1*FINDGEN(3400)+6800 path='c:\idl\synspec\' filename=path+'ohm72.pmt' d=FLTARR(6,47) w=FLTARR(47) s=w & f=w & a=w & j1=w w1=FINDGEN(3400)*0.1+6800. OPENR,unit,filename,/GET_LUN READF,unit,D CLOSE,unit w(0:*)=D(0,0:*) s(0:*)=d(1,0:*) f(0:*)=d(2,0:*) j1(0:*)=d(3,0:*) a(0:*)=d(5,0:*) power=EXP((-1.4387893/temp)*f) yms=s*((10000./w)^3)*power ;ymm=a*(2*j1+1)*power br=350. yms=(br/TOTAL(yms))*yms ;ymm=(br/TOTAL(ymm))*ymm y=FLTARR(3400) I4=FIX(10.*hw) i1=FIX((w-6800.)*10.) i2=i1+i4 i3=i1-i4 FOR i=0,46 DO BEGIN FOR j=i3(i),i2(i) DO BEGIN strt=(j-i1(i)) IF strt LT 0 THEN y(j)=y(j)+yms(i)*(j-i3(i))/i4 IF strt EQ 0 THEN y(j)=y(j)+yms(i) IF strt GT 0 THEN y(j)=y(j)+yms(i)*(i2(i)-j)/i4 ENDFOR ENDFOR nozero=WHERE(y) IF nozero(0) NE -1 THEN BEGIN lower=MIN(nozero,MAX=upper) lower=w1(lower)-20 upper=w1(upper)+20 ENDIF ELSE BEGIN lower=MIN(w1,MAX=upper) lower=lower+20 upper=upper+20 ENDELSE T=STRTRIM(temp,2) halfmax=STRING(hw,FORMAT='(F4.2)') PLOT,w1,y,TITLE='OH (7,2) Temp.: '+T+' (K) FWHM: '+HALFMAX+' (A) S-HL',$ XTITLE='Wavelength (A)',YTITLE='Intensity (arbitrary units)',XRANGE=[lower,upper] IF KEYWORD_SET(ps) THEN BEGIN psfilename=path+'ohm72.ps' psopen,psfilename PLOT,w1,y,TITLE='OH (7,2) Temp.: '+T+' (K) FWHM: '+HALFMAX+' (A) S-HL',$ XTITLE='Wavelength (A)',YTITLE='Intensity (arbitrary units)',XRANGE=[lower,upper] psclose ENDIF RETURN END