Get experiment for the provided experiment key.

    Args:
      experiment_key: Experiment key for which experiment is to be determined.

    Returns:
      Experiment corresponding to the provided experiment key.
355976
def get_experiment_from_key(self, experiment_key):
    

    experiment = self.experiment_key_map.get(experiment_key)

    if experiment:
      return experiment

    self.logger.error('Experiment key "%s" is not in datafile.' % experiment_key)
    self.error_handler.handle_error(exceptions.InvalidExperimentException(enums.Errors.INVALID_EXPERIMENT_KEY_ERROR))
    return None
12618
def get_experiment_summ_ids( self, coinc_event_id ):
		
		experiment_summ_ids = []
		for row in self:
			if row.coinc_event_id == coinc_event_id:
				experiment_summ_ids.append(row.experiment_summ_id)
		if len(experiment_summ_ids) == 0:
			raise ValueError("'%s' could not be found in the experiment_map table" % coinc_event_id)
		return experiment_summ_ids
571071
def get_experiment_kind(root):
    
    properties = {}
    if root.find('experimentType').text == 'Ignition delay measurement':
        properties['experiment-type'] = 'ignition delay'
    else:
        raise NotImplementedError(root.find('experimentType').text + ' not (yet) supported')

    properties['apparatus'] = {'kind': '', 'institution': '', 'facility': ''}
    kind = getattr(root.find('apparatus/kind'), 'text', False)
    # Test for missing attribute or empty string
    if not kind:
        raise MissingElementError('apparatus/kind')
    elif kind in ['shock tube', 'rapid compression machine']:
        properties['apparatus']['kind'] = kind
    else:
        raise NotImplementedError(kind + ' experiment not (yet) supported')

    return properties
616623
def finish_experiment(self, session, exp_id):
        '''
        '''
        self.logger.debug('Finishing %s' %exp_id)
        experiments = session.get('experiments', [])
        experiments = [x for x in experiments if x != exp_id]
        session['experiments'] = experiments
        return experiments
449320
def get(self, key) -> str:
        
        # TODO: get is creating files when a key is given which is more than
        # the store size
        chunk_no, offset = self._get_key_location(key)
        with self._openChunk(chunk_no) as chunk:
            return chunk.get(str(offset))
803835
def get(self, key, default=None):
        
        if hasattr(self.obj, key):
            return getattr(self.obj, key)
        return self.data.get(key, default)
1270415
def accelerator_experiments(self, key, value):
    """"""
    result = []

    a_value = force_single_element(value.get('a'))
    e_values = [el for el in force_list(value.get('e')) if el != '-']
    zero_values = force_list(value.get('0'))

    if a_value and not e_values:
        result.append({'accelerator': a_value})

    # XXX: we zip only when they have the same length, otherwise
    #      we might match a value with the wrong recid.
    if len(e_values) == len(zero_values):
        for e_value, zero_value in zip(e_values, zero_values):
            result.append({
                'legacy_name': e_value,
                'record': get_record_ref(zero_value, 'experiments'),
            })
    else:
        for e_value in e_values:
            result.append({'legacy_name': e_value})

    return result
971727
def get(self, key):
        
        o = self.data[key]()
        if o is None:
            # On CPython, the weakref callback will always(?) run before any
            # other code has a chance to observe that the weakref is broken;
            # and since the callback removes the item from the dict, this
            # branch of code should never run. However, on PyPy (and possibly
            # other Python implementations), the weakref callback does not run
            # immediately, thus we may be able to observe this intermediate
            # state. Should this occur, we remove the dict item ourselves,
            # and raise CacheFault (which is a KeyError subclass).
            del self.data[key]
            raise CacheFault(
                "FinalizingCache has %r but its value is no more." % (key,))
        log.msg(interface=iaxiom.IStatEvent, stat_cache_hits=1, key=key)
        return o
625003
def _get_code(self, key):
        

        data = self.grid.code_array(key)
        self.grid.code_array.result_cache.clear()

        return data
878678
def do_get_session(self, session_key):
        
        session_id = session_key.session_id
        msg = ("do_get_session: Attempting to retrieve session with key " +
               str(session_id))
        logger.debug(msg)

        session = self._retrieve_session(session_key)

        if (session is not None):
            self.validate(session, session_key)

        return session
846507
def _find_experiment_tag(self):
    
    with self._experiment_from_tag_lock:
      if self._experiment_from_tag is None:
        mapping = self.multiplexer.PluginRunToTagToContent(
            metadata.PLUGIN_NAME)
        for tag_to_content in mapping.values():
          if metadata.EXPERIMENT_TAG in tag_to_content:
            self._experiment_from_tag = metadata.parse_experiment_plugin_data(
                tag_to_content[metadata.EXPERIMENT_TAG])
            break
    return self._experiment_from_tag
265467
def get_object_key(self, key, using_name=True):
        
        try:
            if using_name:
                return self.o_name[key].key
            else:
                return self.o[key].key
        except KeyError:
            raise ValueError("'%s' are not found!" % key)
850072
def get_experiment_image_info(experiment: 'Experiment') -> Tuple[str, str]:
    """"""
    project_name = experiment.project.name
    repo_name = project_name

    image_name = '{}/{}'.format(conf.get('REGISTRY_URI'), repo_name)
    image_tag = experiment.code_reference.commit
    return image_name, image_tag
82566
def get(self, key):
        

        if not self.is_loaded:
            self.retrieve()

            self.is_loaded = True

        if self.has(key=key):
            return self.data[key]
        else:
            return None
725745
public function getExperimentFromKey($experimentKey)
    {
        if (isset($this->_experimentKeyMap[$experimentKey])) {
            return $this->_experimentKeyMap[$experimentKey];
        }

        $this->_logger->log(Logger::ERROR, sprintf('Experiment key "%s" is not in datafile.', $experimentKey));
        $this->_errorHandler->handleError(new InvalidExperimentException('Provided experiment is not in datafile.'));
        return new Experiment();
    }
157299
def getExperiment(self):
        
        experiment = protocol.Experiment()
        experiment.id = self.getExperimentId()
        experiment.instrument_model = pb.string(self.getInstrumentModel())
        experiment.sequencing_center = pb.string(self.getSequencingCenter())
        experiment.description = pb.string(self.getExperimentDescription())
        experiment.library = pb.string(self.getLibrary())
        experiment.platform_unit = pb.string(self.getPlatformUnit())
        experiment.message_create_time = self._iso8601
        experiment.message_update_time = self._iso8601
        experiment.run_time = pb.string(self.getRunTime())
        return experiment
34366
def get(self, key: str) -> Optional[str]:
        
        return get_config(self.full_key(key))