From 8fe8bbd655a86c2091a813fb8b27ecf07add2650 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Sat, 20 Apr 2019 14:18:52 -0700 Subject: [PATCH] Normalization-related fixes --- masque/shapes/arc.py | 4 ++-- masque/shapes/shape.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/masque/shapes/arc.py b/masque/shapes/arc.py index c468564..bb2da3a 100644 --- a/masque/shapes/arc.py +++ b/masque/shapes/arc.py @@ -307,9 +307,9 @@ class Arc(Shape): rotation %= 2 * pi width = self.width - return (type(self), radii, angles, width, self.layer), \ + return (type(self), radii, angles, width/norm_value, self.layer), \ (self.offset, scale/norm_value, rotation, self.dose), \ - lambda: Arc(radii=radii*norm_value, angles=angles, width=width, layer=self.layer) + lambda: Arc(radii=radii*norm_value, angles=angles, width=width*norm_value, layer=self.layer) def get_cap_edges(self) -> numpy.ndarray: ''' diff --git a/masque/shapes/shape.py b/masque/shapes/shape.py index 981e2ce..7e26c87 100644 --- a/masque/shapes/shape.py +++ b/masque/shapes/shape.py @@ -94,16 +94,16 @@ class Shape(metaclass=ABCMeta): Writes the shape in a standardized notation, with offset, scale, rotation, and dose information separated out from the remaining values. - :param norm_value: This value is used to normalize lengths intrinsic to teh shape; - eg. for a circle, the returned magnitude value will be (radius / norm_value), and + :param norm_value: This value is used to normalize lengths intrinsic to the shape; + eg. for a circle, the returned intrinsic radius value will be (radius / norm_value), and the returned callable will create a Circle(radius=norm_value, ...). This is useful when you find it important for quantities to remain in a certain range, eg. for GDSII where vertex locations are stored as integers. :return: The returned information takes the form of a 3-element tuple, (intrinsic, extrinsic, constructor). These are further broken down as: - extrinsic: ([x_offset, y_offset], scale, rotation, dose) intrinsic: A tuple of basic types containing all information about the instance that is not contained in 'extrinsic'. Usually, intrinsic[0] == type(self). + extrinsic: ([x_offset, y_offset], scale, rotation, dose) constructor: A callable (no arguments) which returns an instance of type(self) with internal state equivalent to 'intrinsic'. """