def understand(image_file):
        """Check to see if this looks like a Rigaku Saturn SMV format image,
        i.e. we can make sense of it. Essentially that will be if it contains
        all of the keys we are looking for. Also checks the serial number."""

        size, header = FormatSMVRigakuSaturn.get_smv_header(image_file)

        # FIXME if they fix this "bug" in the header sometime then may need
        # to add in an extra check that the data were recorded before this
        # event.

        detector_prefix = header["DETECTOR_NAMES"].split()[0].strip()
        serial_number = header.get("%sSERIAL_NUMBER" % detector_prefix)

        return serial_number == "11480296"
    def understand(image_file):
        """Check to see if this looks like a Rigaku Saturn SMV format image,
    i.e. we can make sense of it. Essentially that will be if it contains
    all of the keys we are looking for. Also checks the serial number."""

        size, header = FormatSMVRigakuSaturn.get_smv_header(image_file)

        detector_prefix = header["DETECTOR_NAMES"].split()[0].strip()
        try:
            serial_number = header["%sSERIAL_NUMBER" % detector_prefix]
        except KeyError:
            return False

        if serial_number != "09040159":
            return False

        return True
  def understand(image_file):
    '''Check to see if this looks like a Rigaku Saturn SMV format image,
    i.e. we can make sense of it. Essentially that will be if it contains
    all of the keys we are looking for. Also checks the serial number.'''

    size, header = FormatSMVRigakuSaturn.get_smv_header(image_file)

    # FIXME if they fix this "bug" in the header sometime then may need
    # to add in an extra check that the data were recorded before this
    # event.

    detector_prefix = header['DETECTOR_NAMES'].split()[0].strip()
    try:
      serial_number = header['%sSERIAL_NUMBER' % detector_prefix]
    except KeyError:
      return False

    if serial_number != '07400090':
      return False

    return True