Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- character*17 name1, name2, name3, name4, name5, name6
- integer i,j,x
- real a,b,c,d,e,f,g,h,k,l,m,n,o,p,q,r,s,t,u,v,w,y,z
- real aa,ba,ca,da,ea,fa,ga,ha,ia,ja,ka,la,ma
- pi=acos(-1.0)
- open(unit=1, file="pointingsTable2")
- open(unit=20, file="testedpointings.dat")
- open(unit=30, file="commonSources.dat")
- open(unit=50, file="transientSources.dat")
- open(unit=60, file="allSources.dat")
- DO i=1,10
- read(1,*,end=10) name1 !pointing1
- write(20,*) name1
- open(unit=2, file=name1)
- DO ii=1,1000
- read(2,*,end=20) a,name2,b,c,d,e,f,g,h,k,l !details of source1
- m=(b*15)+(c/4)+(d/240) !RA of source1
- n=e-(f/60)-(g/3600) !declination of source1
- open(unit=3, file="pointingsTable3")
- DO j=1,1000
- read(3,*,end=30) name3,o,p,q,r,s,t !details of pointing2
- u=(o*15)+(p/4) !RA of pointing2
- v=r-(s/60)-(t/3600) !declination of pointing2
- w=sqrt(((m-u)**2)+((n-v)**2)) !distance between pointing2 and source1
- IF ( ( w .le. 2.25 ) .and. ( name1 .ne. name3 ) ) then
- write(60,*) name2 !all sources
- x=1
- open(unit=4, file=name3)
- DO jj=1,1000
- read(4,*,end=40) aa,name4,ba,ca,da,ea,fa,ga,ha,ia,ja !details of source2 in pointing2
- ka=(ba*15)+(ca/4)+(da/240) !RA of source2 in pointing2
- la=ea-(fa/60.0)-(ga/3600) !declination of source2 in pointing2
- ma=sqrt(((ka-m)**2)+((la-n)**2)) !distance between source1 and source2
- IF (ma.lt.(5.0/3600)) then
- write(30,*) name1,name2,name3,name4
- x=0
- ENDIF
- ENDDO
- 40 continue
- IF (x.eq.1) write(50,*) name1,a,name2,b,c,d,e,f,g,h,k,l !transient sources
- close(4)
- ENDIF
- ENDDO
- 30 continue
- close(3)
- ENDDO
- 20 continue
- close(2)
- ENDDO
- 10 continue
- close(1)
- close(30)
- close(40)
- close(50)
- close(60)
- close(70)
- close(80)
- close(90)
- close(100)
- close(110)
- close(120)
- STOP
- END
Add Comment
Please, Sign In to add comment