示例#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)
示例#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
示例#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)
示例#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)
示例#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
示例#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
示例#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
示例#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
示例#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()
示例#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
示例#11
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
示例#12
0
    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
示例#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
示例#14
0
  def __init__(self, image_file, **kwargs):
    assert(self.understand(image_file))

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

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

    Format.__init__(self, image_file)

    return
示例#17
0
 def __init__(self, image_file, **kwargs):
     Format.__init__(self, image_file)
示例#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)
示例#19
0
 def __init__(self, image_file, **kwargs):
   assert(self.understand(image_file))
   FormatMultiImage.__init__(self, **kwargs)
   Format.__init__(self, image_file, **kwargs)