2017-04-19 18:55:44 -07:00
|
|
|
# Quick script for testing arcs
|
|
|
|
|
|
|
|
import numpy
|
|
|
|
|
|
|
|
import masque
|
2017-11-04 12:18:58 -07:00
|
|
|
import masque.file.gdsii
|
2017-04-19 18:55:44 -07:00
|
|
|
from masque import shapes
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
2017-11-04 12:18:58 -07:00
|
|
|
pat = masque.Pattern(name='ellip_grating')
|
2017-04-19 18:55:44 -07:00
|
|
|
for rmin in numpy.arange(10, 15, 0.5):
|
|
|
|
pat.shapes.append(shapes.Arc(
|
|
|
|
radii=(rmin, rmin),
|
|
|
|
width=0.1,
|
|
|
|
angles=(-numpy.pi/4, numpy.pi/4)
|
|
|
|
))
|
|
|
|
|
2017-11-04 12:18:58 -07:00
|
|
|
pat.scale_by(1000)
|
2017-04-19 18:55:44 -07:00
|
|
|
pat.visualize()
|
2017-11-04 12:18:58 -07:00
|
|
|
pat2 = pat.copy()
|
|
|
|
pat2.name = 'grating2'
|
|
|
|
|
|
|
|
masque.file.gdsii.write_dose2dtype((pat, pat2), 'out.gds', 1e-9, 1e-3)
|
2017-04-19 18:55:44 -07:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|