From 94e8dc9e7792358e4539eaa18b43017c8b1496fc Mon Sep 17 00:00:00 2001 From: kdotom Date: Fri, 20 Oct 2023 09:21:46 -0400 Subject: [PATCH] Update get_material.py if meep medium is directly input into get_material, return meep medium --- gplugins/gmeep/get_material.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gplugins/gmeep/get_material.py b/gplugins/gmeep/get_material.py index 4b25655b..2279fd7a 100644 --- a/gplugins/gmeep/get_material.py +++ b/gplugins/gmeep/get_material.py @@ -63,6 +63,9 @@ def get_material( n=np.real(meep_name), k=np.imag(meep_name), wavelength=wavelength ), ) + elif isinstance(meep_name, mp.geom.Medium): + # if meep medium is directly input, return meep medium + return meep_name material = getattr(mat, meep_name)