mnflow.mfda.cad.dld.theme.multistage.DLD

class mnflow.mfda.cad.dld.theme.multistage.DLD(num_stage=None, opt_multi_inlet=None, opt_filter=None, opt_preload=None, opt_collection=None, offset=None, config_multi_inlet=None, config=None, config_stages=None, verbose=None, opt_process_upon_init=None, opt_write_upon_init=None, opt_save_image=None, opt_enable_infer_width=None, opt_enable_infer_sidewall_width=None, top_cell_name=None, *args, **kwargs)

A DLD system with a multistage theme.

Constructor

Parameters

Overall config

num_stageint, optional

Number of stages; it can also be inferred automatically if other provided params are sufficient, by default None

opt_multi_inletbool, optional

Whether to include a multi-inlet upstream of system, can be configured to serve as a single-inlet as well, by default None

opt_filterbool, optional

Whether to include a filter in upstream of the overall structure, by default None

opt_preloadbool, optional

Whether to include a preload in upstream of the overall structure, by default None

opt_collectionbool, optional

Whether to include a collection component in downstream of the overall structure, by default None

offsetlist/tuple, optional

Offset of stage when snapping to upstream neighboring stage, by default None

Multi_inlet

config_multi_inletdict, optional

Config of multi-inlet component, by default None

Homogeneous configs of stages

configdict, optional

Mainly for configurations to be applied to all stages homogeneously; yet, list of values is also supported for many params (keys of dict) denoting that the param needs to be applied to all stages heterogeneously according to order of value in list, e.g., 'd_c':[5, 2] would be a valid key-value of dict for a two-stage system, wherein the upstreammost stage is supposed to have a critical diameter of \(5~\mu m\), appended by a stage with critical diameter of \(2~\mu m\), by default None.

Note:
  • This param is added solely for convenience of user; any configurations for each stage can be passed explicitly using config_stages. The config, however, can make it more convenient to assign a set of similar configs to all stages instead of writing them separately for each stage.

  • Homogeneous assignment of a param to stage(s) is done only when the param is NOT available in corresponding stage(s) of config_stages.

Heterogeneously configs of stages

config_stageslist, optional

List of dict, wherein each dict contains configs of one stage, by default None

Internal config

verbosebool, optional

verbose, by default None

opt_process_upon_initbool, optional

Whether to invoke the process method from inside the constructor to design the system, by default True

opt_write_upon_initbool, optional

Whether to invoke the write method from inside the constructor to write the GDS/DXF layout file, by default None

opt_save_imagebool, optional

Whether to invoke the save_image method from inside the constructor to save layout as png file(s), by default None

opt_enable_infer_widthbool, optional

Whether to enable automatic inference of stages widths, enables inference when Nw and width are not provided for a stage. by default None

opt_enable_infer_sidewall_widthbool, optional

Whether to enable automatic inference of stages sidewall widths, enables inference when sidewall_width is not provided for a stage, by default None

top_cell_namestr

Name of top cell to be created as needed.

__init__(num_stage=None, opt_multi_inlet=None, opt_filter=None, opt_preload=None, opt_collection=None, offset=None, config_multi_inlet=None, config=None, config_stages=None, verbose=None, opt_process_upon_init=None, opt_write_upon_init=None, opt_save_image=None, opt_enable_infer_width=None, opt_enable_infer_sidewall_width=None, top_cell_name=None, *args, **kwargs)

Constructor

Parameters

Overall config

num_stageint, optional

Number of stages; it can also be inferred automatically if other provided params are sufficient, by default None

opt_multi_inletbool, optional

Whether to include a multi-inlet upstream of system, can be configured to serve as a single-inlet as well, by default None

opt_filterbool, optional

Whether to include a filter in upstream of the overall structure, by default None

opt_preloadbool, optional

Whether to include a preload in upstream of the overall structure, by default None

opt_collectionbool, optional

Whether to include a collection component in downstream of the overall structure, by default None

offsetlist/tuple, optional

Offset of stage when snapping to upstream neighboring stage, by default None

Multi_inlet

config_multi_inletdict, optional

Config of multi-inlet component, by default None

Homogeneous configs of stages

configdict, optional

Mainly for configurations to be applied to all stages homogeneously; yet, list of values is also supported for many params (keys of dict) denoting that the param needs to be applied to all stages heterogeneously according to order of value in list, e.g., 'd_c':[5, 2] would be a valid key-value of dict for a two-stage system, wherein the upstreammost stage is supposed to have a critical diameter of \(5~\mu m\), appended by a stage with critical diameter of \(2~\mu m\), by default None.

Note:
  • This param is added solely for convenience of user; any configurations for each stage can be passed explicitly using config_stages. The config, however, can make it more convenient to assign a set of similar configs to all stages instead of writing them separately for each stage.

  • Homogeneous assignment of a param to stage(s) is done only when the param is NOT available in corresponding stage(s) of config_stages.

Heterogeneously configs of stages

config_stageslist, optional

List of dict, wherein each dict contains configs of one stage, by default None

Internal config

verbosebool, optional

verbose, by default None

opt_process_upon_initbool, optional

Whether to invoke the process method from inside the constructor to design the system, by default True

opt_write_upon_initbool, optional

Whether to invoke the write method from inside the constructor to write the GDS/DXF layout file, by default None

opt_save_imagebool, optional

Whether to invoke the save_image method from inside the constructor to save layout as png file(s), by default None

opt_enable_infer_widthbool, optional

Whether to enable automatic inference of stages widths, enables inference when Nw and width are not provided for a stage. by default None

opt_enable_infer_sidewall_widthbool, optional

Whether to enable automatic inference of stages sidewall widths, enables inference when sidewall_width is not provided for a stage, by default None

top_cell_namestr

Name of top cell to be created as needed.

Methods

__init__([num_stage, opt_multi_inlet, ...])

Constructor

add([element, snap_direction, p1, p2, ...])

Add/Snap an element or a cell from another layout to a cell of layout of this element.

add_pad(width, snap_direction[, layer])

Add a pad to layout.

clip([cell, clip_nondim, clip_dim, layer, ...])

Clipping a cell.

find_widest_stage_box(config_stages, ...)

Finds the stage with widest bounding box.

find_widest_stage_inlet(config_stages, ...)

Finds the stage with widest inlet.

get_die_info()

Returning the die information.

get_merged_config(config_default, config)

Merges (with override) config into config_default and returns merged config and config_auto containing configs determined automatically for core.DLD and block.DLD.

infer_count_stage(*arg)

Infer count of stages from provided arguments.

infer_sidewall_width(config_stages, ...)

Infer sidewall width of stages from provided arguments.

infer_width(config_stages, ...)

Infer width of stages from provided arguments.

load(fname)

Load and return object from a pickle file.

mirror_x()

Mirror layout around x axis.

mirror_y()

Mirror layout around y axis.

process(*args, **kwargs)

A method attribute to be overriden in child classes.

prune([cell_name, cell_index, cell])

Prune cells.

report(fname)

Prepare a report file from dictionary of attributes.

rotate(angle_deg)

Rotate layout

save(fname)

Pickle the object.

save_image([fname_cad, ...])

Save image (png) files from layout.

set_ll([target_ll])

Setting the lower left coordinates of system.

transform(t)

A generic transformation.

write([fname])

Write the layout file in gds/dxf format.

Attributes

LIST_TYPE_UNPICKLABLE

invalid_types_for_num_stage_inference

keys_in_config_that_always_applied_homogeneously