FUNCTION read_draine_qabs,file silent=1 ;==== SiC ;Wed Jun 2 11:05:12 EDT 1993 ;alpha-SiC ;Computed by B.T.Draine (cf Laor, A., & Draine, B.T. 1993, ApJ 402,441) ; 21 1.000E-03 1.000E+01 = NRAD, a_1 (micron), a_NRAD (micron) ; 241 1.000E+03 1.000E-03 = NWAV, w_1 (micron), w_NWAV (micron) readcol,file,wav_mu,Qabs,Qsca,g,silent=silent Nl=n_elements(wav_mu) str='' OPENR,unit,file,/get_lun pos=-1 WHILE pos EQ -1 DO BEGIN readf,unit,str pos=strpos(str,'NRAD') ENDWHILE ;FOR i=0,3 DO readf,unit,str CLOSE,unit free_lun,unit sstr=strcompress(str) sstr=strtrim(sstr,2) try=str_sep(sstr,' ') Nsize=long(try(0)) Size_min=float(try(1)) Size_max=float(try(2)) Nli=Nl/Nsize one_st={size:0.,wav_mu:fltarr(Nli),qabs:fltarr(Nli),Qsca:fltarr(Nli),g:fltarr(Nli)} st=replicate(one_st,Nsize) lnsizes=findgen(Nsize)/(1.*Nsize-1)*(alog10(Size_max)-alog10(Size_min))+alog10(Size_min) sizes=10^lnsizes from=0L FOR i=0,Nsize-1 DO BEGIN to=from+Nli-1 st(i).size=sizes(i) st(i).wav_mu=wav_mu(from:to) st(i).qabs=Qabs(from:to) st(i).qsca=Qsca(from:to) st(i).g=g(from:to) from=to+1 ENDFOR RETURN,st END