Example #1
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)
    Format.__init__(self, image_file, **kwargs)
Example #2
0
  def __init__(self, image_file, **kwargs):
    '''Initialise the image structure from the given file.'''

    Format.__init__(self, image_file, **kwargs)

    assert(self.understand(image_file))
    return
Example #3
0
    def __init__(self, image_file, **kwargs):
        """Initialise the image structure from the given file."""

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

        Format.__init__(self, image_file, **kwargs)
Example #4
0
    def __init__(self, image_file, **kwargs):
        '''Initialise the image structure from the given file.'''

        from dxtbx import IncorrectFormatError
        if not self.understand(image_file):
            raise IncorrectFormatError(self, image_file)
        Format.__init__(self, image_file, **kwargs)
Example #5
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
Example #6
0
  def __init__(self, image_file):
    '''Initialise the image structure from the given file.'''

    Format.__init__(self, image_file)

    assert(self.understand(image_file))
    return
Example #7
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
Example #8
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
Example #9
0
    def __init__(self, image_file, **kwargs):
        if not injected_data:
            raise IncorrectFormatError(self, image_file)

        self.header = {
            "configuration": json.loads(injected_data.get("header2", "")),
            "info": json.loads(injected_data.get("streamfile_2", "")),
        }

        self._goniometer_instance = None
        self._detector_instance = None
        self._beam_instance = None
        self._scan_instance = None

        FormatMultiImage.__init__(self, **kwargs)
        Format.__init__(self, image_file, **kwargs)

        self.setup()
Example #10
0
    def __init__(self, image_file, **kwargs):
        '''
    Initialise the class

    '''
        assert (self.understand(image_file))
        import json
        self.header = json.load(open(image_file))

        self._goniometer_instance = None
        self._detector_instance = None
        self._beam_instance = None
        self._scan_instance = None

        FormatMultiImage.__init__(self, **kwargs)
        Format.__init__(self, image_file, **kwargs)

        self.setup()
        return
  def __init__(self, image_file, **kwargs):
    '''
    Initialise the class

    '''
    assert(self.understand(image_file))
    import json
    self.header = json.load(open(image_file))


    self._goniometer_instance = None
    self._detector_instance = None
    self._beam_instance = None
    self._scan_instance = None

    FormatMultiImage.__init__(self, **kwargs)
    Format.__init__(self, image_file, **kwargs)

    self.setup()
    return
    def __init__(self, image_file, **kwargs):
        '''
    Initialise the class

    '''
        from dxtbx import IncorrectFormatError
        if not self.understand(image_file):
            raise IncorrectFormatError(self, image_file)
        import json
        self.header = json.load(open(image_file))

        self._goniometer_instance = None
        self._detector_instance = None
        self._beam_instance = None
        self._scan_instance = None

        FormatMultiImage.__init__(self, **kwargs)
        Format.__init__(self, image_file, **kwargs)

        self.setup()
        return
Example #13
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
Example #14
0
  def __init__(self, image_file, **kwargs):
    assert(self.understand(image_file))

    Format.__init__(self, image_file, **kwargs)

    return
 def __init__(self, image_file):
   assert(self.understand(image_file))
   FormatMultiImage.__init__(self)
   Format.__init__(self, image_file)
Example #16
0
  def __init__(self, image_file):
    assert(self.understand(image_file))

    Format.__init__(self, image_file)

    return
Example #17
0
 def __init__(self, image_file, **kwargs):
     Format.__init__(self, image_file)
Example #18
0
  def __init__(self, image_file, **kwargs):
    '''Initialise the image structure from the given file.'''

    assert(self.understand(image_file))

    Format.__init__(self, image_file, **kwargs)
Example #19
0
 def __init__(self, image_file, **kwargs):
   assert(self.understand(image_file))
   FormatMultiImage.__init__(self, **kwargs)
   Format.__init__(self, image_file, **kwargs)