def coord_grid(self):
        """Draw a grid of RA/DEC on Canvas."""

        import math,ephem
        ra2=math.pi*2
        ra1=0
        dec1=-1*math.pi/2.0
        dec2=math.pi/2.0

        
        ## grid space choices
        ## ra space in hours
        ra_grids=["06:00:00",
                  "03:00:00",
                  "01:00:00",
                  "00:30:00",
                  "00:15:00",
                  "00:05:00",
                  "00:01:00",
                  "00:00:30",
                  "00:00:15",
                  "00:00:05"]
        dec_grids=["45:00:00",
                   "30:00:00",
                   "15:00:00",
                   "05:00:00",
                   "01:00:00",
                   "00:15:00",
                   "00:05:00",
                   "00:01:00",
                   "00:00:30"]
        dra=(self.x2-self.x1)/3.0
        ddec=(self.y2-self.y1)/3.0
        for ra_grid in ra_grids:
            if self.hours(ra_grid)<math.fabs(dra):
                break
        ra_grid=self.hours(ra_grid)

        for dec_grid in dec_grids:
            if self.degrees(dec_grid)<math.fabs(ddec):
                break
        dec_grid=self.degrees(dec_grid)
        
        ra=ra1
        n=0
        import Tkinter,ephem
        while (ra<=ra2):
            (cx1,cy1)=self.p2c((ra,dec1))
            ly=cy1-30
            (cx2,cy2)=self.p2c((ra,dec2))
            self.create_line(cx1,cy1,cx2,cy2)
            lx=cx1
            n=n+1
            if n==2:
                dec=dec1
                k=2
                while ( dec <= dec2 ):
                    (lx,ly)=self.p2c((ra,dec))
                    (cx1,cy1)=self.p2c((ra1,dec))
                    (cx2,cy2)=self.p2c((ra2,dec))
                    self.create_line(cx1,cy1,cx2,cy2)
                    k=k+1
                    if k==3:
                        self.create_text(lx-45,ly-12,text=str(ephem.hours(ra)),fill='green')
                        self.create_text(lx+40,ly-12,text=str(ephem.degrees(dec)),fill='brown')
                        self.create_point(ra,dec,color='black',size=3)
                        k=0
                    dec=dec+dec_grid
                n=0
            ra=ra+ra_grid