
;
; The Mendoza A-values were typed by hand into file mendoza.txt. Note
; that he gives separate A-values for E2 and M1 transitions so these
; need to be added.
;

openr,lin,'mendoza.txt',/get_lun
openw,lout,'ca_6.wgfa_mendoza',/get_lun

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

a=fltarr(4)

WHILE eof(lin) NE 1 DO BEGIN
  readf,lin,a
  i=fix(a[1])
  j=fix(a[0])
  wvl=1e8/(ecm[j-1]-ecm[i-1])
  printf,lout,format='(2i5,f15.3,2e15.3)',a[1],a[0],wvl,0.,a[2]+a[3]
ENDWHILE

printf,lout,' -1'
printf,lout,'%file:  ca_6.wgfa'
printf,lout,'%Compiled for the CHIANTI database by Peter Young, 21-Jul-2009'
printf,lout,'%A-values:  Mendoza C., & Zeippen, C.J., 1982, MNRAS, 198, 127'
printf,lout,'%Wavelengths: derived from energies in the CHIANTI .elvlc file'
printf,lout,' -1'

free_lun,lin,lout

END
