Get the area definition of the band.
160447
def get_area_def(self, dsid):
        """"""
        if dsid.name != 'HRV':
            return super(HRITMSGFileHandler, self).get_area_def(dsid)

        cfac = np.int32(self.mda['cfac'])
        lfac = np.int32(self.mda['lfac'])
        loff = np.float32(self.mda['loff'])

        a = self.mda['projection_parameters']['a']
        b = self.mda['projection_parameters']['b']
        h = self.mda['projection_parameters']['h']
        lon_0 = self.mda['projection_parameters']['SSP_longitude']

        nlines = int(self.mda['number_of_lines'])
        ncols = int(self.mda['number_of_columns'])

        segment_number = self.mda['segment_sequence_number']

        current_first_line = (segment_number -
                              self.mda['planned_start_segment_number']) * nlines
        bounds = self.epilogue['ImageProductionStats']['ActualL15CoverageHRV']

        upper_south_line = bounds[
            'LowerNorthLineActual'] - current_first_line - 1
        upper_south_line = min(max(upper_south_line, 0), nlines)

        lower_coff = (5566 - bounds['LowerEastColumnActual'] + 1)
        upper_coff = (5566 - bounds['UpperEastColumnActual'] + 1)

        lower_area_extent = self.get_area_extent((upper_south_line, ncols),
                                                 (loff, lower_coff),
                                                 (lfac, cfac),
                                                 h)

        upper_area_extent = self.get_area_extent((nlines - upper_south_line,
                                                  ncols),
                                                 (loff - upper_south_line,
                                                  upper_coff),
                                                 (lfac, cfac),
                                                 h)

        proj_dict = {'a': float(a),
                     'b': float(b),
                     'lon_0': float(lon_0),
                     'h': float(h),
                     'proj': 'geos',
                     'units': 'm'}

        lower_area = geometry.AreaDefinition(
            'some_area_name',
            "On-the-fly area",
            'geosmsg',
            proj_dict,
            ncols,
            upper_south_line,
            lower_area_extent)

        upper_area = geometry.AreaDefinition(
            'some_area_name',
            "On-the-fly area",
            'geosmsg',
            proj_dict,
            ncols,
            nlines - upper_south_line,
            upper_area_extent)

        area = geometry.StackedAreaDefinition(lower_area, upper_area)

        self.area = area.squeeze()
        return area
597930
def unitResponse(self,band):
        """"""
        #sum = asumr(band,nwave)
        total = band.throughput.sum()
        return 2.5*math.log10(total)
1307200
def get_area_def(self, key):
        """"""
        if self._is_polar():  # then it doesn't have a fixed grid
            return super(CLAVRXFileHandler, self).get_area_def(key)

        l1b_att = str(self.file_content.get('/attr/L1B', None))
        return self._read_axi_fixed_grid(l1b_att)
349796
def get_area(self):
        '''
        
        '''
        d_z = self.lower_depth - self.upper_depth
        self.downdip_width = d_z / np.sin(self.dip * np.pi / 180.)
        self.surface_width = self.downdip_width * np.cos(self.dip *
                                                         np.pi / 180.)
        self.area = self.length * self.downdip_width
        return self.area
885374
@Override
	public int getBand(int x, int y, int band) {
		if (!isInBounds(x, y))
			throw new ImageAccessException("Requested pixel is out of bounds.");
		if (band < 0 || band >= numBands)
			throw new ImageAccessException("Invalid band requested.");

		return data[getIndex(x, y, band)] & 0xFFFF;
	}
1037949
def get_band_gap(self):
        """"""
        if self.outcar is not None and self.eignval is not None:
            bandgap = VaspParser._get_bandgap_eigenval(self.eignval, self.outcar)
        elif self.doscar is not None:
            bandgap = VaspParser._get_bandgap_doscar(self.doscar)
        else:
            return None
        return Property(scalars=[Scalar(value=round(bandgap, 3))], units='eV')
627073
def _area(sma, eps, phi, r):
    

    aux = r * math.cos(phi) / sma
    signal = aux / abs(aux)
    if abs(aux) >= 1.:
        aux = signal
    return abs(sma**2 * (1.-eps) / 2. * math.acos(aux))
529214
def get_area_def(self, key):
        """"""
        projection = self.nc["goes_imager_projection"]
        a = projection.attrs['semi_major_axis']
        h = projection.attrs['perspective_point_height']
        b = projection.attrs['semi_minor_axis']

        lon_0 = projection.attrs['longitude_of_projection_origin']
        sweep_axis = projection.attrs['sweep_angle_axis'][0]

        # x and y extents in m
        h = float(h)
        x = self['x']
        y = self['y']
        x_l = h * x[0]
        x_r = h * x[-1]
        y_l = h * y[-1]
        y_u = h * y[0]
        x_half = (x_r - x_l) / (self.ncols - 1) / 2.
        y_half = (y_u - y_l) / (self.nlines - 1) / 2.
        area_extent = (x_l - x_half, y_l - y_half, x_r + x_half, y_u + y_half)

        proj_dict = {'a': float(a),
                     'b': float(b),
                     'lon_0': float(lon_0),
                     'h': h,
                     'proj': 'geos',
                     'units': 'm',
                     'sweep': sweep_axis}

        area = geometry.AreaDefinition(
            self.nc.attrs.get('orbital_slot', 'abi_geos'),
            self.nc.attrs.get('spatial_resolution', 'ABI L1B file area'),
            'abi_geos',
            proj_dict,
            self.ncols,
            self.nlines,
            np.asarray(area_extent))

        return area
1373705
def frontage(self):
        """"""
        if self.length and self.area:
            return round(self.area / self.length)
250849
function area(p, q, r) {
       return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);
   }
1120698
def bandWave(self):
        
        if self.binset.startswith('('):
            return self._computeBandwave(self.binset)
        else:
            return self._getBandwaveFomFile(self.binset)
123522
def area_for_roles(*user_roles, &block)
      options = last_option(user_roles)

      return area(&block) if user_roles.empty?
      
      not_for_roles(user_roles, &block) if user_roles.first == false
      
      for_roles user_roles do
        area(options, &block)
      end
    end
482215
def area(self):
        
        mprop = vtk.vtkMassProperties()
        mprop.SetInputData(self)
        return mprop.GetSurfaceArea()
851295
def area(self):
        
        area = float(sum(i.area for i in self.polygons_full))
        return area
436101
def _get_bandgap_from_bands(energies, nelec):
        """"""
        nelec = int(nelec)
        valence = [x[nelec-1] for x in energies]
        conduction = [x[nelec] for x in energies]
        return max(min(conduction) - max(valence), 0.0)
1073899
def getPlayAreaSize(self):
        

        fn = self.function_table.getPlayAreaSize
        pSizeX = c_float()
        pSizeZ = c_float()
        result = fn(byref(pSizeX), byref(pSizeZ))
        return result, pSizeX.value, pSizeZ.value
544537
def get_area(self):
        
        if self.area is None:
            self.area = self.to_2d().get_shapely().area
        return self.area