Ejemplo n.º 1
0
    def __init__(self, image_file, **kwargs):
        assert self.understand(image_file)
        FormatXTC.__init__(self,
                           image_file,
                           locator_scope=multiple_locator_scope,
                           **kwargs)
        self._ds = FormatXTCMultipleDetectors._get_datasource(
            image_file, self.params)
        self._env = self._ds.env()
        self.populate_events()
        self.n_images = len(self.times)

        if any(
            ["rayonix" in src.lower()
             for src in self.params.detector_address]):
            FormatXTCRayonix.__init__(self, image_file, **kwargs)
        if any(
            ["cspad" in src.lower() for src in self.params.detector_address]):
            FormatXTCCspad.__init__(self, image_file, **kwargs)
        if any([
                "jungfrau" in src.lower()
                for src in self.params.detector_address
        ]):
            FormatXTCJungfrau.__init__(self, image_file, **kwargs)
        FormatXTC.__init__(self,
                           image_file,
                           locator_scope=multiple_locator_scope,
                           **kwargs)
Ejemplo n.º 2
0
    def __init__(self, image_file, **kwargs):
        assert (self.understand(image_file))
        FormatXTCCspad.__init__(self,
                                image_file,
                                locator_scope=d9114_locator_scope,
                                **kwargs)

        self._ds = FormatXTC._get_datasource(image_file, self.params)
        self.run_number = self.params.run[0]
        self.cspad = psana.Detector(self.params.detector_address[0])
        self.dark = self.cspad.pedestals(self.run_number).astype(np.float64)
        self.gain = self.cspad.gain_mask(self.run_number) == 1.
        if CSPAD_MASK is not None:
            self.cspad_mask = CSPAD_MASK
        else:
            self.cspad_mask = np.ones_like(self.gain)
        self.nominal_gain_val = self.cspad._gain_mask_factor
        self.populate_events()
        self.n_images = len(self.times)
        self.params = FormatXTCD9114.get_params(image_file)
        self._set_pppg_args()
        self._set_psf()
        self._set_2d_img_info()
        self.detector_distance = env_distance(self.params.detector_address[0],
                                              self._ds.env(),
                                              self.params.cspad.detz_offset)
Ejemplo n.º 3
0
 def __init__(self, image_file, **kwargs):
     if any(["rayonix" in src.lower() for src in self.params.detector_address]):
         FormatXTCRayonix.__init__(self, image_file, **kwargs)
     if any(["cspad" in src.lower() for src in self.params.detector_address]):
         FormatXTCCspad.__init__(self, image_file, **kwargs)
     if any(["jungfrau" in src.lower() for src in self.params.detector_address]):
         FormatXTCJungfrau.__init__(self, image_file, **kwargs)
     FormatXTC.__init__(
         self, image_file, locator_scope=multiple_locator_scope, **kwargs
     )
Ejemplo n.º 4
0
  def __init__(self, image_file, **kwargs):
    assert(self.understand(image_file))
    FormatXTC.__init__(self, image_file, locator_scope = multiple_locator_scope, **kwargs)
    self._ds = self._get_datasource(image_file)
    self._env = self._ds.env()
    self.populate_events()
    self.n_images = len(self.times)

    if any(['rayonix' in src.lower() for src in FormatXTC._src]):
      FormatXTCRayonix.__init__(self, image_file, **kwargs)
    if any(['cspad' in src.lower() for src in FormatXTC._src]):
      FormatXTCCspad.__init__(self, image_file, **kwargs)
    if any(['jungfrau' in src.lower() for src in FormatXTC._src]):
      FormatXTCJungfrau.__init__(self, image_file, **kwargs)
    FormatXTC.__init__(self, image_file, locator_scope = multiple_locator_scope, **kwargs)