ó
ú™xTc           @   sÎ   d  d l  m Z d  d l m Z d  d l m Z d  d l m Z d  d l m Z d  d l m	 Z	 d  d l m
 Z
 d e e f d	 „  ƒ  YZ e d
 k rÊ d  d l Z x& e j d D] Z e j e ƒ GHq¯ Wn  d S(   iÿÿÿÿ(   t   division(   t   Format(   t   FormatMultiImage(   t   Beam(   t   Detector(   t
   Goniometer(   t   Scant
   FormatHDF5c           B   s    e  Z d  „  Z e d „  ƒ Z RS(   c         C   s6   |  j  | ƒ s t ‚ t j |  ƒ t j |  | ƒ d  S(   N(   t
   understandt   AssertionErrorR   t   __init__R   (   t   selft
   image_file(    (    sE   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/dxtbx/format/FormatHDF5.pyR
      s    c         C   s@   y t  j |  d ƒ j d ƒ } Wn t k
 r5 } t SX| d k S(   Nt   rbi   s   ‰HDF

(   R   t	   open_filet   readt   IOErrort   False(   R   t   tagt   e(    (    sE   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/dxtbx/format/FormatHDF5.pyR      s
    (   t   __name__t
   __module__R
   t   staticmethodR   (    (    (    sE   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/dxtbx/format/FormatHDF5.pyR   	   s   	t   __main__Ni   (   t
   __future__R    t   dxtbx.format.FormatR   t   dxtbx.format.FormatMultiImageR   t   dxtbx.modelR   R   R   R   R   R   t   syst   argvt   argR   (    (    (    sE   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/dxtbx/format/FormatHDF5.pyt   <module>   s   