diff --git a/history.md b/history.md index a37a849..c2c8dd0 100644 --- a/history.md +++ b/history.md @@ -233,5 +233,5 @@ ### Version 0.5.6 (Aug 25, 2024) * Defining material with float refractive index enabled for FDTDSimulation.add_structure_from_gdsii(). -### Version 0.5.7 (Sep 4, 2024) +### Version 0.5.8 (Sep 4, 2024) * New pixelated region class: CirclePixelsRegionwithGroup. \ No newline at end of file diff --git a/splayout/__init__.py b/splayout/__init__.py index cdc578b..4766171 100644 --- a/splayout/__init__.py +++ b/splayout/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.5.7" +__version__ = "0.5.8" ## Submodules from . import utils diff --git a/splayout/components/pixelsregion.py b/splayout/components/pixelsregion.py index 7dcb5c7..da8b819 100644 --- a/splayout/components/pixelsregion.py +++ b/splayout/components/pixelsregion.py @@ -230,6 +230,8 @@ class CirclePixelsRegionwithGroup: def __init__(self, bottom_left_corner_point, top_right_corner_point, pixel_radius, fdtd_engine, material=SiO2, z_start=-0.11, z_end=0.11 , group_name = "pixels", matrix_mask = None, relaxing_time = 0): self.bottom_left_corner_point = tuple_to_point(bottom_left_corner_point) self.top_right_corner_point = tuple_to_point(top_right_corner_point) + self.left_down_point = self.bottom_left_corner_point + self.right_up_point = self.top_right_corner_point self.pixel_radius = pixel_radius self.__last_array = None self.__lastest_array = None @@ -253,6 +255,9 @@ def __initialize(self): self.fdtd_engine.eval("addstructuregroup;") self.fdtd_engine.eval("set(\"name\", \""+self.group_name+"\");") + self.fdtd_engine.eval("set(\"x\", 0);") + self.fdtd_engine.eval("set(\"y\", 0);") + self.fdtd_engine.eval("set(\"z\", 0);") self.fdtd_engine.fdtd.putv("radius_matrix", self.__lastest_array) self.fdtd_engine.fdtd.putv("pixel_radius", self.pixel_radius) self.fdtd_engine.fdtd.putv("z_start", self.z_start)