Get the coordinate dataset keys for *dsid*.
326310
def _get_coordinates_for_dataset_key(self, dsid):
        """"""
        ds_info = self.ids[dsid]
        cids = []

        for cinfo in ds_info.get('coordinates', []):
            if not isinstance(cinfo, dict):
                cinfo = {'name': cinfo}

            cinfo['resolution'] = ds_info['resolution']
            if 'polarization' in ds_info:
                cinfo['polarization'] = ds_info['polarization']
            cid = DatasetID(**cinfo)
            cids.append(self.get_dataset_key(cid))

        return cids
1121112
def get_dataset_key(self, key, **kwargs):
        
        return get_key(key, self.ids.keys(), **kwargs)
1313679
public Map<String, AtlasVertex> getVerticesForGUIDs(List<String> guids) {

        return getVerticesForPropertyValues(Constants.GUID_PROPERTY_KEY, guids);
    }
1061617
def get_jids():
    '''
    
    '''
    query = '''SELECT jid, load FROM {keyspace}.jids;'''.format(keyspace=_get_keyspace())

    ret = {}

    # cassandra_cql.cql_query may raise a CommandExecutionError
    try:
        data = __salt__['cassandra_cql.cql_query'](query)
        if data:
            for row in data:
                jid = row.get('jid')
                load = row.get('load')
                if jid and load:
                    ret[jid] = salt.utils.jid.format_jid_instance(
                        jid,
                        salt.utils.json.loads(load))
    except CommandExecutionError:
        log.critical('Could not get a list of all job ids.')
        raise
    except Exception as e:
        log.critical(
            'Unexpected error while getting list of all job ids: %s', e)
        raise

    return ret
632415
def get_dataset(self, key, info):
        """"""
        if self.mdrs is None:
            self._read_all(self.filename)

        if key.name in ['longitude', 'latitude']:
            lons, lats = self.get_full_lonlats()
            if key.name == 'longitude':
                dataset = create_xarray(lons)
            else:
                dataset = create_xarray(lats)

        elif key.name in ['solar_zenith_angle', 'solar_azimuth_angle',
                          'satellite_zenith_angle', 'satellite_azimuth_angle']:
            sun_azi, sun_zen, sat_azi, sat_zen = self.get_full_angles()
            if key.name == 'solar_zenith_angle':
                dataset = create_xarray(sun_zen)
            elif key.name == 'solar_azimuth_angle':
                dataset = create_xarray(sun_azi)
            if key.name == 'satellite_zenith_angle':
                dataset = create_xarray(sat_zen)
            elif key.name == 'satellite_azimuth_angle':
                dataset = create_xarray(sat_azi)
        else:
            mask = None
            if key.calibration == 'counts':
                raise ValueError('calibration=counts is not supported! ' +
                                 'This reader cannot return counts')
            elif key.calibration not in ['reflectance', 'brightness_temperature', 'radiance']:
                raise ValueError('calibration type ' + str(key.calibration) +
                                 ' is not supported!')

            if key.name in ['3A', '3a'] and self.three_a_mask is None:
                self.three_a_mask = ((self["FRAME_INDICATOR"] & 2 ** 16) != 2 ** 16)

            if key.name in ['3B', '3b'] and self.three_b_mask is None:
                self.three_b_mask = ((self["FRAME_INDICATOR"] & 2 ** 16) != 0)

            if key.name not in ["1", "2", "3a", "3A", "3b", "3B", "4", "5"]:
                LOG.info("Can't load channel in eps_l1b: " + str(key.name))
                return

            if key.name == "1":
                if key.calibration == 'reflectance':
                    array = radiance_to_refl(self["SCENE_RADIANCES"][:, 0, :],
                                             self["CH1_SOLAR_FILTERED_IRRADIANCE"])
                else:
                    array = self["SCENE_RADIANCES"][:, 0, :]

            if key.name == "2":
                if key.calibration == 'reflectance':
                    array = radiance_to_refl(self["SCENE_RADIANCES"][:, 1, :],
                                             self["CH2_SOLAR_FILTERED_IRRADIANCE"])
                else:
                    array = self["SCENE_RADIANCES"][:, 1, :]

            if key.name.lower() == "3a":
                if key.calibration == 'reflectance':
                    array = radiance_to_refl(self["SCENE_RADIANCES"][:, 2, :],
                                             self["CH3A_SOLAR_FILTERED_IRRADIANCE"])
                else:
                    array = self["SCENE_RADIANCES"][:, 2, :]

                mask = np.empty(array.shape, dtype=bool)
                mask[:, :] = self.three_a_mask[:, np.newaxis]

            if key.name.lower() == "3b":
                if key.calibration == 'brightness_temperature':
                    array = radiance_to_bt(self["SCENE_RADIANCES"][:, 2, :],
                                           self["CH3B_CENTRAL_WAVENUMBER"],
                                           self["CH3B_CONSTANT1"],
                                           self["CH3B_CONSTANT2_SLOPE"])
                else:
                    array = self["SCENE_RADIANCES"][:, 2, :]
                mask = np.empty(array.shape, dtype=bool)
                mask[:, :] = self.three_b_mask[:, np.newaxis]

            if key.name == "4":
                if key.calibration == 'brightness_temperature':
                    array = radiance_to_bt(self["SCENE_RADIANCES"][:, 3, :],
                                           self["CH4_CENTRAL_WAVENUMBER"],
                                           self["CH4_CONSTANT1"],
                                           self["CH4_CONSTANT2_SLOPE"])
                else:
                    array = self["SCENE_RADIANCES"][:, 3, :]

            if key.name == "5":
                if key.calibration == 'brightness_temperature':
                    array = radiance_to_bt(self["SCENE_RADIANCES"][:, 4, :],
                                           self["CH5_CENTRAL_WAVENUMBER"],
                                           self["CH5_CONSTANT1"],
                                           self["CH5_CONSTANT2_SLOPE"])
                else:
                    array = self["SCENE_RADIANCES"][:, 4, :]

            dataset = create_xarray(array)
            if mask is not None:
                dataset = dataset.where(~mask)

        dataset.attrs['platform_name'] = self.platform_name
        dataset.attrs['sensor'] = self.sensor_name
        dataset.attrs.update(info)
        dataset.attrs.update(key.to_dict())
        return dataset
