
;
; Converts the Fe IV Froese Fischer et al. (2008) data into CHIANTI
; format.
;
; PRY, 31-Aug-2009
;

read_elvlc,'fe_4.elvlc',l1,term,conf,ss,ll,jj,ecm,eryd,ecmth,erydth,ref

openr,lin,'froese_fischer2.txt',/get_lun

openw,lout,'fe_4.wgfa',/get_lun

WHILE eof(lin) NE 1 DO BEGIN
  readf,lin,format='(i2,i3,33x,e10.3)',i,j,aval
  wvl=1d8/abs(ecm[j-1]-ecm[i-1])
  printf,lout,format='(2i5,f15.3,2e15.3)',i,j,wvl,0.,aval
ENDWHILE

printf,lout,' -1'
printf,lout,'%file:  fe_4.wgfa'
printf,lout,'%Prepared for the CHIANTI database by Peter Young, 31-Aug-2009'
printf,lout,'%A-values: Froese Fischer, C., Rubin, R. H., Rodriguez, M. 2008, MNRAS, 391, 1828'
printf,lout,'%Wavelengths: Derived from observed energies in .elvlc file.'
printf,lout,' -1'


free_lun,lin,lout

END
