ó
.™xTc           @   sš   d  d l  m Z d  d l m Z d  d l m Z d  d l m Z d  d l m	 Z	 d  d l m
 Z
 d  d l m Z d  d l m Z d	 e f d
 „  ƒ  YZ d S(   iÿÿÿÿ(   t   division(   t   managed_calculation_base(   t   global_counters(   t   ext(   t   miller(   t   maptbx(   t   user_plus_sys_time(   t   introspectiont   from_scatterers_fftc           B   s   e  Z d  d „ Z d „  Z RS(   t   fftc         C   sf  t  ƒ  } t j |  | | | d d ƒ| j ƒ  | j ƒ  d k sG t ‚ | j ƒ  t  ƒ  } t j d | j ƒ  d | j	 ƒ  d | j
 ƒ  d | j ƒ  j ƒ  d	 | j ƒ  j ƒ  d
 | j ƒ  d | j ƒ  d | j ƒ  d | j ƒ  d | j ƒ  d | j ƒ  ƒ } | j ƒ  } t  ƒ  } | j ƒ  s;| j ƒ  j | j ƒ  ƒ }	 t }
 n! | j ƒ  j | j ƒ  ƒ }	 t }
 | j ƒ  } t  ƒ  } t j j d | j  ƒ  d | j ƒ  d | j! ƒ  d |	 d |
 ƒ j" ƒ  |  _# | j ƒ  } t  ƒ  } | j$ | j! ƒ  |  j# ƒ | j ƒ  } t% j& ƒ  j' ƒ  | j( j) d | j	 ƒ  j* ƒ  d | j! ƒ  j* ƒ  d | d | d | d | ƒ t+ j, j- | j ƒ  ƒ d  S(   Nt	   algorithmR	   i   g�íµ ÷Æ°>t	   unit_cellt
   scattererst   scattering_type_registryt
   fft_n_realt
   fft_m_realt   u_baset   wing_cutofft   exp_table_one_over_step_sizet   force_complext    sampled_density_must_be_positivet   tolerance_positive_definitet   space_groupt   anomalous_flagt   miller_indicest   complex_mapt   conjugate_flagt   n_scattererst   n_miller_indicest   time_samplingt   time_fftt   time_from_or_to_mapt   time_apply_u_extragé!çýÿï?(.   R   R   t   __init__t   d_mint   AssertionErrort	   setup_fftR   t   sampled_model_densityR   R   R   t   rfftt   n_realt   m_realR   R   R   R   R   R   t   elapsedR   t   forwardt   real_mapt   Truet   cfftt   backwardR   t   FalseR   t   structure_factorst   from_mapR   t   indicest   datat   _f_calc_datat   eliminate_u_extra_and_normalizeR   t   virtual_memory_infot
   update_maxt   estimate_time_fftt   registert   sizeR   R   t   process(   t   selft   managert   xray_structuret
   miller_setR
   t   time_allR   t   sampled_densityR   t   sf_mapt   collect_conjt   time_from_mapR    (    (    s^   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/xray/structure_factors/from_scatterers_fft.pyR!      s`    		"
							
c         C   s   t  j |  j ƒ  |  j ƒ S(   N(   R   t   arrayR?   R4   (   R<   (    (    s^   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/xray/structure_factors/from_scatterers_fft.pyt   f_calcC   s    (   t   __name__t
   __module__R!   RF   (    (    (    s^   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/xray/structure_factors/from_scatterers_fft.pyR   
   s   4N(   t
   __future__R    t$   cctbx.xray.structure_factors.managerR   t   cctbx.xray.structure_factorsR   t
   cctbx.xrayR   t   cctbxR   R   t   libtbx.utilsR   t   libtbxR   R   (    (    (    s^   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/xray/structure_factors/from_scatterers_fft.pyt   <module>   s   