@@ -251,13 +251,13 @@ def Update_halfring_CML(device,CML,sparam_file,gap,rad,width,thickness,CoupleLen
251
251
CML (str): The CML library to add the sparam file to. ex: EBeam
252
252
sparam_file (str): The name/path of the sparam file you are adding to the CML
253
253
gap (int): The halfring coupling gap in nanometers
254
- rad (int): The halfring radius in microns
254
+ rad (int): The halfring radius in nanometers
255
255
width (int): The halfring waveguide width in nanometers
256
256
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
258
258
259
259
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 )
261
261
"""
262
262
263
263
# Ensure sparam_file contains .dat
@@ -268,11 +268,7 @@ def Update_halfring_CML(device,CML,sparam_file,gap,rad,width,thickness,CoupleLen
268
268
269
269
for prm in to_check :
270
270
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__ } ." )
276
272
277
273
# Query Lumerical INTERCONNECT to find the path for the specific design kit
278
274
intc = lumapi .open ('interconnect' )
@@ -298,7 +294,7 @@ def Update_halfring_CML(device,CML,sparam_file,gap,rad,width,thickness,CoupleLen
298
294
CML_path = lumapi .getVar (intc , "path" )
299
295
300
296
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"
302
298
destination = os .path .join (path_halfring , filename )
303
299
print (destination )
304
300
0 commit comments