Returns the 0-1 percentage opacity value for this node.
        
        :return     <float>
511915
def opacity( self ):
        
        if self.isIsolateHidden():
            return 0.1
        
        opacity = super(XNode, self).opacity()
        layer = self.layer()
        if layer:
            return layer.opacity() * opacity
        
        return opacity
205248
def getPercentBlank(self):
        ''''''
        blank = 0
        nonblank = 0
        for x in self.data.flat:
            if x == -99999.0:
                blank = blank + 1
            else:
                nonblank = nonblank + 1

        print ("Blank tiles =  ", blank, "out of ", (nonblank+blank))
315348
def global_unlock_percent(self):
        
        percent = CRef.cfloat()
        result = self._iface.get_ach_progress(self.name, percent)

        if not result:
            return 0.0

        return float(percent)
501483
public int getOpacity() {
		int opacity = Math
				.round((mPosToOpacFactor * (mBarPointerPosition - mBarPointerHaloRadius)));
		if (opacity < 5) {
			return 0x00;
		} else if (opacity > 250) {
			return 0xFF;
		} else {
			return opacity;
		}
	}
627342
def value(self):
        
        if self.buffer:
            return np.quantile(self.buffer, self.quantile)
        else:
            return 0.0
210438
def get_top_edge_depth(self):
        
        top_edge = self.mesh[0:1]
        if top_edge.depths is None:
            return 0
        else:
            return numpy.min(top_edge.depths)
251382
def opacity(self, value):
        

        if value is not None:
            assert type(value) in (int, float), "'{0}' attribute: '{1}' type is not 'int' or 'float'!".format("opacity",
                                                                                                              value)
        if value > 1:
            value = 1
        elif value < 0:
            value = 0

        self.__opacity = float(value)
        self.__set_style_sheet()
298052
def percent_rank(expr, sort=None, ascending=True):
    
    return _rank_op(expr, PercentRank, types.float64, sort=sort, ascending=ascending)
804170
function() {
            var
              barWidth       = $bar.width(),
              totalWidth     = $module.width(),
              minDisplay     = parseInt($bar.css('min-width'), 10),
              displayPercent = (barWidth > minDisplay)
                ? (barWidth / totalWidth * 100)
                : module.percent
            ;
            return (settings.precision > 0)
              ? Math.round(displayPercent * (10 * settings.precision)) / (10 * settings.precision)
              : Math.round(displayPercent)
            ;
          }
231151
def saturation(self, saturation):
        
        if saturation < 0 or saturation > 1:
            raise ValueError("Saturation must be a percentage "
                             "represented as decimal 0-1.0")
        self._saturation = saturation
        self._update_color()
        if saturation == 0:
            self.white()
        else:
            cmd = self.command_set.saturation(saturation)
            self.send(cmd)
1133542
def _weight_opacity(weight, weight_range):
    # type: (float, float) -> str
    
    min_opacity = 0.8
    if np.isclose(weight, 0) and np.isclose(weight_range, 0):
        rel_weight = 0.0
    else:
        rel_weight = abs(weight) / weight_range
    return '{:.2f}'.format(min_opacity + (1 - min_opacity) * rel_weight)
625446
def convert_to_pixels(self, value):
        
        percent = ((value - self._start) / self._extent)
        return percent * (self.get_scale_length() - self._sliderlength) + self._sliderlength / 2
1164428
function calcOpacity(opacity) {
	if (isPercentage(opacity)) {
		opacity = opacity.replace('%', '') / 100;
	} else if (opacity > 1) {
		opacity = opacity / 100;
	}

	return opacity;
}
442822
def total_coverage
      return 0.0 if lines.size.zero?
      ran_lines.size.to_f / lines.size.to_f
    end
550567
def getLimbdarkeningCoeff(self, wavelength=1.22):  # TODO replace with pylightcurve
        
        # TODO check this returns correct value - im not certain
        # The intervals of values in the tables
        tempind = [ 3500., 3750., 4000., 4250., 4500., 4750., 5000., 5250., 5500., 5750., 6000., 6250.,
                 6500., 6750., 7000., 7250., 7500., 7750., 8000., 8250., 8500., 8750., 9000., 9250.,
                 9500., 9750., 10000., 10250., 10500., 10750., 11000., 11250., 11500., 11750., 12000., 12250.,
                 12500., 12750., 13000., 14000., 15000., 16000., 17000., 19000., 20000., 21000., 22000., 23000.,
                 24000., 25000., 26000., 27000., 28000., 29000., 30000., 31000., 32000., 33000., 34000., 35000.,
                 36000., 37000., 38000., 39000., 40000., 41000., 42000., 43000., 44000., 45000., 46000., 47000.,
                 48000., 49000., 50000.]
        lggind = [0., 0.5, 1., 1.5, 2., 2.5, 3., 3.5, 4., 4.5, 5.]
        mhind = [-5., -4.5, -4., -3.5, -3., -2.5, -2., -1.5, -1., -0.5, -0.3, -0.2, -0.1, 0., 0.1, 0.2, 0.3, 0.5, 1.]

        # Choose the values in the table nearest our parameters
        tempselect = _findNearest(tempind, float(self.T))
        lgselect = _findNearest(lggind, float(self.calcLogg()))
        mhselect = _findNearest(mhind, float(self.Z))

        quadratic_filepath = resource_stream(__name__, 'data/quadratic.dat')
        coeffTable = np.loadtxt(quadratic_filepath)

        foundValues = False
        for i in range(len(coeffTable)):
            if coeffTable[i, 2] == lgselect and coeffTable[i, 3] == tempselect and coeffTable[i, 4] == mhselect:
                if coeffTable[i, 0] == 1:
                    u1array = coeffTable[i, 8:]  # Limb darkening parameter u1 for each wl in waveind
                    u2array = coeffTable[i+1, 8:]
                    foundValues = True
                    break

        if not foundValues:
            raise ValueError('No limb darkening values could be found')  # TODO replace with better exception

        waveind = [0.365, 0.445, 0.551, 0.658, 0.806, 1.22, 1.63, 2.19, 3.45]  # Wavelengths available in table

        # Interpolates the value at wavelength from values in the table (waveind)
        u1AtWavelength = np.interp(wavelength, waveind, u1array, left=0, right=0)
        u2AtWavelength = np.interp(wavelength, waveind, u2array, left=0, right=0)

        return u1AtWavelength, u2AtWavelength
948896
def top_value(padding=nil) # :nodoc:
      topval = layers.inject(0) { |max, layer| (max = ((max < layer.top_value) ? layer.top_value : max)) unless layer.top_value.nil?; max }
      below_zero = (topval <= 0)
      topval = padding == :padded ? (topval + ((topval - bottom_value) * 0.15)) : topval
      (below_zero && topval > 0) ? 0 : topval
    end
951449
def fill_opacity(value):
        
        if value.value:
            _assert_is_type('fill_opacity.value', value.value,
                            (float, int))
            if value.value < 0 or value.value > 1:
                raise ValueError(
                    'fill_opacity must be between 0 and 1')