ó
‚™xTc           @   s‡   d  d l  m Z d  d l m Z m Z d  d l m Z d  d l Z d  d l Z d Z	 e j
 d „ Z e d k rƒ e e j d ƒ n  d S(	   iÿÿÿÿ(   t   division(   t   Sorryt   Usage(   t   AutoNsT  
file_name = None
  .type = path
  .short_caption = MTZ file
  .style = file_type:hkl
data_labels = None
  .type = str
  .short_caption = Data labels
  .style = None
phase_labels = None
  .type = str
weight_labels = None
  .type = str
map_type = *Fo anom
  .type = choice
use_weights = Auto
  .type = bool
output_file = None
  .type = path
c         C   sá  d d l  m } d d  l } t |  ƒ d k r_ t d | j j t ƒ j d d d d ƒ ƒ ‚ n  | j j	 d	 |  d
 t d d ƒ } | j
 j ƒ  } | j d  k r­ t d ƒ ‚ n  | j | j ƒ j d ƒ } | j } | j d | j d | j d t d d d d d t d t ƒ } | j ƒ  j ƒ  }	 | j ƒ  rPd d l m }
 |
 | d | ƒ} n  | j d | j d | j d t d d  d d d d d d ƒ } | j ƒ  sŸt ‚ t } d  } | j t  t g k r,xi | j! D][ } | j" ƒ  rÊ| j ƒ  j ƒ  } | | j# k s| j# d  k r%d | k r%| } Pq%qÊqÊWn  | } | j$ d k ry| j ƒ  s\t d  ƒ ‚ n  | j% ƒ  } | d! |	 IJn) | d" |	 IJ| j ƒ  r¢| j& ƒ  } n  | j t  k rÛ| d  k	 rÛ| j$ d k rt | _ qn* | j t k r| d  k rt d# ƒ ‚ n  | j t k r~| j ƒ  s't ‚ | d$ | j ƒ  j ƒ  IJ| j' d% | ƒ \ } } | j( d& | j) ƒ  | j) ƒ  ƒ } n  | j( d' d  ƒ } | d( | j ƒ  j ƒ  IJ| j' | ƒ \ } } | j* | d) | ƒj+ d  ƒ } | j$ d k r| j( d& | j) ƒ  d* ƒ } n  | j, ƒ  st ‚ d+ } d  } | j$ d k rAd, } n' | j t k rhd- } | j- j. ƒ  } n  d d  l/ } | j0 d. | d/ | ƒ } | j1 d  k r§d0 | _1 n  | j2 ƒ  j3 | j1 ƒ | d1 | j1 IJt4 j5 j6 | j1 ƒ S(2   Niÿÿÿÿ(   t   file_readeri    sL   iotbx.simple_map_coefficients data_phases.mtz [options]

Full parameters:
%st   attributes_leveli   t   prefixt    t   argst   master_phil_stringt   reflection_file_deft	   file_names   No reflection file specified.t   hklt   labelst   ignore_all_zerost   parameter_namet   data_labelst   parameter_scopet    t   prefer_anomaloust   prefer_amplitudes(   t   french_wilson_scalet   logt   convert_to_phases_if_necessaryt   original_phase_unitst   phase_labelst   minimum_scorei   t   FOMt   anoms6   Anomalous map requested, but selected data are merged.s!   Using anomalous differences in %ss   Using amplitudes in %ss+   No weights (FOM, etc.) found in input file.s   Applying weights in %st   othert   datat   sigmass   Applying phases in %st   degy               @t   Ft   ANOMt   FWTt   column_root_labelt   label_decorators   map_coeffs.mtzs   Wrote %s(7   t   iotbxR   t
   iotbx.philt   lenR   t   philt   parset   master_philt   as_strt   process_command_line_with_filest   workt   extractR   t   NoneR   t   any_filet   check_file_typet   file_servert   get_xray_dataR   t   Falset   Truet   infot   label_stringt   is_xray_intensity_arrayt   cctbx.french_wilsonR   t   get_phases_degR   t   anomalous_flagt   AssertionErrort   use_weightsR   t   miller_arrayst   is_real_arrayt   weight_labelst   map_typet   anomalous_differencest   average_bijvoet_matest   common_setst   customized_copyR   t   phase_transfert   set_observation_typet   is_complex_arrayt   mtzt   ccp4_label_decoratort	   iotbx.mtzt   as_mtz_datasett   output_filet
   mtz_objectt   writet   ost   patht   abspath(   R   t   outR   R&   t   cmdlinet   paramst   hkl_int
   hkl_serverR   R   R   t   phasesR    t   weightst   arrayR8   t
   amplitudest   coeffsR$   t	   decoratort   mtz_dataset(    (    sX   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/command_line/simple_map_coefficients.pyt   run   s²    .														t   __main__i   (   t
   __future__R    t   libtbx.utilsR   R   t   libtbxR   RQ   t   sysR+   t   stdoutR`   t   __name__t   argv(    (    (    sX   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/command_line/simple_map_coefficients.pyt   <module>   s   `