ó
˙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
   FormatHDF5t   FormatRawDatac           B   s;   e  Z d    Z e d    Z d   Z d   Z d   Z RS(   c         C   s)   |  j  |  s t  t j |  |  d  S(   N(   t
   understandt   AssertionErrorR   t   __init__(   t   selft
   image_file(    (    sL   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/dxtbx/format/FormatHDF5RawData.pyR      s    c         C   s:   d d  l  } | j |  d  } t |  d k o9 d | k S(   Ni˙˙˙˙t   ri   t   data(   t   h5pyt   Filet   len(   R   R
   t	   h5_handle(    (    sL   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/dxtbx/format/FormatHDF5RawData.pyR   
   s    c         C   s+   d d  l  } | j |  j   d  |  _ d  S(   Ni˙˙˙˙R   (   R
   R   t   get_image_filet
   _h5_handle(   R   R
   (    (    sL   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/dxtbx/format/FormatHDF5RawData.pyt   _start   s    c         C   s@   d d l  m } |  j d } | j | d  d   d  d   f  S(   Ni˙˙˙˙(   t   flexR	   (   t   scitbx.array_familyR   R   t   int(   R   R   R	   (    (    sL   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/dxtbx/format/FormatHDF5RawData.pyt   get_raw_data   s    c         C   s   d S(   Ni   (    (   R   (    (    sL   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/dxtbx/format/FormatHDF5RawData.pyt   get_num_images   s    (   t   __name__t
   __module__R   t   staticmethodR   R   R   R   (    (    (    sL   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/dxtbx/format/FormatHDF5RawData.pyR      s
   			t   __main__Ni   (
   t
   __future__R    t   dxtbx.format.FormatHDF5R   R   R   t   syst   argvt   argR   (    (    (    sL   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/dxtbx/format/FormatHDF5RawData.pyt   <module>   s   