Skip to content

Commit

Permalink
updated dataprep specs for new method
Browse files Browse the repository at this point in the history
  • Loading branch information
atait committed Jun 21, 2019
1 parent 455ebea commit f0f1017
Show file tree
Hide file tree
Showing 6 changed files with 350 additions and 99 deletions.
11 changes: 8 additions & 3 deletions lymask/steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,20 +183,25 @@ def mask_map(cell, clear_others=False, **kwargs):
There is a problem if you have 101 defined in your file and then another layer that is not defined.
'''
mask_layer_index = 101
assert_valid_mask_map(kwargs)
# If we need to make new layers,
new_mask_index = 0
available_mask_layers = list(range(100, 200))
for occupied_layer in lys.values():
if occupied_layer.layer in available_mask_layers:
available_mask_layers.remove(occupied_layer.layer)
# merging and moving to new layers
for dest_layer, src_expression in kwargs.items():
if not dest_layer in lys.keys():
new_layinfo = pya.LayerInfo(mask_layer_index, 0, dest_layer)
new_layinfo = pya.LayerInfo(available_mask_layers[new_mask_index], 0, dest_layer)
lys[dest_layer] = new_layinfo
cell.layout().layer(new_layinfo)

components = src_expression.split('+')
for comp in components:
comp_lay_info = lys[comp.strip()]
cell.copy(comp_lay_info, lys[dest_layer])
mask_layer_index += 1
new_mask_index += 1

if clear_others:
for any_layer in lys.keys():
Expand Down
Binary file modified tests/1_answer.oas
Binary file not shown.
Binary file modified tests/1_src.oas
Binary file not shown.
3 changes: 2 additions & 1 deletion tests/tech/example_tech/dataprep/bad_masks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
- - nw_sleeve
- Delta: 'not a float' # This will cause a TypeError if it runs, so the test will fail
- - mask_map
- mask_nw_ebeam: m2_nw_ebeam + not_in_lyp
- a_new_layer: m2_nw # This should not error
- mask_nw_ebeam: m2_nw + not_in_lyp
...
Loading

0 comments on commit f0f1017

Please sign in to comment.