976459
def get_right_geo_fhs(self, dsid, fhs):
        """"""
        ds_info = self.ids[dsid]
        req_geo, rem_geo = self._get_req_rem_geo(ds_info)
        desired, other = split_desired_other(fhs, req_geo, rem_geo)
        if desired:
            try:
                ds_info['dataset_groups'].remove(rem_geo)
            except ValueError:
                pass
            return desired
        else:
            return other
96564
def _get_coarse_dataset(self, key, info):
        """"""
        angles = self.root.find('.//Tile_Angles')
        if key in ['solar_zenith_angle', 'solar_azimuth_angle']:
            elts = angles.findall(info['xml_tag'] + '/Values_List/VALUES')
            return np.array([[val for val in elt.text.split()] for elt in elts],
                            dtype=np.float)

        elif key in ['satellite_zenith_angle', 'satellite_azimuth_angle']:
            arrays = []
            elts = angles.findall(info['xml_tag'] + '[@bandId="1"]')
            for elt in elts:
                items = elt.findall(info['xml_item'] + '/Values_List/VALUES')
                arrays.append(np.array([[val for val in item.text.split()] for item in items],
                                       dtype=np.float))
            return np.nanmean(np.dstack(arrays), -1)
        else:
            return
992424
def get_grid_mapping_variables(ds):
    '''
    
    '''
    grid_mapping_variables = []
    for ncvar in ds.get_variables_by_attributes(grid_mapping=lambda x: x is not None):
        if ncvar.grid_mapping in ds.variables:
            grid_mapping_variables.append(ncvar.grid_mapping)
    return grid_mapping_variables
720419
def get_dsn(d):
    

    try:
        return d["dataSetName"]
    except Exception as e:
        logger_misc.warn("get_dsn: Exception: No datasetname found, unable to continue: {}".format(e))
        exit(1)
