Пример #1
0
    def __init__(self, image_file, **kwargs):

        if not self.understand(image_file):
            raise IncorrectFormatError(self, image_file)
        FormatMultiImageLazy.__init__(self, **kwargs)
        FormatStill.__init__(self, image_file, **kwargs)
        Format.__init__(self, image_file, **kwargs)
        self.current_index = None
        self.current_event = None
        self._psana_runs = {
        }  # empty container, to prevent breaking other formats
        if "locator_scope" in kwargs:
            self.params = FormatXTC.params_from_phil(
                master_phil=kwargs["locator_scope"],
                user_phil=image_file,
                strict=True)
        else:
            self.params = FormatXTC.params_from_phil(master_phil=locator_scope,
                                                     user_phil=image_file,
                                                     strict=True)
        assert self.params.mode == "idx", "idx mode should be used for analysis"

        self._ds = FormatXTC._get_datasource(image_file, self.params)
        self.populate_events()
        self.n_images = len(self.times)

        self._cached_psana_detectors = {}
        self._beam_index = None
        self._beam_cache = None
        self._initialized = True
        self._fee = None
Пример #2
0
    def __init__(self, image_file, **kwargs):
        """Initialise the image structure from the given file, including a
        proper model of the experiment."""

        FormatCBFMiniPilatus.__init__(self, image_file, **kwargs)
        FormatStill.__init__(self, image_file, **kwargs)

        return
Пример #3
0
 def __init__(self, image_file, **kwargs):
   from dxtbx import IncorrectFormatError
   if not self.understand(image_file):
     raise IncorrectFormatError(self, image_file)
   FormatMultiImage.__init__(self, **kwargs)
   FormatStill.__init__(self, image_file, **kwargs)
   Format.__init__(self, image_file, **kwargs)
   self._initialized=True
    def __init__(self, image_file, **kwargs):
        '''Initialise the image structure from the given file, including a
    proper model of the experiment.'''

        assert (self.understand(image_file))

        FormatCBFMiniPilatus.__init__(self, image_file, **kwargs)
        FormatStill.__init__(self, image_file, **kwargs)

        return
  def __init__(self, image_file):
    '''Initialise the image structure from the given file, including a
    proper model of the experiment.'''

    assert(self.understand(image_file))

    FormatCBFMiniPilatus.__init__(self, image_file)
    FormatStill.__init__(self, image_file)

    return
Пример #6
0
 def __init__(self, params, run, detector, **kwargs):
     FormatMultiImageLazy.__init__(self, **kwargs)
     FormatStill.__init__(self, None, **kwargs)
     Format.__init__(self, None, **kwargs)
     self.event = None
     self.params = params
     self.params.detector_address = [str(detector.name)]
     self._cached_psana_detectors = {run.run(): detector}
     self._beam_index = None
     self._beam_cache = None
     self._run = run
Пример #7
0
  def __init__(self, image_file, **kwargs):
    '''Initialise the image structure from the given file, including a
    proper model of the experiment.'''

    from dxtbx import IncorrectFormatError
    if not self.understand(image_file):
      raise IncorrectFormatError(self, image_file)

    FormatCBFMiniPilatus.__init__(self, image_file, **kwargs)
    FormatStill.__init__(self, image_file, **kwargs)

    return
Пример #8
0
 def __init__(self, image_file, **kwargs):
     from dxtbx import IncorrectFormatError
     if not self.understand(image_file):
         raise IncorrectFormatError(self, image_file)
     FormatStill.__init__(self, image_file, **kwargs)
     self._handle = h5py.File(image_file, "r")
     # load image components
     self._raw_panels = self._handle["raw"]
     self._is_low_gain = self._handle["gain"][()]
     self._pedestal = self._handle["dark"][()]
     self._mask = self._handle["mask"][()]
     self._low_gain_val = 6.85  # TODO : make this optional
     # load geometry components 
     self._geometry_define()
Пример #9
0
  def __init__(self, image_file, **kwargs):
    from dxtbx import IncorrectFormatError
    if not self.understand(image_file):
      raise IncorrectFormatError(self, image_file)
    FormatMultiImageLazy.__init__(self, **kwargs)
    FormatStill.__init__(self, image_file, **kwargs)
    Format.__init__(self, image_file, **kwargs)
    self.current_index = None
    self.current_event = None

    if 'locator_scope' in kwargs:
      self.params = FormatXTC.params_from_phil(kwargs['locator_scope'],image_file,strict=True)
    else:
      self.params = FormatXTC.params_from_phil(locator_scope,image_file,strict=True)
    assert self.params.mode == 'idx', 'idx mode should be used for analysis'
    self._initialized = True
Пример #10
0
    def __init__(self, image_file, **kwargs):
        from dxtbx import IncorrectFormatError

        if not self.understand(image_file):
            raise IncorrectFormatError(self, image_file)
        FormatMultiImageLazy.__init__(self, **kwargs)
        FormatStill.__init__(self, image_file, **kwargs)
        Format.__init__(self, image_file, **kwargs)
        self.current_index = None
        self.current_event = None
        self._psana_runs = {
        }  ## empty container, to prevent breaking other formats
        if "locator_scope" in kwargs:
            self.params = FormatXTC.params_from_phil(
                master_phil=kwargs["locator_scope"],
                user_phil=image_file,
                strict=True)
        else:
            self.params = FormatXTC.params_from_phil(master_phil=locator_scope,
                                                     user_phil=image_file,
                                                     strict=True)
        assert self.params.mode == "idx", "idx mode should be used for analysis"
        self._initialized = True