remove use_dtype_as_dose arg

This commit is contained in:
Jan Petykiewicz 2020-08-15 18:20:04 -07:00
parent cbb5462fcb
commit 352c03c0ae

View File

@ -202,7 +202,6 @@ def readfile(filename: Union[str, pathlib.Path],
def read(stream: io.BufferedIOBase, def read(stream: io.BufferedIOBase,
use_dtype_as_dose: bool = False,
clean_vertices: bool = True, clean_vertices: bool = True,
) -> Tuple[Dict[str, Pattern], Dict[str, Any]]: ) -> Tuple[Dict[str, Pattern], Dict[str, Any]]:
""" """
@ -218,11 +217,6 @@ def read(stream: io.BufferedIOBase,
Args: Args:
stream: Stream to read from. stream: Stream to read from.
use_dtype_as_dose: If `False`, set each polygon's layer to `(gds_layer, gds_datatype)`.
If `True`, set the layer to `gds_layer` and the dose to `gds_datatype`.
Default `False`.
NOTE: This will be deprecated in the future in favor of
`pattern.apply(masque.file.utils.dtype2dose)`.
clean_vertices: If `True`, remove any redundant vertices when loading polygons. clean_vertices: If `True`, remove any redundant vertices when loading polygons.
The cleaning process removes any polygons with zero area or <3 vertices. The cleaning process removes any polygons with zero area or <3 vertices.
Default `True`. Default `True`.
@ -298,10 +292,6 @@ def read(stream: io.BufferedIOBase,
isinstance(element, gdsii.elements.ARef)): isinstance(element, gdsii.elements.ARef)):
pat.subpatterns.append(_ref_to_subpat(element)) pat.subpatterns.append(_ref_to_subpat(element))
if use_dtype_as_dose:
logger.warning('use_dtype_as_dose will be removed in the future!')
pat = dtype2dose(pat)
patterns.append(pat) patterns.append(pat)
# Create a dict of {pattern.name: pattern, ...}, then fix up all subpattern.pattern entries # Create a dict of {pattern.name: pattern, ...}, then fix up all subpattern.pattern entries