Return the intrinsic pore volume.

        Returns
        -------
        :class:`float`
            The intrinsic pore volume.
10495
def calculate_pore_volume(self):
        
        self.pore_volume = sphere_volume(self.calculate_pore_diameter() / 2)
        self.properties['pore_volume'] = self.pore_volume
        return self.pore_volume
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)
1230153
def depth_slice(self):
        

        if self.depth is not None:
            return self.depth

        from .depth import Depth
        self.depth = Depth(self)
        return self.depth
743844
def density(self):
        
        r = float(self.sp_index.npoints) / float(self.sp_index.length)
        return r
848066
def size(self):
        
        result = self.grouper.size()

        if isinstance(self.obj, Series):
            result.name = getattr(self.obj, 'name', None)
        return result
643763
def depth(self):
        
        return len(self.path.rstrip(os.sep).split(os.sep))
341539
def density(self):
        
        tot_nonsparse = sum(ser.sp_index.npoints
                            for _, ser in self.items())
        tot = len(self.index) * len(self.columns)
        return tot_nonsparse / float(tot)
669687
def size(self):
        
        if not hasattr(self, "_size") or self._size is None:
            fig = plt.gcf()
            self._size = fig.get_size_inches()*fig.dpi
        return self._size
940811
def to_volume(self):
        """"""
        if hasattr(self.header.definitions, "Lattice"):
            X, Y, Z = self.header.definitions.Lattice
        else:
            raise ValueError("Unable to determine data size")
        
        volume = self.decoded_data.reshape(Z, Y, X)
        return volume
1124788
def neurite_volume_density(neurites, neurite_type=NeuriteType.all):
    '''
    '''
    def vol_density(neurite):
        '''volume density of a single neurite'''
        return neurite.volume / convex_hull(neurite).volume

    return list(vol_density(n)
                for n in iter_neurites(neurites, filt=is_type(neurite_type)))
1303076
def to_volume(volume):
        
        from sevenbridges.models.volume import Volume
        if not volume:
            raise SbgError('Volume is required!')
        elif isinstance(volume, Volume):
            return volume.id
        elif isinstance(volume, six.string_types):
            return volume
        else:
            raise SbgError('Invalid volume parameter!')
1154333
def get_monolayer(self):
        

        unit_a = self.get_unit_primitive_area
        Nsurfs = self.Nsurfs_ads_in_slab
        Nads = self.Nads_in_slab
        return Nads / (unit_a * Nsurfs)
1269109
def size(self):
        
        return self._size_full_intension \
                    - len(self.exclude)\
                    + len(self.include)
604319
def pore_diameter(elements, coordinates, com=None):
    """"""
    if com is None:
        com = center_of_mass(elements, coordinates)
    atom_vdw = np.array([[atomic_vdw_radius[x.upper()]] for x in elements])
    dist_matrix = euclidean_distances(coordinates, com.reshape(1, -1))
    re_dist_matrix = dist_matrix - atom_vdw
    index = np.argmin(re_dist_matrix)
    pored = re_dist_matrix[index][0] * 2
    return (pored, index)
867538
def get_size(self):
        
        raise NotImplementedError("%s not implemented for %s" % (self.get_size.__func__.__name__,
                                                                 self.__class__.__name__))
330862
def get_area(self):
        
        mesh = self.mesh
        _, _, _, area = mesh.get_cell_dimensions()

        return numpy.sum(area)
29805
def _get_area(self):
        
        from fontTools.pens.areaPen import AreaPen
        pen = AreaPen(self.layer)
        self.draw(pen)
        return abs(pen.value)