program conback implicit none include 'database.inc' include 'conv.inc' character*256 line character*120 infile integer l_num record /ofp_targ/ var(TARG_VAR) ! data to use integer i,j,k,lines ! i/o unit to use character*8 type ! type of ME to operate on type = 'set' l_num=0 lines=0 write(*,*) 'Optimize Matrix element coefficient filename' read(*,*) infile open(unit=lun,status='old',name=infile,err=92) 10 continue read (lun, '(a)', end=1000) line ! read in a line l_num = l_num + 1 ! present line # call me_db_read_parse(line, l_num)! parse the line go to 10 ! loop over the file 1000 continue write(6,*)'opening file' open(unit=chan,status='unknown',name='hms_recon_coeff.new',err=93) c write(chan,*)'! focal plane rotation coeffs(4)' c write(chan,*)'! detector offsets' c write(chan,*)'! Z position of true focus' c write(chan,*)'! recostruction matrix elements' c write(chan,*)'! ;(x**n xp**m y**p yp**q)' c write(chan,*)'h_ang_slope_x = 0.0' c write(chan,*)'h_ang_slope_y = 0.0' c write(chan,*)'h_ang_offset_x = 0.0' c write(chan,*)'h_ang_offset_y = 0.0' c write(chan,*)'h_det_offset_x = 0.0' c write(chan,*)'h_det_offset_y = 0.0' c write(chan,*)'h_z_true_focus = 0.0' write(chan,*)'--------------------------------------------------------- >------------' call printme(ofp_targ,lines) do k=1,lines write(chan,1200)(coeff(i,k),i=1,4),(expon(j,k),j=1,4) enddo write(chan,*)"-------------------------------------------------------- >-------------" goto 100 92 write(*,*)'could not open ',infile goto 100 93 write(*,*)'could not open hms_recon_coeff.new' goto 100 1200 format(1x,4(G16.9),1x,4i1) 100 close(unit=lun) close(unit=chan) write(*,*) ' new elements in hms_recon_coeff.new' end