σ
ίΘ[c           @` s0  d  d l  m Z m Z m Z m Z d  d l Z d  d l Z d  d l Z d d l	 m
 Z
 m Z d d l m Z d d l m Z g  e
 d d d	 D] Z e j j e  ^ q Z d
   Z e j j d e  d    Z g  e
 d d d	 D] Z e j j e  ^ qη Z d   Z e j j d e  d    Z d S(   i    (   t   absolute_importt   divisiont   print_functiont   unicode_literalsNi   (   t   get_pkg_data_filenamest   get_pkg_data_contents(   t   NumpyRNGContext(   t   wcsu   mapst   patternu   *.hdrc          C` s:   d }  t  t  |  k s6 t d j t  t  |     d  S(   Ni   uG   test_read_map_files has wrong number data files: found {}, expected  {}(   t   lent   hdr_map_file_listt   AssertionErrort   format(   t   n_map_files(    (    s?   lib/python2.7/site-packages/astropy/wcs/tests/test_profiling.pyt   test_read_map_files   s    u   filenamec         C` s   t  t j j d |    } t j |  } t d  D t j j	 d | j j
  } | j | d  } | j | d  } Wd  QXd  S(   Nu   mapsiΝ[i   i   i   i   (   R   t   ost   patht   joinR   t   WCSR   t   npt   randomt   randt   naxist   wcs_pix2worldt   wcs_world2pix(   t   filenamet   headert   wcsobjt   xt   worldt   pix(    (    s?   lib/python2.7/site-packages/astropy/wcs/tests/test_profiling.pyt   test_map(   s    u   spectrac          C` s:   d }  t  t  |  k s6 t d j t  t  |     d  S(   Ni   u@   test_spectra has wrong number data files: found {}, expected  {}(   R	   t   hdr_spec_file_listR   R   (   t   n_spec_files(    (    s?   lib/python2.7/site-packages/astropy/wcs/tests/test_profiling.pyt   test_read_spec_files6   s    c         C` s   t  t j j d |    } t j |  } t d  D t j j	 d | j j
  } | j | d  } | j | d  } Wd  QXd  S(   Nu   spectraiΝ[i   i   i   i   (   R   R   R   R   R   R   R   R   R   R   R   R   R   (   R   R   R   R   R   R   (    (    s?   lib/python2.7/site-packages/astropy/wcs/tests/test_profiling.pyt   test_spectrumA   s    (   t
   __future__R    R   R   R   R   t   pytestt   numpyR   t
   utils.dataR   R   t
   utils.miscR   t    R   t   fnameR   t   basenameR
   R   t   markt   parametrizeR   R    R"   R#   (    (    (    s?   lib/python2.7/site-packages/astropy/wcs/tests/test_profiling.pyt   <module>   s   "1		1	