|
Fundamental TechnologiesUlysses HISCALE Pages |
Appendix 9 Geometric Factor Study for the Deflected and Unscattered Electrons of HISCALE (Buckley MS Thesis continued)
* PROGRAM I.21 *
******************************************************************************* * AREA * * THIS PROGRAM READS INPUT FROM FILES CONTAINING THE G FACTORS AT SPECIFIC * * ENERGIES. IT THEN READ IN THE PASSBANDS YOU SELECT, AND COMPUTES G BY * * CALCULATING THE AREA UNDER THE CURVE OF G VS E. * * CSPQU IS A BELL PORT SUBROUTINE. FOR MORE INFORMATION, CONSULT THE MANUAL. * *******************************************************************************
program area
integer i parameter (n=12) real a,b,ans real x(n),y(n) character*72 filename
C Read data points into the arrays X and Y
write (6,*) 'Name of file:' read (5,*) filename open (unit=11,status='old',access='sequential',file=filename) open (unit=12,status='old',access='sequential',file='limits.dat') do i = 1,n read(11,*) x(i),y(i) D WRITE(6,*) X(i),Y(i) end do close (11)
C Enter upper and lower limits of integration do i = 1,4
read (12,*) a read (12,*) b
C Find the area under the curve call cspqu (x,y,n,a,b,ans)
d write(6,*) ('Area is:',ans,'cm^2 sr')
WRITE(6,*) ('G IS:',ANS/(B-A),'CM^2 SR')
end do
close (12)
end