def __init__(self, image_file, **kwargs):
    '''Initialise the image structure from the given file, including a
    proper model of the experiment.'''

    from dxtbx import IncorrectFormatError
    if not self.understand(image_file):
      raise IncorrectFormatError(self, image_file)

    FormatCBFMiniEiger.__init__(self, image_file, **kwargs)

    self._raw_data = None
    return
Пример #2
0
    def understand(image_file):
        """Check to see if this format class can understand the image file.

        Args:
          image_file (str): The file path of the image file to check.

        Returns:
          bool: Returns ``True`` if the image_file is understood by this format class,
          else returns ``False``.

        """

        # this depends on DIALS for the goniometer shadow model; if missing
        # simply return False

        header = FormatCBFMiniEiger.get_cbf_header(image_file)

        for record in header.split("\n"):
            if (
                "# detector" in record.lower()
                and "eiger" in record.lower()
                and "S/N 160-0001" in header
            ):
                return True

        return False
    def understand(image_file):
        '''Check to see if this looks like an Eiger mini CBF format image,
    i.e. we can make sense of it.'''

        header = FormatCBFMiniEiger.get_cbf_header(image_file)

        for record in header.split('\n'):
            if 'Detector: Dectris Eiger 16M, S/N E-32-0105' in record:
                return True

        return False
  def understand(image_file):
    '''Check to see if this looks like an Eiger mini CBF format image,
    i.e. we can make sense of it.'''

    header = FormatCBFMiniEiger.get_cbf_header(image_file)

    for record in header.split('\n'):
      if '# detector' in record.lower() and \
             'eiger' in record.lower() and 'E-32-0107' in record:
        return True

    return False
Пример #5
0
    def understand(image_file):
        """Check to see if this looks like an Eiger mini CBF format image,
        i.e. we can make sense of it."""

        header = FormatCBFMiniEiger.get_cbf_header(image_file)

        for record in header.split("\n"):
            if ("# detector" in record.lower() and "eiger" in record.lower()
                    and "E-32-0107" in record):
                return True

        return False