;+ ; NAME: OHM83 ; ; PURPOSE: ; To generate a synthetic spectrum of the OH M (8,3) band. ; ; CATEGORY: ; ; CALLING SEQUENCE: ; OHM83,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 ..../oh83wsf.chv 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 ohm83,temp,hw,w1,y d=FLTARR(114) w1=FINDGEN(6000)*0.1+7100 path='c:\idl\synspec\' filename=path+'oh83wsf.chv' OPENR,unit,filename,/GET_LUN READF,unit,d FREE_LUN,unit,unit d=REFORM(d,3,38) w=d(0,0:*) s=d(1,0:*) f=d(2,0:*) power=EXP((-1.4387893/temp)*f) ym=s*((10000./w)^3)*power y=FLTARR(6000) I4=FIX(10.*hw) i1=FIX((w-7100.)*10.) i2=i1+i4 i3=i1-i4 FOR i=0,37 DO BEGIN FOR j=i3(i),i2(i) DO BEGIN strt=j-i1(i) IF strt LT 0 THEN y(j)=y(j)+ym(i)*(j-i3(i))/i4 IF strt EQ 0 THEN y(j)=y(j)+ym(i) IF strt GT 0 THEN y(j)=y(j)+ym(i)*(i2(i)-j)/i4 ENDFOR ENDFOR nozero=WHERE(y) lower=MIN(nozero,MAX=upper) lower=w1(lower)-20 upper=w1(upper)+20 T=STRTRIM(temp,2) halfmax=STRING(hw,FORMAT='(F4.2)') PLOT,w1,y,TITLE='OH (8,3)Band, 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+'oh83wsf.ps' psopen,psfilename PLOT,w1,y,TITLE='OH (8,3)Band, Temp.: '+T+' (K), FWHM: '+HALFMAX+' (A), S-HL',$ XTITLE='Wavelength (A)',YTITLE='Intensity (arbitrary units)',XRANGE=[lower,upper] psclose ENDIF END