ó
_xTc           @   s   d  d l  m Z d  d l Z d  d l m Z d  d l Z d  d l m Z d   Z	 d   Z
 e d k r| e	   e
   d GHn  d S(	   i˙˙˙˙(   t   divisionN(   t   flex(   t   approx_equalc          C   sÀ   t  j   }  t  j   } xP t d d  D]? } | d } |  j |  | j d t j d | d   q( Wt j j d |  d |  } t | j	 d d	  sĦ t
  t | j d
 d	  sĵ t
  d  S(   Ni    i
   g      $@g       @g      Ài   t   xt   ygíµ ÷Ĉ°>g      @(   R   t   doublet   xranget   appendt   matht   expt   scitbxt   gaussian_fit_1d_analyticalR   t   at   AssertionErrort   b(   R   R   t   x_t   r(    (    s^   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/scitbx/math/tests/tst_gaussian_fit_1d_analytical.pyt
   exercise_1   s    
&c          C   sà   t  j   }  t  j   } x$ t d d  D] } |  j |  q( Wx$ t d d  D] } | j |  qO W| d t  j d |  |   } t j j d |  d | d |  } t | j	 d	 d
  sÁ t
  t | j d d
  sÜ t
  d  S(   Ni   i   i   i   g      ÀR   R   t   zg       @gíµ ÷Ĉ°>g      @(   R   R   R   R   R	   R
   R   R   R   R   R   R   (   R   R   t   iR   R   (    (    s^   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/scitbx/math/tests/tst_gaussian_fit_1d_analytical.pyt
   exercise_2   s    !t   __main__t   OK(   t
   __future__R    t   scitbx.mathR
   t   scitbx.array_familyR   R   t   libtbx.test_utilsR   R   R   t   __name__(    (    (    s^   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/scitbx/math/tests/tst_gaussian_fit_1d_analytical.pyt   <module>   s   		