kqcircuits.util.area
- class kqcircuits.util.area.AreaReceiver(*args, **kwargs)[source]
Bases:
TileOutputReceiverClass for handling and storing output from
TilingProcessor@brief Creates a new object of this class
- kqcircuits.util.area.get_area_and_density(cell: Cell, layer_infos=None, optimize_ground_grid_calculations=True)[source]
Get total area and density \(\rho=\frac{area}{bbox.area}\) of all layers.
This calculation is slow for geometries with many polygons, and in practice the layers containing ground grid take the majority of time. When
optimize_ground_grid_calculationsis set toTrue, theground_gridlayer area is calculated by assuming all polygons in this layer are identical and don’t overlap each other (which they should be by definition). Further, the area ofbase_metal_gapis calculated by combining the areas ofbase_metal_gap_wo_gridandground_gridareas.- Parameters:
cell – target cell to get area from
layer_infos – list of
LayerInfoto get area for, or None to get area for all layers.optimize_ground_grid_calculations –
True(default) to optimize ground grid area calculations.
- Returns: dictionary
{layer_name: {'area': area, 'density': density}}, whereareais in um^2 anddensity is a fraction < 1.