Пример #1
0
 def __init__(self, image_file, **kwargs):
   assert(self.understand(image_file))
   FormatXTC.__init__(self, image_file, locator_scope = rayonix_locator_scope, **kwargs)
   self._ds = self._get_datasource(image_file)
   self._env = self._ds.env()
   self.populate_events()
   self.n_images = len(self.times)
Пример #2
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)
Пример #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
     )
Пример #4
0
 def __init__(self, image_file, **kwargs):
     assert self.understand(image_file)
     FormatXTC.__init__(
         self, image_file, locator_scope=jungfrau_locator_scope, **kwargs
     )
     self._ds = FormatXTC._get_datasource(image_file, self.params)
     self._env = self._ds.env()
     self.populate_events()
     self.n_images = len(self.times)
     self._cached_detector = {}
     self._cached_psana_detectors = {}
Пример #5
0
 def __init__(self, image_file, **kwargs):
     assert (self.understand(image_file))
     FormatXTC.__init__(self,
                        image_file,
                        locator_scope=cspad_locator_scope,
                        **kwargs)
     assert self.params.cspad.detz_offset is not None, "Supply a detz_offset for the cspad"
     self._ds = FormatXTCCspad._get_datasource(image_file, self.params)
     self._env = self._ds.env()
     self.populate_events()
     self.n_images = len(self.times)
Пример #6
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)
Пример #7
0
 def __init__(self,
              image_file,
              locator_scope=cspad_locator_scope,
              **kwargs):
     assert self.understand(image_file)
     FormatXTC.__init__(self,
                        image_file,
                        locator_scope=locator_scope,
                        **kwargs)
     assert (self.params.cspad.detz_offset
             is not None), "Supply a detz_offset for the cspad"
     self._ds = FormatXTC._get_datasource(image_file, self.params)
     self._psana_runs = FormatXTC._get_psana_runs(self._ds)
     self._cache_psana_det()  # NOTE: move to base FormatXTC class
     self._cache_psana_pedestals()  # NOTE: move to base FormatXTC class
     self._cache_psana_gain()
     self.populate_events()
     self.n_images = len(self.times)
    def __init__(self, image_file, **kwargs):
        import psana

        assert (self.understand(image_file))
        FormatXTC.__init__(self,
                           image_file,
                           locator_scope=rayonix_locator_scope,
                           **kwargs)
        self._ds = FormatXTCRayonix._get_datasource(image_file, self.params)
        self._env = self._ds.env()
        self.populate_events()
        self.n_images = len(self.times)

        cfgs = self._ds.env().configStore()
        rayonix_cfg = cfgs.get(psana.Rayonix.ConfigV2, psana.Source('Rayonix'))
        if self.params.rayonix.bin_size is None:
            assert rayonix_cfg.binning_f() == rayonix_cfg.binning_s()
            self._bin_size = rayonix_cfg.binning_f()
        else:
            self._bin_size = self.params.rayonix.bin_size
        self._pixel_size = rayonix_tbx.get_rayonix_pixel_size(self._bin_size)
        self._image_size = rayonix_cfg.width(), rayonix_cfg.height()
Пример #9
0
 def __init__(self, image_file, **kwargs):
     assert (self.understand(image_file))
     self._ds = self._get_datasource(image_file)
     self.events_list = []
     self.populate_events()
     FormatXTC.__init__(self, image_file, **kwargs)