      PROGRAM s2phas
*************************************************************************
* Conversion of conductivyt functions to phase of sigma function.      *
* the standard input file must have the format x s1 s2              *
* The outputfile comes as: x phase                             *
*************************************************************************
      REAL X(100000),s1,s2
      complex sig(100000)
      INTEGER I,mm    
      mm=100000 
      do 10 i=1,mm                                                  
       READ(*,*,END=11) X(i),s1,s2
       sig(i)=cmplx(s1,s2)
10    continue   
11    mm=i-1
      do 25 i=1,mm
       write(*,*) x(i),atan(aimag(sig(i))/real(sig(i)))
25    continue
      END  