1109086
def _get_file_handlers(self, dsid):
        """"""
        ds_info = self.ids[dsid]

        fhs = [fh for fh in self.file_handlers['generic_file']
               if set(fh.datasets) & set(ds_info['dataset_groups'])]
        if not fhs:
            LOG.warning("Required file type '%s' not found or loaded for "
                        "'%s'", ds_info['file_type'], dsid.name)
        else:
            if len(set(ds_info['dataset_groups']) & set(['GITCO', 'GIMGO', 'GMTCO', 'GMODO'])) > 1:
                fhs = self.get_right_geo_fhs(dsid, fhs)
            return fhs
557200
def available_datasets(self):
        """"""
        sensor = self.get_sensor(self['/attr/sensor'])
        nadir_resolution = self.get_nadir_resolution(sensor)
        for var_name, val in self.file_content.items():
            if isinstance(val, SDS):
                ds_info = {
                    'file_type': self.filetype_info['file_type'],
                    'resolution': nadir_resolution,
                }
                if self._is_polar():
                    ds_info['coordinates'] = ['longitude', 'latitude']
                yield DatasetID(name=var_name, resolution=nadir_resolution), ds_info
7170
def get(self, key, default=None):
        """"""
        try:
            key = self.get_key(key)
        except KeyError:
            return default
        return super(DatasetDict, self).get(key, default)
716969
def get_dataset(self, dsid, dsinfo):
        
        data = self[dsinfo.get('file_key', dsid.name)]
        data.attrs.update(dsinfo)

        data.attrs["platform_name"] = self['/attr/satellite_name']
        data.attrs["sensor"] = self['/attr/instrument_name']

        return data
199829
def _get_encoder_data_shapes(self, bucket_key: int, batch_size: int) -> List[mx.io.DataDesc]:
        
        return [mx.io.DataDesc(name=C.SOURCE_NAME,
                               shape=(batch_size, bucket_key, self.num_source_factors),
                               layout=C.BATCH_MAJOR)]
1154967
def load(self, dataset_keys, previous_datasets=None):
        """"""
        all_datasets = previous_datasets or DatasetDict()
        datasets = DatasetDict()

        # Include coordinates in the list of datasets to load
        dsids = [self.get_dataset_key(ds_key) for ds_key in dataset_keys]
        coordinates = self._get_coordinates_for_dataset_keys(dsids)
        all_dsids = list(set().union(*coordinates.values())) + dsids

        for dsid in all_dsids:
            if dsid in all_datasets:
                continue
            coords = [all_datasets.get(cid, None)
                      for cid in coordinates.get(dsid, [])]
            ds = self._load_dataset_with_area(dsid, coords)
            if ds is not None:
                all_datasets[dsid] = ds
                if dsid in dsids:
                    datasets[dsid] = ds
        self._load_ancillary_variables(all_datasets)

        return datasets
1235454
def get_keys(self, keymap):
        """"""
        keys = dict(modifiers=[], regular=[])

        # loop on keymap bytes
        for keymap_index, keymap_byte in enumerate(keymap):
            try:
                keymap_values = self._keymap_values_dict[keymap_index]
            except KeyError:
                continue

            # loop on keymap_values for that keymap byte
            for key, value in keymap_values.items():
                if not keymap_byte & key:
                    continue
                elif value in self._modifiers:
                    keys['modifiers'].append(value)
                elif not keys['regular']:
                    keys['regular'].append(value)

        return keys
446345
def _get_dsnames(cls, data, ignore_keys=['attrs', 'plotter', 'ds'],
                     concat_dim=False):
        """"""
        def filter_ignores(item):
            return item[0] not in ignore_keys and isinstance(item[1], dict)
        if 'fname' in data:
            return {tuple(
                [data['fname'], data['store']] +
                ([data.get('concat_dim')] if concat_dim else []))}
        return set(chain(*map(partial(cls._get_dsnames, concat_dim=concat_dim,
                                      ignore_keys=ignore_keys),
                              dict(filter(filter_ignores,
                                          six.iteritems(data))).values())))