ó
 šxTc           @   s{   d  d l  m Z d  d l m Z d e f d „  ƒ  YZ e d k rw d  d l Z x& e j d D] Z e j	 e ƒ GHq\ Wn  d S(   iÿÿÿÿ(   t   division(   t   FormatSMVADSCt   FormatSMVADSCmlfsomc           B   s/   e  Z d  Z e d „  ƒ Z d „  Z d „  Z RS(   sO   A class for reading SMV::ADSC-format images generated by MLFSOM
    simulation.c         C   sF   t  j |  ƒ \ } } d d g } x | D] } | | k r( t Sq( Wt S(   Nt   TIMEt   DATE(   R   t   get_smv_headert   Falset   True(   t
   image_filet   sizet   headert   unwanted_header_itemst   header_item(    (    sN   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/dxtbx/format/FormatSMVADSCmlfsom.pyt
   understand	   s    c         C   s)   |  j  | ƒ s t ‚ t j |  | ƒ d S(   sc   Initialise the image structure from the given file, including a
    proper model of the experiment.N(   R   t   AssertionErrorR   t   __init__(   t   selfR   (    (    sN   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/dxtbx/format/FormatSMVADSCmlfsom.pyR      s    c         C   sf   |  j  j d ƒ } d } d } t |  j d ƒ } t |  j d ƒ } |  j  j |  j | | | | | ƒ S(   s+   Return the scan information for this image.t   SMVg      ð?t	   OSC_STARTt	   OSC_RANGEN(   t   _scan_factoryt   formatt   Nonet   floatt   _header_dictionaryt   singlet   _image_file(   R   R   t   exposure_timet   epocht	   osc_startt	   osc_range(    (    sN   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/dxtbx/format/FormatSMVADSCmlfsom.pyt   _scan   s    	(   t   __name__t
   __module__t   __doc__t   staticmethodR   R   R   (    (    (    sN   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/dxtbx/format/FormatSMVADSCmlfsom.pyR      s   	t   __main__Ni   (
   t
   __future__R    t   dxtbx.format.FormatSMVADSCR   R   R    t   syst   argvt   argR   (    (    (    sN   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/dxtbx/format/FormatSMVADSCmlfsom.pyt   <module>   s   (