ó
w™xTc           @   s  d  d l  m Z d  d l Z d  d l m Z d  d l m Z d e f d „  ƒ  YZ e d k rd  d l	 Z	 e
 e	 j ƒ d k  r‚ n e	 j d	 Z e e ƒ Z d
 Ge j Ge j GHd Ge j GHd Ge j Gd Ge j GHd Ge j GHd Ge j GHd Ge j GHd Ge j GHd Ge j GHn  d S(   iÿÿÿÿ(   t   divisionN(   t   Bruker_base(   t   DetectorImageBaset   BrukerImagec           B   s#   e  Z d  „  Z d „  Z d „  Z RS(   c         C   sN   | |  _  t | ƒ |  _ d |  _ |  j |  j j ƒ  ƒ d |  _ |  j ƒ  d  S(   Ni   s   Bruker Proteus CCD(   t   filenameR   t   brukert   bint   bin_safe_set_datat   linearintdatat
   vendortypet
   readHeader(   t   selfR   (    (    sD   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/detectors/bruker.pyt   __init__   s    			c         C   så   i |  j  j d 6d d 6d d 6|  j  j d 6|  j  j d 6d |  j  j |  j  j d 6|  j  j d	 6|  j  j |  j  j d |  j  j t j	 t j
 |  j  j d
 ƒ d 6|  j  j |  j  j d 6|  j  j d 6|  j  j d 6d d 6|  _ d  S(   Nt   CCD_IMAGE_SATURATIONi   t   SIZE1t   SIZE2t
   PIXEL_SIZEt	   OSC_STARTg      $@t   DISTANCEt
   WAVELENGTHg     €f@t   BEAM_CENTER_Xt   BEAM_CENTER_Yt	   OSC_RANGEt   TWOTHETAi    t   DETECTOR_SN(   R   t   ccd_image_saturationt
   pixel_sizet	   osc_startt   distance_cmt   distance_deltat
   wavelengtht   centerx_pixt   matht   tant   pit   twothetat   centery_pixt	   osc_ranget
   parameters(   R   (    (    sD   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/detectors/bruker.pyR
      s    #c         C   s   d  S(   N(    (   R   (    (    sD   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/detectors/bruker.pyt   read&   s    (   t   __name__t
   __module__R   R
   R'   (    (    (    sD   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/detectors/bruker.pyR      s   		t   __main__i   i   s   B.vendortype,B.saturations
   pixel sizes	   osc startt   distanceR   t   beamxt   beamyt   deltaphiR#   (   t
   __future__R    R    t   iotbx.detectorsR   t   iotbx.detectors.detectorbaseR   R   R(   t   syst   lent   argvt   filet   BR	   t
   saturationR   R   R+   R   R,   R-   R.   R#   (    (    (    sD   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/detectors/bruker.pyt   <module>   s&   #