      REAL FUNCTION cal(XDUMMY)
      REAL
     +TIME    ,X       ,Y       ,SCALE   ,ROT      
*
      LOGICAL         CHAIN
      CHARACTER*128   CFILE
*
      COMMON /PAWCHN/ CHAIN, NCHEVT, ICHEVT
      COMMON /PAWCHC/ CFILE
*
      COMMON/PAWIDN/IDNEVT,VIDN1,VIDN2,VIDN3,VIDN(10),
     +TIME    ,X       ,Y       ,SCALE   ,ROT      
*
      real xa(100),ya(100),ra(100),sa(100)
      real xe(100),ye(100),re(100),se(100)
      cal=1.

	xcor=x-(scale/0.48+3.9)
        ycor=y-(scale/0.39+3.6)

      if (time.gt.15.00) then

	 if (time.ge.15.30  .and. time.lt.15.31) then
          if  (y.gt.7.5) then
           print *,'RASpar ',time,x,y,scale,rot
           xa(1)=x
           ya(1)=y
           ra(1)=rot
           sa(1)=scale
          else
           print *,'RASper ',time,x,y,scale,rot
           xe(1)=xcor
           ye(1)=ycor
           re(1)=rot
           se(1)=scale
         endif
         endif

C 100 um ptich larger
	 if (time.ge.15.31  .and. time.lt.15.33) then
          if  (y.gt.7.5) then
           print *,'RASpar ',time,x,y,scale,rot
           xa(2)=x
           ya(2)=y
           ra(2)=rot
           sa(2)=scale
          else
           print *,'RASper ',time,x,y,scale,rot
           xe(2)=xcor
           ye(2)=ycor
           re(2)=rot
           se(2)=scale
         endif
         endif


C 250 um ptich larger
c	 if (time.ge.15.  .and. time.lt.15.4830) then
	 if (time.ge.16.02  .and. time.lt.16.03) then
          if  (y.gt.7.5) then
           print *,'RASpar ',time,x,y,scale,rot
           xa(3)=x
           ya(3)=y
           ra(3)=rot
           sa(3)=scale
          else
           print *,'RASper ',time,x,y,scale,rot
           xe(3)=xcor
           ye(3)=ycor
           re(3)=rot
           se(3)=scale
         endif
         endif

     

	endif

        if (time.gt.16.07) then
         print *,'step par 100',xa(2)-xa(1),ya(2)-ya(1),
     +                      ra(2)-ra(1),sa(2)-sa(1)

         print *,'step par 250',xa(3)-xa(1),ya(3)-ya(1),
     +                      ra(3)-ra(1),sa(3)-sa(1)

         print *,'step per 100',xe(2)-xe(1),ye(2)-ye(1),
     +                      re(2)-re(1),se(2)-se(1)

         print *,'step per 250',xe(3)-xe(1),ye(3)-ye(1),
     +                      re(3)-re(1),se(3)-se(1)
         endif

      END





