Skip to content

Commit 8435c13

Browse files
committed
v0.3.7
1 parent bb8dbf3 commit 8435c13

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

gds_fdtd/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
__author__ = """Mustafa Hammood"""
55
__email__ = "mustafa@siepic.com"
6-
__version__ = "0.3.6"
6+
__version__ = "0.3.7"

gds_fdtd/lum_tools.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -251,13 +251,13 @@ def Update_halfring_CML(device,CML,sparam_file,gap,rad,width,thickness,CoupleLen
251251
CML (str): The CML library to add the sparam file to. ex: EBeam
252252
sparam_file (str): The name/path of the sparam file you are adding to the CML
253253
gap (int): The halfring coupling gap in nanometers
254-
rad (int): The halfring radius in microns
254+
rad (int): The halfring radius in nanometers
255255
width (int): The halfring waveguide width in nanometers
256256
thickness (int): The halfring waveguide thickness in nanometers
257-
CoupleLength (int): The halfring coupler length in microns
257+
CoupleLength (int): The halfring coupler length in nanometers
258258
259259
Example:
260-
Update_halfring_CML("ebeam_dc_halfring_straight","EBeam","sparams.dat",gap=2,rad=20,width=2,thickness=220,CoupleLength=2)
260+
Update_halfring_CML("ebeam_dc_halfring_straight","EBeam","sparams.dat",gap=2,rad=20000,width=2,thickness=220,CoupleLength=2000)
261261
"""
262262

263263
# Ensure sparam_file contains .dat
@@ -268,11 +268,7 @@ def Update_halfring_CML(device,CML,sparam_file,gap,rad,width,thickness,CoupleLen
268268

269269
for prm in to_check:
270270
if not isinstance(prm, int):
271-
if prm in [rad,CoupleLength]:
272-
raise TypeError(f"Parameter '{prm}' must be an integer (in microns), got {type(prm).__name__}.")
273-
else:
274-
if prm in [rad,CoupleLength]:
275-
raise TypeError(f"Parameter '{prm}' must be an integer (in nanometers), got {type(prm).__name__}.")
271+
raise TypeError(f"Parameter '{prm}' must be an integer (in nanometers), got {type(prm).__name__}.")
276272

277273
# Query Lumerical INTERCONNECT to find the path for the specific design kit
278274
intc = lumapi.open('interconnect')
@@ -298,7 +294,7 @@ def Update_halfring_CML(device,CML,sparam_file,gap,rad,width,thickness,CoupleLen
298294
CML_path = lumapi.getVar(intc, "path")
299295

300296
path_halfring = os.path.join(CML_path, 'source_data/' + device)
301-
filename = f"te_ebeam_dc_halfring_straight_gap={gap}nm_radius={rad}um_width={width}nm_thickness={thickness}nm_CoupleLength={CoupleLength}um.dat"
297+
filename = f"te_ebeam_dc_halfring_straight_gap={gap}nm_radius={rad}nm_width={width}nm_thickness={thickness}nm_CoupleLength={CoupleLength}nm.dat"
302298
destination = os.path.join(path_halfring, filename)
303299
print(destination)
304300

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ build-backend = "flit_core.buildapi"
88
# ────────────────────────── project meta ─────────────────────────
99
[project]
1010
name = "gds_fdtd"
11-
version = "0.3.6"
11+
version = "0.3.7"
1212
description = "Minimalist utilities for photonic FDTD workflows."
1313
authors = [{ name = "Mustafa Hammood", email = "mustafa@siepic.com" }]
1414
license = { text = "MIT" }

0 commit comments

Comments
 (0)