ó
™xTc           @   sL   d  d l  m Z d e f d „  ƒ  YZ e d k rH e ƒ  Z e j ƒ  n  d S(   iÿÿÿÿ(   t   divisiont   Testc           B   s   e  Z d  „  Z d „  Z RS(   c         C   s   d  S(   N(    (   t   self(    (    sO   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/xds/tests/tst_integrate_hkl.pyt   __init__   s    c         C   sø  d d l  m } d d  l } d d  l } y | j j d ƒ } Wn t k
 rY } d GHd  SX| j j | d d d ƒ } | j	 ƒ  } | j
 | ƒ | j | j | j | j | j | j | j | j | j | j | j | j | j | j | j | j | j | j | j | j | j | j  | j! | j" d d l# m$ } | | ƒ }	 |	 j% ƒ  d	 k sjt& ‚ |	 j' ƒ  }
 t( |
 ƒ d
 k sŽt& ‚ |
 d j ƒ  j) ƒ  j* ƒ  | j k s¹t& ‚ |	 j+ ƒ  } | j d k sÚt& ‚ | j d k sït& ‚ d GHd  S(   Niÿÿÿÿ(   t   integrate_hklt   iotbxs%   FAIL: dials_regression not configuredt   xdst   testss   INTEGRATE.HKL(   t   any_reflection_filet   xds_integrate_hkli
   i    gJÎ‰=´�U¿gb�oïZ?g~§ÉŒ·Uð?gòÒMbXï?t   OK(   gJÎ‰=´�U¿gb�oïZ?g~§ÉŒ·Uð?(,   t	   iotbx.xdsR   t   ost   libtbx.load_envt   envt	   dist_patht   KeyErrort   patht   joint   readert	   read_filet   space_groupt	   unit_cellt   detector_sizet
   pixel_sizet   starting_framet   starting_anglet   oscillation_ranget   rotation_axist
   wavelengtht   beam_vectort   detector_x_axist   detector_y_axist   detector_origint   detector_distancet   unit_cell_a_axist   unit_cell_b_axist   unit_cell_c_axist   sigma_divergencet   sigma_mosaicityt   templatet   detector_typet   minpkt   cutt   variance_modelt   iotbx.reflection_file_readerR   t	   file_typet   AssertionErrort   as_miller_arrayst   lent   typet   numbert   file_content(   R   R   R   t   libtbxt	   iotbx_dirt   et   filenamet   handleR   t   file_int   miller_arrayst   content(    (    sO   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/xds/tests/tst_integrate_hkl.pyt   run   sZ    +(   t   __name__t
   __module__R   R=   (    (    (    sO   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/xds/tests/tst_integrate_hkl.pyR      s   	t   __main__N(   t
   __future__R    t   objectR   R>   t   testR=   (    (    (    sO   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/xds/tests/tst_integrate_hkl.pyt   <module>   s   9	