³ò
`T{Jc           @   sR   d  d k  Td  d k Td „  Z d „  Z d d „ Z e d j o e d ƒ GHn d S(   iÿÿÿÿ(   t   *c         C   sb   |  d d !i  ƒ  } t |  d d !ƒ } t |  d d !ƒ } t |  d d !i  ƒ  ƒ } | | | | f S(	   Ni    i
   i   i!   i#   i,   i>   iC   (   t   stript   hmsstring2rat   dmsstring2dect   float(   t   st   gcidt   rat   dect   dist(    (    s7   /home/dstn/astrometry/projects/itsfullofstreams/mwgc.pyt   parse_mwgc_part1_line   s
    c         C   sY   |  d d !i  ƒ  } |  d d !i  ƒ  } t | ƒ o t | ƒ } n t d ƒ } | | f S(   Ni    i
   i   i   t   nan(   R   t   lenR   (   R   R   t   fehstrt   feh(    (    s7   /home/dstn/astrometry/projects/itsfullofstreams/mwgc.pyt   parse_mwgc_part3_line   s    s   mwgc.datc         C   s  t  |  ƒ } d } d	 } | i d ƒ } g  } g  } x: | | d | d d !D] } t | ƒ } | i | ƒ qM Wx: | | d | d d !D] } t | ƒ } | i | ƒ qŠ Wg  }	 xN t | | ƒ D]= \ }
 } |
 d | d j p t ‚ |	 i |
 | d ƒ qÃ W|	 S(
   NiJ   iß   i£  i8  s   
i    i   (   iJ   iß   (   i£  i8  (   t	   read_filet   splitR
   t   appendR   t   zipt   AssertionError(   t   fnR   t   part1t   part3t   linest	   part1datat	   part3datat   lt   Xt   mwgct   x1t   x3(    (    s7   /home/dstn/astrometry/projects/itsfullofstreams/mwgc.pyt
   parse_mwgc   s(       t   __main__N(   t   astrometry.util.filet   astrometry.util.starutilR
   R   R    t   __name__(    (    (    s7   /home/dstn/astrometry/projects/itsfullofstreams/mwgc.pys   <module>   s   

		
