subroutine writeinfo(lat) use bmad implicit none type (lat_struct) lat integer i, lun lun = lunget() open(unit=lun, file="twissparam.dat") write(lun,'(a,es12.4)')'horizontal tune = ',lat%a%tune/twopi write(lun,'(a,es12.4)')'vertical tune = ',lat%b%tune/twopi do i=1,lat%n_ele_track write(lun,'(6es12.4)')lat%ele(i)%a%beta, lat%ele(i)%a%alpha,lat%ele(i)%a%beta, lat%ele(i)%a%alpha,& lat%ele(i)%x%eta, lat%ele(i)%x%etap end do close(unit=lun) return end