c PTrap15publ G.Audi m 06 nov 2012 c c Conversion of Frequency Ratios to Linear Equations c real*8 xzero,mel,mref,smref,mrefk,rap,srap,coef real*8 prov,membre,sigmem,m118,sm118 integer q118,qref character txref*4,tx118*4,rev*2 character*30 filea,fileb c c mel : electron mass in micro-u c mref,smref,m118,sm118 : Masses and uncert. for reference (ref) and mesured (118) c filea='ptkl.equat ' ! output file fileb='ptkl.freq ' ! input file open(unit=1,file=filea,form='formatted',status='new') open(unit=3,file=fileb,form='formatted',status='old',readonly) c mel = 548.5799110 xzero = 9.314940090d-1 ! conversion factor micro-u to keV 12 read(3,1001,err=99) iaref,txref,qref,mref,rev,smref ! read reference, mass in micro-u 1001 format(i4,a4,i4,f17.6,a2,f11.6) mrefk = mref * xzero c 15 read(3,1001,end=90,err=99) ia118,tx118,q118,rap,rev,srap ! read frequency ratio if(tx118.eq.'NEW ') go to 12 ! reset reference if(rev.eq.' ') then ! if reversed freq. ratio: rev=-1 rap = rap / 1.d+6 srap = srap / 1.d+6 else rap = 1.d+6 / rap srap = rap*rap * srap/1.d+6 endif coef = anint(1000.*ia118/iaref) / 1000. ! calculate 3-digit coefficient c prov = (ia118*1.d+0)/iaref - rap*q118/qref membre = mref*(rap*q118/qref-coef) + mel*q118*(1-rap) * - iaref*1.d+6*prov ! value (in micro-u) for the equation sigmem = srap * iaref * 1.d+6 * q118/qref ! its uncertainty write (1,1020) ia118,tx118,iaref,txref,coef,membre,sigmem 1020 format(5x,i6,a4,'-',i4,a4,'*', * f6.3,' =', f13.3,' (',f9.3,')') m118 = membre + coef*mref sm118 = sqrt(sigmem**2 + (coef*smref)**2) write (1,1030) ia118,tx118,m118,sm118 1030 format(13x,i4,a4,' =',f14.5,' +/-',f10.5,' micro-u') m118 = m118 * xzero sm118 = sm118 * xzero write (1,1032) m118,sm118 1032 format(13x,8x,' =',f14.5,' +/-',f10.5,' keV',/) c go to 15 c 90 write (1,1990) 1990 format(1H0,'Normal End of Freq.Ratios to Equations Conversion') stop 99 write(1,1999) 1999 format(1H0,'Error in File Reading') stop end