ó
yxTc           @   sJ   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   flex(   t   DetectorImageBaset   GenericDetectorc           B   s2   e  Z d  Z d   Z d   Z d   Z d   Z RS(   sÅ   Generic image data, for example from electron crystallography. User
     should supply their own data here, and use the
     phenix.example_viewer command in rstbx/command_line/example_viewer.py
  c         C   sC   | |  _  d |  _ d |  _ d |  _ d |  _ d |  _ d |  _ d  S(   NiČ   iś   g¹?t   npy_rawg      $@g      )@(   t   filenamet   size2t   size1t
   pixel_sizet
   vendortypet   beamxt   beamy(   t   selfR   (    (    sN   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/detectors/generic_detector.pyt   __init__
   s    						c         C   s(   d |  _  d |  _ d |  _ d |  _ d  S(   Ng      Y@g        g      š?i’   (   t   distancet   twothetat
   wavelengtht
   saturation(   R   (    (    sN   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/detectors/generic_detector.pyt
   readHeader   s
    				c         C   s   d S(   Ns#   Generic detector with nothing in it(    (   R   (    (    sN   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/detectors/generic_detector.pyt   show_header   s    c         C   sO   d t  j |  j |  j  } | j t  j |  j |  j   | j   |  _ d  S(   Ni   (   R   t   random_doubleR   R   t   reshapet   gridt   iroundt   linearintdata(   R   t   rawdata(    (    sN   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/detectors/generic_detector.pyt   read   s    (   t   __name__t
   __module__t   __doc__R   R   R   R   (    (    (    sN   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/detectors/generic_detector.pyR      s
   	
		N(   t
   __future__R    t   scitbx.array_familyR   t   iotbx.detectors.detectorbaseR   R   (    (    (    sN   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/detectors/generic_detector.pyt   <module>   s   