squadds.gds package#
Submodules#
squadds.gds.processing module#
- squadds.gds.processing.add_703_layer(gds_file)[source]#
Adds a 703 layer datatype 0 rectangle covering the 5/0 layer in the GDS file.
- Parameters:
gds_file (str) – Path to the input GDS file.
- Returns:
None
- squadds.gds.processing.add_squares_to_layer(input_gds, output_gds, selected_layer, selected_datatype, square_size=5, spacing=10, keepout=5)[source]#
Adds squares to a specific layer in a GDS file.
- Parameters:
input_gds (str) – The path to the input GDS file.
output_gds (str) – The path to the output GDS file.
selected_layer (int) – The layer number to add squares to.
selected_datatype (int) – The datatype number to add squares to.
square_size (int, optional) – The size of the squares to be added. Defaults to 5.
spacing (int, optional) – The spacing between squares. Defaults to 10.
keepout (int, optional) – The keepout area around the existing shapes. Defaults to 5.
- squadds.gds.processing.apply_fixes(gds_file, datatype=0)[source]#
Applies the required fixes to the GDS file.
- Parameters:
gds_file (str) – Path to the input GDS file.
datatype (int, optional) – The new datatype value for all layers. Defaults to 0.
- Returns:
None
- squadds.gds.processing.bias_gds_features(input_gds, output_gds, bias, layer_number, datatype_number=None)[source]#
Biases features on a specific layer in a GDS file by expanding or contracting them by the specified amount using KLayout.
- Parameters:
input_gds (str) – The path to the input GDS file.
output_gds (str) – The path to the output GDS file.
bias (float) – The amount by which to bias the features (in microns). Positive values expand features, negative values contract them.
layer_number (int) – The layer number of the features to bias.
datatype_number (int, optional) – The datatype number of the features to bias. If None, all datatypes on the layer are biased.
- squadds.gds.processing.create_cheesing_effect(input_gds, output_gds, selected_layer, selected_datatype)[source]#
Creates a cheesing effect on a GDS file by subtracting a square layer from an original layer.
Parameters: - input_gds (str): The path to the input GDS file. - output_gds (str): The path to save the modified GDS file. - selected_layer (int): The layer number of the original and square layers. - selected_datatype (int): The datatype number of the original and square layers.
Returns: None
- squadds.gds.processing.crop_top_left_rectangle(gds_file, width=300, height=100, layer_number=5, datatype=0)[source]#
Removes a 300 x 100 um rectangle from the top left of the layer_number/datatype rectangle in the GDS file.
- Parameters:
gds_file (str) – Path to the input GDS file.
width (int, optional) – Width of the rectangle to remove in micrometers. Defaults to 300.
height (int, optional) – Height of the rectangle to remove in micrometers. Defaults to 100.
layer_number (int, optional) – The layer number of the rectangle to crop. Defaults to 5.
datatype (int, optional) – The datatype of the rectangle to crop. Defaults to 0.
- Returns:
None
- squadds.gds.processing.delete_non_zero_datatype_layers(gds_file)[source]#
Deletes all layers with datatypes not equal to 0 from the GDS file.
- Parameters:
gds_file (str) – Path to the input GDS file.
- Returns:
None
- squadds.gds.processing.get_all_layer_numbers(gds_file)[source]#
Retrieves all unique layer numbers present in the GDS file.
- Parameters:
gds_file (str) – Path to the input GDS file.
- Returns:
A list of tuples, where each tuple contains (layer_number, datatype).
- Return type:
list
- squadds.gds.processing.merge_shapes_in_layer(gds_file, output_gds_file, layer_number)[source]#
Selects all shapes in the given layer number from the input GDS file, merges them together, and saves the result in the output GDS file.
- Parameters:
gds_file (str) – Path to the input GDS file.
output_gds_file (str) – Path to the output GDS file.
layer_number (int) – The layer number whose shapes should be merged.
- Returns:
None