Returns the face for a sign and longitude.
352012
def face(sign, lon):
    
    faces = FACES[sign]
    if lon < 10:
        return faces[0]
    elif lon < 20:
        return faces[1]
    else:
        return faces[2]
882904
def getFeatureID(self, location):
    
    if not self.contains(location):
      return self.EMPTY_FEATURE

    return self.SPHERICAL_SURFACE
411751
def dstr(self, places=1, warn=True):
        """"""
        if warn and self.preference != 'degrees':
            raise WrongUnitError('dstr')
        if self.radians.size == 0:
            return '<Angle []>'
        degrees = self._degrees
        signed = self.signed
        shape = getattr(degrees, 'shape', ())
        if shape and shape != (1,):
            return "{0} values from {1} to {2}".format(
                len(degrees),
                _dstr(min(degrees), places, signed),
                _dstr(max(degrees), places, signed),
                )
        return _dstr(degrees, places, signed)
851593
def T(self, ID, sign):
        
        lon = self.terms[sign][ID]
        ID = 'T_%s_%s' % (ID, sign)
        return self.G(ID, 0, lon)
694741
def ang2pix(nside, theta, phi, nest=False, lonlat=False):
    """"""
    lon, lat = _healpy_to_lonlat(theta, phi, lonlat=lonlat)
    return lonlat_to_healpix(lon, lat, nside, order='nested' if nest else 'ring')
1287798
def iconGlyph(self):
        
        if self._h5Dataset.attrs.get('CLASS', None) == b'DIMENSION_SCALE':
            return RtiIconFactory.DIMENSION
        else:
            return RtiIconFactory.ARRAY
69623
def G(self, ID, lat, lon):
        
        
        # Equatorial coordinates
        eqM = utils.eqCoords(lon, lat)
        eqZ = eqM
        if lat != 0:
            eqZ = utils.eqCoords(lon, 0)
        
        return {
            'id': ID,
            'lat': lat,
            'lon': lon,
            'ra': eqM[0],
            'decl': eqM[1],
            'raZ': eqZ[0],
            'declZ': eqZ[1],
        }
1110908
function (face, v) {
                //Get the indices of triangles for each polygon
                getTriangles(face, v);
                for (var k = 0; k < triangles.length; k++) {
                    //triangle[k] = "1/1/1"
                    //Split the data for getting position, uv, and normals
                    var point = triangles[k].split("/"); // ["1", "1", "1"]
                    // Set position indice
                    var indicePositionFromObj = parseInt(point[0]) - 1;
                    // Set uv indice
                    var indiceUvsFromObj = parseInt(point[1]) - 1;
                    // Set normal indice
                    var indiceNormalFromObj = parseInt(point[2]) - 1;
                    setData(indicePositionFromObj, indiceUvsFromObj, indiceNormalFromObj, positions[indicePositionFromObj], uvs[indiceUvsFromObj], normals[indiceNormalFromObj] //Set the vector for each component
                    );
                }
                //Reset variable for the next line
                triangles = [];
            }
479447
def getObject(ID, jd, lat, lon):
    
    if ID == const.SOUTH_NODE:
        obj = swe.sweObject(const.NORTH_NODE, jd)
        obj.update({
            'id': const.SOUTH_NODE,
            'lon': angle.norm(obj['lon'] + 180)
        })
    elif ID == const.PARS_FORTUNA:
        pflon = tools.pfLon(jd, lat, lon)
        obj = {
            'id': ID,
            'lon': pflon,
            'lat': 0,
            'lonspeed': 0,
            'latspeed': 0
        }
    elif ID == const.SYZYGY:
        szjd = tools.syzygyJD(jd)
        obj = swe.sweObject(const.MOON, szjd)
        obj['id'] = const.SYZYGY
    else:
        obj = swe.sweObject(ID, jd)
    
    _signInfo(obj)
    return obj
269713
def get_coordinates(self, i, end=False):
        """"""
        if end:
            endpoint = self.endpoints[i][1]
        else:
            endpoint = self.endpoints[i][0]
        return (endpoint.real, endpoint.imag)
463838
def _get_edge_sign(im, edge):
    """"""
    edge_data = im[edge[0]][edge[1]]
    # Handle possible multiple edges between nodes
    signs = list(set([v['sign'] for v in edge_data.values()
                                  if v.get('sign')]))
    if len(signs) > 1:
        logger.warning("Edge %s has conflicting polarities; choosing "
                       "positive polarity by default" % str(edge))
        sign = 1
    else:
        sign = signs[0]
    if sign is None:
        raise Exception('No sign attribute for edge.')
    elif abs(sign) == 1:
        return sign
    else:
        raise Exception('Unexpected edge sign: %s' % edge.attr['sign'])
1327336
private String getSeverityIcon(FacesMessage message) {
		if (message.getSeverity().equals(FacesMessage.SEVERITY_WARN))
			return "fa fa-exclamation-triangle";
		else if (message.getSeverity().equals(FacesMessage.SEVERITY_ERROR))
			return "fa fa-times-circle";
		else if (message.getSeverity().equals(FacesMessage.SEVERITY_FATAL))
			return "fa fa-ban";
		return "fa fa-info-circle";
	}
628858
function getIcon(datum) {
  if (!datum.alert) return {};
  if (datum.alert.improvement) {
    return {
      icon: 'cp:thumb-up',
      iconColor: 'var(--improvement-color, green)',
    };
  }
  return {
    icon: 'cp:error',
    iconColor: datum.alert.bugId ?
      'var(--neutral-color-dark, grey)' : 'var(--error-color, red)',
  };
}
409638
def longitude(self, longitude):
        """"""
        if not (-180 <= longitude <= 180):
            raise ValueError('longitude was {}, but has to be in [-180, 180]'
                             .format(longitude))
        self._longitude = longitude
675907
function (face, v) {
                getTriangles(face, v);
                for (var k = 0; k < triangles.length; k++) {
                    //triangle[k] = "1//1"
                    //Split the data for getting position and normals
                    var point = triangles[k].split("//"); // ["1", "1"]
                    // We check indices, and normals
                    var indicePositionFromObj = parseInt(point[0]) - 1;
                    var indiceNormalFromObj = parseInt(point[1]) - 1;
                    setData(indicePositionFromObj, 1, //Default value for uv
                    indiceNormalFromObj, positions[indicePositionFromObj], //Get each vector of data
                    BABYLON.Vector2.Zero(), normals[indiceNormalFromObj]);
                }
                //Reset variable for the next line
                triangles = [];
            }
281479
def extractSurface(image, radius=0.5):
    
    fe = vtk.vtkExtractSurface()
    fe.SetInputData(image)
    fe.SetRadius(radius)
    fe.Update()
    return Actor(fe.GetOutput())
755195
def get_font(self, face, bold=False, italic=False):
        """"""
        key = '%s-%s-%s' % (face, bold, italic)
        if key not in self._fonts:
            font = dict(face=face, bold=bold, italic=italic)
            self._fonts[key] = TextureFont(font, self._renderer)
        return self._fonts[key]