Test writing to gds in ellip_grating
This commit is contained in:
parent
b7b0da7432
commit
bc5d4f62d8
@ -3,11 +3,12 @@
|
|||||||
import numpy
|
import numpy
|
||||||
|
|
||||||
import masque
|
import masque
|
||||||
|
import masque.file.gdsii
|
||||||
from masque import shapes
|
from masque import shapes
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
pat = masque.Pattern()
|
pat = masque.Pattern(name='ellip_grating')
|
||||||
for rmin in numpy.arange(10, 15, 0.5):
|
for rmin in numpy.arange(10, 15, 0.5):
|
||||||
pat.shapes.append(shapes.Arc(
|
pat.shapes.append(shapes.Arc(
|
||||||
radii=(rmin, rmin),
|
radii=(rmin, rmin),
|
||||||
@ -15,7 +16,12 @@ def main():
|
|||||||
angles=(-numpy.pi/4, numpy.pi/4)
|
angles=(-numpy.pi/4, numpy.pi/4)
|
||||||
))
|
))
|
||||||
|
|
||||||
|
pat.scale_by(1000)
|
||||||
pat.visualize()
|
pat.visualize()
|
||||||
|
pat2 = pat.copy()
|
||||||
|
pat2.name = 'grating2'
|
||||||
|
|
||||||
|
masque.file.gdsii.write_dose2dtype((pat, pat2), 'out.gds', 1e-9, 1e-3)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
Reference in New Issue
Block a user