Pin
pin
DPin
Bases: ProtoPin[float]
Source code in kfactory/pin.py
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | |
__getitem__
__getitem__(key: int | str | None) -> DPort
Get a port in the pin by index or name.
Source code in kfactory/pin.py
188 189 190 191 192 193 194 195 196 197 198 199 200 201 | |
copy
copy(
trans: Trans | DCplxTrans = kdb.Trans.R0,
post_trans: Trans | DCplxTrans = kdb.Trans.R0,
) -> DPin
Get a copy of a pin.
Transformation order which results in copy.trans:
- Trans: trans * pin.trans * post_trans
- DCplxTrans: trans * pin.dcplx_trans * post_trans
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trans
|
Trans | DCplxTrans
|
an optional transformation applied to the pin to be copied. |
R0
|
post_trans
|
Trans | DCplxTrans
|
transformation to apply to the pin after copying. |
R0
|
Returns:
| Name | Type | Description |
|---|---|---|
pin |
DPin
|
a copy of the pin |
Source code in kfactory/pin.py
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | |
Pin
Bases: ProtoPin[int]
Source code in kfactory/pin.py
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | |
__getitem__
__getitem__(key: int | str | None) -> Port
Get a port in the pin by index or name.
Source code in kfactory/pin.py
143 144 145 146 147 148 149 150 151 152 153 154 155 156 | |
copy
copy(
trans: Trans | DCplxTrans = kdb.Trans.R0,
post_trans: Trans | DCplxTrans = kdb.Trans.R0,
) -> Pin
Get a copy of a pin.
Transformation order which results in copy.trans:
- Trans: trans * pin.trans * post_trans
- DCplxTrans: trans * pin.dcplx_trans * post_trans
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trans
|
Trans | DCplxTrans
|
an optional transformation applied to the pin to be copied. |
R0
|
post_trans
|
Trans | DCplxTrans
|
transformation to apply to the pin after copying. |
R0
|
Returns:
| Name | Type | Description |
|---|---|---|
pin |
Pin
|
a copy of the pin |
Source code in kfactory/pin.py
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | |
ProtoPin
Bases: ABC
Base class for kf.Pin, kf.DPin.
Source code in kfactory/pin.py
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | |
base
property
base: BasePin
Get the BasePin associated with this Pin.
info
property
writable
info: Info
Additional info about the pin.
kcl
property
writable
kcl: KCLayout
KCLayout associated to the pin.
name
property
writable
name: str | None
Name of the pin.
pin_type
property
writable
pin_type: str
Type of the pin.
__getitem__
abstractmethod
__getitem__(key: int | str | None) -> ProtoPort[T]
Get a port in the pin by index or name.
Source code in kfactory/pin.py
127 128 129 130 | |
__repr__
__repr__() -> str
String representation of pin.
Source code in kfactory/pin.py
120 121 122 123 124 125 | |
copy
abstractmethod
copy(
trans: Trans | DCplxTrans = kdb.Trans.R0,
post_trans: Trans | DCplxTrans = kdb.Trans.R0,
) -> ProtoPin[T]
Copy the port with a transformation.
Source code in kfactory/pin.py
132 133 134 135 136 137 138 139 | |
to_dtype
to_dtype() -> DPin
Convert the pin to a um pin.
Source code in kfactory/pin.py
116 117 118 | |
to_itype
to_itype() -> Pin
Convert the pin to a dbu pin.
Source code in kfactory/pin.py
112 113 114 | |
filter_regex
filter_regex(
pins: Iterable[TPin], regex: str
) -> filter[TPin]
Filter iterable/sequence of pins by port name.
Source code in kfactory/pin.py
245 246 247 248 249 250 251 252 253 254 | |
filter_type
filter_type(
pins: Iterable[TPin], pin_type: str
) -> filter[TPin]
Filter iterable/sequence of pins by port_type.
Source code in kfactory/pin.py
257 258 259 260 261 262 263 | |