Returns a dict of all meters and their values.
324340
def peek_meter(self):
        ''''''
        result = {}
        for key in self.meter.keys():
            val = self.meter[key].value()
            val = val[0] if isinstance(val, (list, tuple)) else val
            result[key] = val
        return result
1366304
def as_dict(self):
        
        d = {}
        _add_value(d, 'obstory_ids', self.obstory_ids)
        _add_string(d, 'field_name', self.field_name)
        _add_value(d, 'lat_min', self.lat_min)
        _add_value(d, 'lat_max', self.lat_max)
        _add_value(d, 'long_min', self.long_min)
        _add_value(d, 'long_max', self.long_max)
        _add_value(d, 'time_min', self.time_min)
        _add_value(d, 'time_max', self.time_max)
        _add_string(d, 'item_id', self.item_id)
        _add_value(d, 'skip', self.skip)
        _add_value(d, 'limit', self.limit)
        _add_boolean(d, 'exclude_imported', self.exclude_imported)
        _add_string(d, 'exclude_export_to', self.exclude_export_to)
        return d
1318090
def get_all(self):
        
        if not self.vars:
            return self.parent
        if not self.parent:
            return self.vars
        return dict(self.parent, **self.vars)
204576
def list_metering_labels(self, retrieve_all=True, **_params):
        """"""
        return self.list('metering_labels', self.metering_labels_path,
                         retrieve_all, **_params)
137310
def get_all(self):
        """"""
        url = build_url(self.api_key, self.spot_id, self.fields,
                        self.unit, None, None)
        return get_msw(url)
933702
def area_fraction_dict(self):
        
        return {hkl: self.miller_area_dict[hkl] / self.surface_area
                for hkl in self.miller_area_dict.keys()}
698287
def to_dict(self):
        ''''''
        return {'x': self.x,
                'y': self.y,
                'height': self.height,
                'width': self.width,
                'direction': dir.to_string(self.direction)}
255517
def retrieve_metrics(self):
        

        time = np.array(self.list_dates)
        if len(time) >= 1:
            time -= time[0]
        return {'time': time, 'index': self.list_iters,
                'values': self.list_cv_values}
255720
def all_properties(self):
        """"""

        properties = {}
        r = self.requests.get(self.index_url + "/_mapping", headers=HEADER_JSON, verify=False)
        try:
            r.raise_for_status()
            r_json = r.json()

            if 'items' not in r_json[self.index]['mappings']:
                return properties

            if 'properties' not in r_json[self.index]['mappings']['items']:
                return properties

            properties = r_json[self.index]['mappings']['items']['properties']
        except requests.exceptions.HTTPError as ex:
            logger.error("Error all attributes for %s.", self.anonymize_url(self.index_url))
            logger.error(ex)
            return

        return properties
259662
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'expansions') and self.expansions is not None:
            _dict['expansions'] = [x._to_dict() for x in self.expansions]
        return _dict
630273
def to_dict(self):
        
        return {
            'station_id': self.station_id,
            'timestamp': self.timestamp,
            'temperature': self.temperature,
            'wind_speed': self.wind_speed,
            'wind_gust': self.wind_gust,
            'wind_deg': self.wind_deg,
            'pressure': self.pressure,
            'humidity': self.humidity,
            'rain_1h': self.rain_1h,
            'rain_6h': self.rain_6h,
            'rain_24h': self.rain_24h,
            'snow_1h': self.snow_1h,
            'snow_6h': self.snow_6h,
            'snow_24h': self.snow_24h,
            'dew_point': self.dew_point,
            'humidex': self.humidex,
            'heat_index': self.heat_index,
            'visibility_distance': self.visibility_distance,
            'visibility_prefix': self.visibility_prefix,
            'clouds_distance': self.clouds_distance,
            'clouds_condition': self.clouds_condition,
            'clouds_cumulus': self.clouds_cumulus,
            'weather_precipitation': self.weather_precipitation,
            'weather_descriptor': self.weather_descriptor,
            'weather_intensity': self.weather_intensity,
            'weather_proximity': self.weather_proximity,
            'weather_obscuration': self.weather_obscuration,
            'weather_other': self.weather_other}
567208
def data(self):
        
        d = {}
        for name in self.key_names:
            d[name] = self.__dict__.get(name, None)
        return d
664909
def as_dict(self):
        
        return {"@module": self.__class__.__module__,
                "@class": self.__class__.__name__,
                "distance_cutoff": float(self._distance_cutoff),
                "angle_cutoff": float(self._angle_cutoff),
                "additional_condition": int(self._additional_condition),
                "continuous_symmetry_measure_cutoff": float(self._continuous_symmetry_measure_cutoff),
                "symmetry_measure_type": self._symmetry_measure_type}
825247
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'name') and self.name is not None:
            _dict['name'] = self.name
        if hasattr(self, 'limit') and self.limit is not None:
            _dict['limit'] = self.limit
        return _dict
317654
def to_dict(self):
        
        return dict((parameter.name, parameter.value) for parameter in self.values())
674037
def from_meters(cls, meter_x=0.0, meter_y=0.0):
        """"""
        assert -ORIGIN_SHIFT <= meter_x <= ORIGIN_SHIFT, \
            'Meter X needs to be a value between -{0} and {0}.'.format(ORIGIN_SHIFT)
        assert -ORIGIN_SHIFT <= meter_y <= ORIGIN_SHIFT, \
            'Meter Y needs to be a value between -{0} and {0}.'.format(ORIGIN_SHIFT)
        longitude = (meter_x / ORIGIN_SHIFT) * 180.0
        latitude = (meter_y / ORIGIN_SHIFT) * 180.0
        latitude = 180.0 / math.pi * (2 * math.atan(math.exp(latitude * math.pi / 180.0)) - math.pi / 2.0)
        return cls(latitude=latitude, longitude=longitude)
1301021
def keys(self):
        
        keys = []
        for series in self._get_series():
            keys.append(
                (series.get('measurement',
                            series.get('name', 'results')),
                 series.get('tags', None))
            )
        return keys