ó
©™xTc        	   @   s  d  d l  m Z d  d l m Z d  d l Z d  d l m Z d  d l m Z d  d l	 m
 Z
 d  d l Z d  d l Z d  d l m Z d  d l m Z d  d l m Z e j d	 ƒ e j d
 d	 ƒ d d d d	 d	 d	 d	 d	 d	 g e d d d „ Z d „  Z d „  Z e d k re ƒ  n  d S(   iÿÿÿÿ(   t   division(   t   flexN(   t   random_structure(   t   debug_utils(   t   sgtbx(   t   outlier_rejection(   t   observation_typesi    t   valueg      @g333333Ó?g      N@t   it1992c         C   sÏ  t  | ƒ g } x¹| D]±} t j d t j | ƒ d d- d d d d	 d
 d t d t ƒ }	 |	 j d | ƒ x[d d d g D]J}
 t |	 j d |  d | ƒ j	 ƒ  ƒ } | j
 d d d d ƒ } t j j d |	 d | d d d | d | d | d | ƒ } | j d |	 d t d  t ƒ t | j ƒ  ƒ } | j d! | j ƒ  |
 ƒ } | j d" t j ƒ  ƒ t j d# | d | d$ d% ƒ } | j ƒ  } | j ƒ  } | j ƒ  } x*d& d' g D]} xd& d( g D]} |	 j ƒ  } | j d | ƒ } | j | ƒ } | j d) | ƒ | j d | ƒ x¯ d( g D]¤ } x› d* g D]� } t j j d | d | d d d | d | d | d | ƒ } | j ƒ  \ } } | j d+ | j ƒ  ƒ } | j ƒ  j t  ƒ } | d, k  s#t! ‚ q#WqWq¶Wq£Wqy Wq Wd  S(.   Nt   space_group_infot   elementst   Ot   Ct   Ni2   t   volume_per_atomid   t   min_distanceg      ø?t   general_positions_onlyt   random_u_isot   tableg-Cëâ6?g      ð?g     @�@t   d_mint   anomalous_flagt   fractiongš™™™™™¹?t   max_freeiÿàõt   xray_structuret   r_free_flagst   target_namet   ls_wunit_k1t   f_obst   k_solt   b_solt   b_cartt   update_f_calct   update_f_maskt   datat   observation_typet
   miller_obst   outt   silentg        gš™™™™™é?g      à?t   rms_differenceg      N@t   f_modeli   (   R   R   R   ("   t   strR   R   R   R	   t   Truet   scattering_type_registryt   abst   structure_factorst   f_calct   generate_r_free_flagst   mmtbxR'   t   managert   update_xray_structuret   arrayR!   t   set_observation_typeR   t	   amplitudeR   t   outlier_managert   basic_wilson_outlierst   extreme_wilson_outlierst   beamstop_shadow_outlierst   deep_copy_scattererst   random_remove_sites_selectiont   selectt   shake_sites_in_placet
   alpha_betat   model_based_outlierst   countt   Falset   AssertionError(   R   R   R   R   R   t   scattering_tableR	   t   space_groupst   sgR   t   scalet   dummyt   flagst   fmodelR   t   omt   tmp1t   tmp2t   tmp3t   errorR   t   xrs_dct   selt   at   bt   o_selt   n_out(    (    sQ   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/mmtbx/scaling/thorough_outlier_test.pyt   exercise   sp    	
					c         C   s   t  d | ƒ d  S(   NR	   (   RT   (   RG   R	   (    (    sQ   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/mmtbx/scaling/thorough_outlier_test.pyt   run_call_backW   s    c           C   s   t  j t j d t ƒ d  S(   Ni   (   R   t   parse_options_loop_space_groupst   syst   argvRU   (    (    (    sQ   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/mmtbx/scaling/thorough_outlier_test.pyt   runZ   s    t   __main__(   t
   __future__R    t   cctbx.array_familyR   t   mmtbx.f_modelR/   t   cctbx.developmentR   R   t   cctbxR   t   randomRW   t   mmtbx.scalingR   t
   cctbx.xrayR   t   seedt   set_random_seedR@   t   NoneRT   RU   RY   t   __name__(    (    (    sQ   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/mmtbx/scaling/thorough_outlier_test.pyt   <module>   s.   @		