Skip to content

Commit

Permalink
meep-simulation: fix height calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
HelgeGehring committed Dec 29, 2020
1 parent e98e8bf commit 6ab5d73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gdshelpers/simulation/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ def init_sim(self, **kwargs):
:param kwargs: Parameters which are directly passed to Meep
"""
z_min = np.min([structure['z_min'] for structure in self.structures])
z_max = np.max([structure['z_max'] for structure in self.structures])
z_min = np.min([structure['z_min'] for structure in self.structures if structure['structure']])
z_max = np.max([structure['z_max'] for structure in self.structures if structure['structure']])

bounds = geometric_union((geometric_union(x['structure']) for x in self.structures)).bounds
size = np.array((bounds[2] - bounds[0], bounds[3] - bounds[1], (z_max - z_min)))
Expand Down

0 comments on commit 6ab5d73

Please sign in to comment.