Skip to content

Commit 139db61

Browse files
committed
small update
1 parent 51fea3e commit 139db61

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

PyOptik/material/sellmeier_class.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def __repr__(self) -> str:
5151
return self.__str__()
5252

5353
def __str__(self) -> str:
54-
return self.filename
54+
return self.filename + '[Sellmeier]'
5555

5656
def _load_coefficients(self) -> None:
5757
"""

PyOptik/material/tabulated_class.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def __repr__(self) -> str:
5353
return self.__str__()
5454

5555
def __str__(self) -> str:
56-
return self.filename
56+
return self.filename + '[Tabulated]'
5757

5858
def _load_tabulated_data(self) -> None:
5959
"""

PyOptik/material_bank.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,11 @@ def all(self) -> List[str]:
186186
"""
187187
return self.sellmeier + self.tabulated
188188

189+
def __iter__(self):
190+
"""Iterator over all available material names."""
191+
for material in self.all:
192+
yield material
193+
189194
def print_available(self) -> None:
190195
"""Display all available materials in a table.
191196
@@ -521,3 +526,4 @@ def create_tabulated_file(
521526

522527

523528
MaterialBank = _MaterialBank()
529+

0 commit comments

Comments
 (0)