(file) Return to convertback.f CVS log (file) (dir) Up to [HallC] / Optics / conversion

 1 jones 1.1         program conback
 2           
 3           
 4                   implicit none
 5           
 6 jones 1.3         include 'db.inc'
 7 jones 1.1         include 'conv.inc'
 8           
 9                   character*256 line
10 jones 1.2         character*120 infile
11 jones 1.1         integer  l_num
12           
13            
14           	record /ofp_targ/ var(TARG_VAR)	! data to use 
15                   integer i,j,k,lines				! i/o unit to use
16           	character*8    type			! type of ME to operate on
17           
18           
19                         
20                   type = 'set'        
21                   l_num=0
22                   lines=0
23           
24 jones 1.2         
25                   write(*,*) 'Optimize Matrix element coefficient filename'
26                   read(*,*) infile
27                   open(unit=lun,status='old',name=infile,err=92)
28 jones 1.1 
29           10	continue
30           	read (lun, '(a)', end=1000) line	! read in a line
31           	l_num = l_num + 1		! present line #
32           
33           	call me_db_read_parse(line, l_num)! parse the line
34           
35           	go to 10				! loop over the file
36           
37           1000	continue
38                   write(6,*)'opening file'
39                   open(unit=chan,status='unknown',name='hms_recon_coeff.new',err=93)
40           c	write(chan,*)'! focal plane rotation coeffs(4)'
41           c	write(chan,*)'! detector offsets'
42           c	write(chan,*)'! Z position of true focus'
43           c	write(chan,*)'! recostruction matrix elements'
44           c	write(chan,*)'! <phi y theta delta | nmpq>;(x**n xp**m y**p yp**q)'
45           c	write(chan,*)'h_ang_slope_x  = 0.0'
46           c	write(chan,*)'h_ang_slope_y  = 0.0'
47           c	write(chan,*)'h_ang_offset_x = 0.0'
48           c	write(chan,*)'h_ang_offset_y = 0.0'
49 jones 1.1 c	write(chan,*)'h_det_offset_x = 0.0'
50           c	write(chan,*)'h_det_offset_y = 0.0'
51           c	write(chan,*)'h_z_true_focus = 0.0'
52                   write(chan,*)'---------------------------------------------------------
53                >------------'
54           
55                   call printme(ofp_targ,lines)
56           
57                   do k=1,lines
58                    write(chan,1200)(coeff(i,k),i=1,4),(expon(j,k),j=1,4)
59                   enddo
60           
61                   write(chan,*)"--------------------------------------------------------
62                >-------------"
63           
64                   goto 100        
65 jones 1.2  92     write(*,*)'could not open ',infile
66 jones 1.1         goto 100
67            93     write(*,*)'could not open hms_recon_coeff.new'
68                   goto 100
69           
70            1200   format(1x,4(G16.9),1x,4i1)
71           
72            100    close(unit=lun)
73                   close(unit=chan)
74 jones 1.2         write(*,*) ' new elements in hms_recon_coeff.new'
75 jones 1.1         end  
76           
77           
78           
79           

Analyzer/Replay: Mark Jones, Documents: Stephen Wood
Powered by
ViewCVS 0.9.2-cvsgraph-1.4.0