	parameter (n=10751)
	character*133 d0,d1
	real a(n),d(n)
	real ca(n),cb(n),cc(n)
	real x(2000),y(2000)
	ia=0
	ib=0
	ic=0
	open(1,file='Ta03j_16.mag2',status='old')
	do 10 i=1,10751
	read(1,'(a)')d0
	read(1,'(a)')d1
        call tohd(d1(9:32),a(i),d(i))
	read(d1(38:),*)ca(i),cb(i),cc(i)
	if(ca(i).gt.0.)ia=ia+1
	if(cb(i).gt.0.)ib=ib+1
	if(cc(i).gt.0.)ic=ic+1
10	continue
	close(1)
	write(*,*)ia,ib,ic
	write(*,*)'*.mag2 read_in'
	call pgbegin(0,"/xw",1,1)

	open(1,file='TA03a.cat',status='old')  !!!
	k=0
20	read(1,'(a)',end=30)d1
	k=k+1	
	read(d1(43:),*)y(k)
	read(d1(58:),*)j
	x(k)=ca(j)                 !!!
	goto 20
30	write(*,*)k
	close(1)
	call pgenv(8.,23.,8.,23.,0,0)
	call pgpoint(k,x,y,-1)
	call pglabel('TA03j_16.mag2','4k*4k','MAG of color A')

	open(1,file='TA03b.cat',status='old')  !!!
	k=0
120	read(1,'(a)',end=130)d1
	k=k+1	
	read(d1(43:),*)y(k)
	read(d1(58:),*)j
	x(k)=cb(j)                 !!!
	goto 120
130	write(*,*)k
	close(1)
	call pgenv(8.,23.,8.,23.,0,0)
	call pgpoint(k,x,y,-1)
	call pglabel('TA03j_16.mag2','4k*4k','MAG of color B')

	open(1,file='TA03c.cat',status='old')  !!!
	k=0
220	read(1,'(a)',end=230)d1
	k=k+1	
	read(d1(43:),*)y(k)
	read(d1(58:),*)j
	x(k)=cc(j)                 !!!
	goto 220
230	write(*,*)k
	close(1)
	call pgenv(8.,23.,8.,23.,0,0)
	call pgpoint(k,x,y,-1)
	call pglabel('TA03j_16.mag2','4k*4k','MAG of color C')

	call pgend
	end

        subroutine tohd(cc,alpha,delta)
        character*(*) cc
        character*20 dd
        k1=index(cc,' ')
        k2=index(cc,',')
        k=min(k1,k2)
        if(k1.eq.0)k=k2
        if(k2.eq.0)k=k1
        dd=cc(1:k)
        do 10 i=1,9
10      if(dd(i:i).eq.':')dd(i:i)=','
        read(dd(1:),*,end=15)x,y,z
15      alpha=x+y/60.+z/3600.
        do 16 i=k+1,k+6
        if(cc(i:i).ne.' ')goto 17
16      continue
17      dd=cc(i:)
        k1=index(dd,' ')
        k2=index(dd,',')
        k=min(k1,k2)
        if(k1.eq.0)k=k2
        if(k2.eq.0)k=k1
        do 20 i=1,k
20      if(dd(i:i).eq.':')dd(i:i)=','
        read(dd(1:K),*,end=30)x,y,z
30      if(x.lt.0.)x=-x
        delta=x+y/60.+z/3600.
        if(index(cc,'-').ne.0)delta=-delta
        end


