Exemplo n.º 1
0
 def understand(image_file):
     try:
         params = FormatXTC.params_from_phil(cspad_locator_scope,
                                             image_file)
     except Exception:
         return False
     return any("cspad" in src.lower() for src in params.detector_address)
Exemplo n.º 2
0
 def understand(image_file):
     try:
         params = FormatXTC.params_from_phil(jungfrau_locator_scope, image_file)
         if params.jungfrau.monolithic:
             return True
         return False
     except Exception:
         return False
Exemplo n.º 3
0
 def understand(image_file):
     try:
         params = FormatXTC.params_from_phil(cspad_locator_scope,
                                             image_file)
     except Exception:
         return False
     ds = FormatXTC._get_datasource(image_file, params)
     return any(['cspad' in src.lower() for src in params.detector_address])
Exemplo n.º 4
0
    def understand(image_file):
        try:
            params = FormatXTC.params_from_phil(multiple_locator_scope,
                                                image_file)
        except Exception:
            return False

        if params.detector_address is None or len(
                params.detector_address) <= 1:
            return False
        return [
            "rayonix" in src.lower() or "cspad" in src.lower()
            or "jungfrau" in src.lower() for src in params.detector_address
        ].count(True) >= 2
Exemplo n.º 5
0
    def understand(image_file):
        try:
            params = FormatXTC.params_from_phil(multiple_locator_scope,
                                                image_file)
        except Exception:
            return False
        ds = FormatXTC._get_datasource(image_file, params)

        if params.detector_address is None or len(
                params.detector_address) <= 1:
            return False
        return [
            'rayonix' in src.lower() or 'cspad' in src.lower()
            or 'jungfrau' in src.lower() for src in params.detector_address
        ].count(True) >= 2