Skip to content

Commit

Permalink
Add assert statements to catch undefined components in system functio…
Browse files Browse the repository at this point in the history
…n calls #95
  • Loading branch information
abeerfatima authored Jun 11, 2022
1 parent fd67b33 commit 1f2c3e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion payload_designer/components/masks.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ def __init__(self, mass=None, diameter=None, thickness=None, size: tuple = None)

def get_area(self):
"""Get the clear aperture slit area."""

assert self.size is not None, "Size must be specified."

area = self.size[0] * self.size[1]

return area

0 comments on commit 1f2c3e1

Please sign in to comment.