From c4a9065fbe2a4ea93a5a160a4e7c6bb2bf620c28 Mon Sep 17 00:00:00 2001 From: audrey01 Date: Tue, 7 May 2024 14:48:51 -0400 Subject: [PATCH] corrected the default text in the doc --- src/qnngds/cells.py | 18 +++++++++--------- src/qnngds/design.py | 16 ++++++++-------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/qnngds/cells.py b/src/qnngds/cells.py index 93d9153..6da2b94 100644 --- a/src/qnngds/cells.py +++ b/src/qnngds/cells.py @@ -30,7 +30,7 @@ def alignment( layers_to_align (list of int): Layers to align. outline_die (int or float): The width of the die's outline. die_layer (int): The layer where the die is placed. - text (str): Text to be displayed. + text (str, optional): If None, the text is f"lay={layers_to_align}". Returns: DIE_ALIGN (Device): A device that centers the alignment marks in an n*m unit cell. @@ -83,7 +83,7 @@ def vdp( outline (int or float): The width of the VDP and die's outline. die_layer (int or tuple of int): The layer where the die is placed. pad_layer (int or tuple of int): The layer where the pads are placed. - text (str, optional): If None, the text is f"VDP \n{layers_to_probe}". + text (str, optional): If None, the text is f"lay={layers_to_probe}". Returns: DIE_VANDP (Device): The created device. """ @@ -194,7 +194,7 @@ def etch_test( Example: [[1, 2], [1], [2]] outline_die (int or float): The width of the die's outline. die_layer (int): The layer where the die is placed. - text (str): Text to be displayed. + text (str, optional): If None, the text is f"lay={layers_to_etch}". Returns: DIE_ETCH_TEST (Device): A device (with size n*m of unit cells) with etch tests in its center. @@ -264,7 +264,7 @@ def resolution_test( resolutions_to_test (list of float): The resolutions to test in µm. outline (int or float): The width of the VDP and die's outline. die_layer (int or tuple of int): The layer where the die is placed. - text (str, optional): If None, the text is f"RES TEST \n{layer_to_resolve}". + text (str, optional): If None, the text is f"lay={layer_to_resolve}". Returns: DIE_RES_TEST (Device): The created device. @@ -341,7 +341,7 @@ def nanowires( device_layer (int or tuple of int): The layer where the device is placed. die_layer (int or tuple of int): The layer where the die is placed. pad_layer (int or tuple of int): The layer where the pads are placed. - text (str, optional): If None, the text is "NWIRES". + text (str, optional): If None, the text is f"w={channels_w}". fill_pad_layer (bool): If True, the space reserved for pads in the die_cell in filled in pad's layer. @@ -448,7 +448,7 @@ def ntron( text: Union[None, str] = dflt.text, fill_pad_layer: bool = False, ) -> Device: - """Creates a standardized cell specifically for a single ntron. + r"""Creates a standardized cell specifically for a single ntron. Unless specified, scales the ntron parameters as: gate_w = drain_w = source_w = 3 * channel_w @@ -472,7 +472,7 @@ def ntron( device_layer (int or array-like[2]): The layer where the device is placed. die_layer (int or array-like[2]): The layer where the die is placed. pad_layer (int or array-like[2]): The layer where the pads are placed. - text (string, optional): If None, the text is the ntron's choke and channel widths. + text (string, optional): If None, the text is f"chk: {choke_w} \nchnl: {channel_w}". fill_pad_layer (bool): If True, the space reserved for pads in the die_cell in filled in pad's layer. @@ -598,7 +598,7 @@ def snspd( device_layer (int or array-like[2]): The layer where the device is placed. die_layer (int or array-like[2]): The layer where the die is placed. pad_layer (int or array-like[2]): The layer where the pads are placed. - text (string, optional): If None, text = f'SNSPD {w_choke}'. + text (string, optional): If None, the text is f"w={snspd_width}". fill_pad_layer (bool): If True, the space reserved for pads in the die_cell in filled in pad's layer. @@ -703,7 +703,7 @@ def snspd_ntron( device_layer (int or array-like[2]): The layer where the device is placed. die_layer (int or array-like[2]): The layer where the die is placed. pad_layer (int or array-like[2]): The layer where the pads are placed. - text (string, optional): If None, text = f'SNSPD {w_choke}'. + text (string, optional): If None, the text is f"w={w_snspd}, {w_choke}". fill_pad_layer (bool): If True, the space reserved for pads in the die_cell in filled in pad's layer. diff --git a/src/qnngds/design.py b/src/qnngds/design.py index 53dbe51..69360fa 100644 --- a/src/qnngds/design.py +++ b/src/qnngds/design.py @@ -513,7 +513,7 @@ def alignment_cell( Parameters: layers_to_align (List[int]): Layers to align. - text (str): The text of the cell is f"ALIGN {text}". + text (str, optional): If None, the text is f"lay={layers_to_align}". Returns: Device: A device that centers the alignment marks in an n*m unit cell. @@ -538,7 +538,7 @@ def vdp_cell( Parameters: layers_to_probe (List[int]): The layers on which to place the VDP structure. layers_to_outline (List[int]): Among the VDP layers, the ones for which structure must not be filled but outlined. - text (str, optional): If None, the text is f"VDP \n{layers_to_probe}". Otherwise, f"VDP \n{text}". + text (str, optional): If None, the text is f"lay={layers_to_probe}". Returns: Device: The created device. @@ -566,7 +566,7 @@ def etch_test_cell( Parameters: layers_to_etch (List[List[int]]): Each element of the list corresponds to one test point, to put on the list of layers specified. Example: [[1, 2], [1], [2]]. - text (str, optional): If None, the cell text is f"ETCH TEST {layers_to_etch}". + text (str, optional): If None, the text is f"lay={layers_to_etch}". Returns: Device: A device (with size n*m of unit cells) with etch tests in its center. @@ -601,7 +601,7 @@ def resolution_test_cell( Parameters: layer_to_resolve (int): The layer to put the resolution test on. resolutions_to_test (List[float]): The resolutions to test in µm. - text (str, optional): If None, the text is f"RES TEST \n{layer_to_resolve}". + text (str, optional): If None, the text is f"lay={layer_to_resolve}". Returns: Device: The created device. @@ -629,7 +629,7 @@ def nanowires_cell( Parameters: channels_sources_w (List[Tuple[float, float]]): The list of (channel_w, source_w) of the nanowires to create. - text (str, optional): If None, the text is "NWIRES". + text (str, optional): If None, the text is f"w={channels_w}". Returns: Device: A device containing the nanowires, the border of the die @@ -674,7 +674,7 @@ def ntron_cell( source_w (int or float, optional): If None, source width is 3 times the channel width. drain_w (int or float, optional): If None, drain width is 3 times the channel width. choke_shift (int or float, optional): If None, choke shift is -3 times the channel width. - text (str, optional): If None, the text is f"chk: {choke_w} /n chnl: {channel_w}". + text (str, optional): If None, the text is f"chk: {choke_w} \nchnl: {channel_w}". Returns: Device: A device containing the ntron, the border of the die (created with die_cell function), @@ -716,7 +716,7 @@ def snspd_cell( snspd_pitch (float): Pitch of the nanowire. snspd_size (tuple of int or float): Size of the detector in squares (width, height). snspd_num_squares (Optional[int]): Number of squares in the detector. - text (string, optional): If None, text = f'SNSPD {w_choke}'. + text (string, optional): If None, the text is f"w={snspd_width}". Returns: Device: A cell (of size n*m unit die_cells) containing the SNSPD. @@ -752,7 +752,7 @@ def snspd_ntron_cell( Parameters: w_choke (int or float): The width of the NTRON choke in µm. w_snspd (int or float, optional): The width of the SNSPD nanowire in µm. If None, scaled to 5*w_choke. - text (str, optional): If None, text = f'SNSPD {w_choke}'. + text (string, optional): If None, the text is f"w={w_snspd}, {w_choke}". Returns: Device: A cell containing a die in die_layer, pads in pad layer, and an SNSPD-NTRON properly routed in the device layer.