class FormatSMVHamamatsuSPring8BL32XU(FormatSMVHamamatsu):
    @staticmethod
    def understand(image_file):

        size, header = FormatSMVHamamatsu.get_smv_header(image_file)

        wanted_header_items = ['DETECTOR_NAME']

        for header_item in wanted_header_items:
            if not header_item in header:
                return 0

        return header["DETECTOR_NAME"] == "Hamamatsu C10158DK"

    def _start(self):

        FormatSMVHamamatsu._start(self)

    def detectorbase_start(self):
        from iotbx.detectors.hamamatsu import HamamatsuImage
        self.detectorbase = HamamatsuImage(self._image_file)
        self.detectorbase.readHeader()

    def _goniometer(self):
        '''Return a model for a simple single-axis reversed direction goniometer.'''

        return self._goniometer_factory.single_axis_reverse()
class FormatSMVHamamatsuSPring8BL32XU(FormatSMVHamamatsu):

  @staticmethod
  def understand(image_file):

    size, header = FormatSMVHamamatsu.get_smv_header(image_file)

    wanted_header_items = ['DETECTOR_NAME']

    for header_item in wanted_header_items:
      if not header_item in header:
        return 0

    return header["DETECTOR_NAME"] == "Hamamatsu C10158DK"

  def _start(self):

    FormatSMVHamamatsu._start(self)
    from iotbx.detectors.hamamatsu import HamamatsuImage
    self.detectorbase = HamamatsuImage(self._image_file)
    self.detectorbase.readHeader()

  def _goniometer(self):
    '''Return a model for a simple single-axis reversed direction goniometer.'''

    return self._goniometer_factory.single_axis_reverse()
Пример #3
0
class FormatSMVHamamatsu(FormatSMVADSC):
    @staticmethod
    def understand(image_file):

        size, header = FormatSMVHamamatsu.get_smv_header(image_file)

        wanted_header_items = ["DETECTOR_NAME"]
        if any(item not in header for item in wanted_header_items):
            return False

        return "hamamatsu" in header["DETECTOR_NAME"].lower()

    def detectorbase_start(self):
        self.detectorbase = HamamatsuImage(self._image_file)
        self.detectorbase.open_file = self.open_file
        self.detectorbase.readHeader()
Пример #4
0
class FormatSMVHamamatsu(FormatSMVADSC):

  @staticmethod
  def understand(image_file):

    size, header = FormatSMVHamamatsu.get_smv_header(image_file)

    wanted_header_items = ['DETECTOR_NAME']

    for header_item in wanted_header_items:
      if not header_item in header:
        return 0

    return header["DETECTOR_NAME"].lower().find("hamamatsu")>=0

  def _start(self):

    FormatSMVADSC._start(self)
    from iotbx.detectors.hamamatsu import HamamatsuImage
    self.detectorbase = HamamatsuImage(self._image_file)
    self.detectorbase.readHeader()
Пример #5
0
class FormatSMVHamamatsu(FormatSMVADSC):
    @staticmethod
    def understand(image_file):

        size, header = FormatSMVHamamatsu.get_smv_header(image_file)

        wanted_header_items = ['DETECTOR_NAME']

        for header_item in wanted_header_items:
            if not header_item in header:
                return 0

        return header["DETECTOR_NAME"].lower().find("hamamatsu") >= 0

    def _start(self):

        FormatSMVADSC._start(self)

    def detectorbase_start(self):
        from iotbx.detectors.hamamatsu import HamamatsuImage
        self.detectorbase = HamamatsuImage(self._image_file)
        self.detectorbase.open_file = self.open_file
        self.detectorbase.readHeader()
Пример #6
0
  def _start(self):

    FormatSMVADSC._start(self)
    from iotbx.detectors.hamamatsu import HamamatsuImage
    self.detectorbase = HamamatsuImage(self._image_file)
    self.detectorbase.readHeader()
Пример #7
0
    def detectorbase_start(self):
        from iotbx.detectors.hamamatsu import HamamatsuImage

        self.detectorbase = HamamatsuImage(self._image_file)
        self.detectorbase.open_file = self.open_file
        self.detectorbase.readHeader()
Пример #8
0
 def detectorbase_start(self):
     self.detectorbase = HamamatsuImage(self._image_file)
     self.detectorbase.open_file = self.open_file
     self.detectorbase.readHeader()