| 
									
										
										
										
											2005-12-22 16:40:53 +00:00
										 |  |  | #------------------------------------------------------ astro | 
					
						
							|  |  |  | from Tkinter import * | 
					
						
							|  |  |  | import Pmw | 
					
						
							|  |  |  | import g | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def done(): | 
					
						
							|  |  |  |     g.astro_geom0=root.geometry() | 
					
						
							|  |  |  |     root.withdraw() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | root=Toplevel() | 
					
						
							|  |  |  | root.withdraw() | 
					
						
							|  |  |  | root.protocol('WM_DELETE_WINDOW',done) | 
					
						
							|  |  |  | if g.Win32: root.iconbitmap("wsjt.ico") | 
					
						
							|  |  |  | root.title("Astronomical data") | 
					
						
							|  |  |  | frame=Frame(root) | 
					
						
							|  |  |  | frame.pack() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def astro2(t): | 
					
						
							|  |  |  |     root.geometry(t) | 
					
						
							|  |  |  |     root.deiconify() | 
					
						
							|  |  |  |     root.focus_set() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def update(): | 
					
						
							|  |  |  |     t1= "                       Az        El\n"  | 
					
						
							|  |  |  |     t2= "Moon:   %11.2f  %6.2f\n" % (g.AzMoon,g.ElMoon) | 
					
						
							| 
									
										
										
										
											2005-12-29 21:29:42 +00:00
										 |  |  |     t3= "Moon/DX:  %6.2f  %7.2f\n" % (g.AzMoonB,g.ElMoonB) | 
					
						
							| 
									
										
										
										
											2005-12-22 16:40:53 +00:00
										 |  |  |     t4= "Sun:     %11.2f   %6.2f\n" % (g.AzSun,g.ElSun) | 
					
						
							| 
									
										
										
										
											2005-12-29 21:29:42 +00:00
										 |  |  |     t4a="Source:   %8.2f  %6.2f\n\n" % (g.AzAux,g.ElAux) | 
					
						
							|  |  |  |     t5= "            Doppler   df/dt\n" | 
					
						
							|  |  |  |     t6= "DX:        %6d %7.2f\n" % (g.ndop,g.dfdt) | 
					
						
							| 
									
										
										
										
											2005-12-22 16:40:53 +00:00
										 |  |  |     t7= "Self:     %8d %7.2f\n\n" % (g.ndop00,g.dfdt0) | 
					
						
							| 
									
										
										
										
											2005-12-29 21:29:42 +00:00
										 |  |  |     t7a="                 RA       DEC\n" | 
					
						
							| 
									
										
										
										
											2005-12-22 16:40:53 +00:00
										 |  |  |     irah=int(g.RAMoon) | 
					
						
							|  |  |  |     iram=int(60.0*(g.RAMoon-irah)) | 
					
						
							| 
									
										
										
										
											2005-12-29 21:29:42 +00:00
										 |  |  |     t7b="Moon:     %2.2d:%2.2d  %7.2f\n" % (irah,iram,g.DecMoon) | 
					
						
							| 
									
										
										
										
											2005-12-22 16:40:53 +00:00
										 |  |  |     irah=int(g.RaAux) | 
					
						
							|  |  |  |     iram=int(60.0*(g.RaAux-irah)) | 
					
						
							| 
									
										
										
										
											2005-12-29 21:29:42 +00:00
										 |  |  |     t7c="Source:   %2.2d:%2.2d  %7.2f\n\n" % (irah,iram,g.DecAux) | 
					
						
							|  |  |  |     t8= "Freq: %4d   Tsky: %6d\n" % (g.nfreq,g.ntsky) | 
					
						
							|  |  |  |     t9= "MNR: %4.1f   Dgrd:  %5.1f\n" % (g.MaxNR,g.Dgrd) | 
					
						
							|  |  |  |     t10="DPol:  %4d    SD:  %7.2f\n" % (g.poloffset,g.sd) | 
					
						
							| 
									
										
										
										
											2005-12-22 16:40:53 +00:00
										 |  |  |     t=t1+t2+t3+t4+t4a+t5+t6+t7+t7a+t7b+t7c+t8+t9+t10 | 
					
						
							|  |  |  |     lab1.configure(text=t) | 
					
						
							|  |  |  |     g.astro_geom=root.geometry() | 
					
						
							|  |  |  |     frame.after(1000,update) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-01-06 16:06:57 +00:00
										 |  |  | lab1=Label(frame,font=('Helvetica 16'),justify=LEFT,bg="#66FFFF", | 
					
						
							| 
									
										
										
										
											2005-12-22 16:40:53 +00:00
										 |  |  |            relief=RIDGE,bd=4,anchor=N) | 
					
						
							|  |  |  | lab1.pack(ipadx=4) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | frame.after(1000,update) |