layer_stack_handler

Classes

LayerStackHandler(multi_planar_design[, fname])

Use DataFrame to hold information for multiple chips.

class LayerStackHandler(multi_planar_design: MultiPlanar, fname: str | None = None)[source]

Use DataFrame to hold information for multiple chips.

For all the chips, do NOT reuse the layer-number. However, within the dataframe, we can repeat layer numbers since a layer can have multiple datatypes.

Use the information in MultiPlanar design to parse_value and get the name of filename for layer stack.

Parameters:

multi_planar_design (MultiPlanar) – Class that is child of QDesign.

get_layer_datatype_when_fill_is_true() dict | None[source]

If a row has fill=True, then for each layer/datatype pair, return the rest of information in the row within a dict.

Returns:

Dict with key being tuple (layer, datatype)

Value is dict with key of column name of layerstack, and parsed value of column.

None if fill != True

Return type:

Union[dict, None]

get_properties_for_layer_datatype(properties: List[str], layer_number: int, datatype: int = 0) Tuple[float | str | bool] | None[source]
When user provides a layer and datatype, they can get properties

from the layer_stack file. The allowed options for properties must be in Col_Names. If any of the properties are not in Col_Names, None will be returned. Otherwise a Tuple will be returned with properties in the same order as provided in input variable properties.

Parameters:
  • properties (List[str]) – The column(s) within the layer stack that you want

  • layer (for a row based on)

  • datatype. (and)

  • layer_number (int) – The layer number within the column denoted by layer.

  • datatype (int, optional) – The datatype within the column denoted by datatype. Defaults to 0.

Returns:

If the search data provided

in the arguments are not in the layer_stack file, None will be returned. If the search values are found in layer_stack file, then a Tuple will be returned with the requested properties in the same order as provided in input variable denoted by properties.

Return type:

Union[Tuple[Union[float, str, bool]], None]

get_unique_chip_names() set[source]

Get a set of unique names used in the layer_stack dataframe.

Returns:

Unique names used in the layer stack used as either default or provided by user.

Return type:

set

get_unique_layer_ints() set[source]

Get a set of unique layer ints used in the layer_stack dataframe.

Returns:

Unique layer numbers used in the layer stack used as either default or provided by user.

Return type:

set

is_layer_data_unique() bool[source]

For each layer number make sure the datatypes are unique. A layers can #have multiple datatypes.

Returns:

True if empty dataframe, True if for each layer, there is ONLY one datatype. Otherwise, False.

Return type:

bool

layer_stack_handler_pilot_error()[source]

The handler will return None if incorrect arguments are passed.