Skip to content

Commit

Permalink
fix notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
joamatab committed Aug 7, 2023
1 parent f1899c4 commit 4dbc18b
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 5 deletions.
14 changes: 9 additions & 5 deletions docs/notebooks/11_sparameters_gratings.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,25 +68,29 @@ def log(x):
fiber_xoffset=fiber_xoffset,
dirpath=PATH.sparameters,
filepath=PATH.sparameters
/ f"{c.name}_{fiber_angle_deg:.1f}deg_{fiber_xoffset:.1f}um.npz",
/ f"gc_{fiber_angle_deg:.1f}deg_{fiber_xoffset:.1f}um.npz",
)
for fiber_xoffset in offsets
]
sps = gt.write_sparameters_grating_coupler_batch(jobs)

# %%
for offset in offsets:
sps[0].result()

# %%
for fiber_xoffset in offsets:
sp = gt.write_sparameters_grating_coupler(
c,
is_3d=False,
fiber_angle_deg=fiber_angle_deg,
fiber_xoffset=offset,
filepath=PATH.sparameters / f"gc_{offset}.npz",
fiber_xoffset=fiber_xoffset,
filepath=PATH.sparameters
/ f"gc_{fiber_angle_deg:.1f}deg_{fiber_xoffset:.1f}um.npz",
)
plt.plot(
sp["wavelengths"],
20 * np.log10(np.abs(sp["o2@0,o1@0"])),
label=str(offset),
label=str(fiber_xoffset),
)

plt.xlabel("wavelength (um")
Expand Down
Binary file added sparameters/gc_-31.0deg_-5.0um.npz
Binary file not shown.
5 changes: 5 additions & 0 deletions sparameters/gc_-31.0deg_-5.0um.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
compute_time_minutes: 1.767
compute_time_seconds: 106.031
fiber_angle_deg: -31
fiber_xoffset: -5
is_3d: false
Binary file added sparameters/gc_-31.0deg_0.0um.npz
Binary file not shown.
5 changes: 5 additions & 0 deletions sparameters/gc_-31.0deg_0.0um.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
compute_time_minutes: 0.013
compute_time_seconds: 0.788
fiber_angle_deg: -31
fiber_xoffset: 0
is_3d: false
Binary file added sparameters/gc_-31.0deg_5.0um.npz
Binary file not shown.
5 changes: 5 additions & 0 deletions sparameters/gc_-31.0deg_5.0um.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
compute_time_minutes: 1.78
compute_time_seconds: 106.797
fiber_angle_deg: -31
fiber_xoffset: 5
is_3d: false
Binary file added sparameters/gc_te1550.npz
Binary file not shown.
5 changes: 5 additions & 0 deletions sparameters/gc_te1550.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
compute_time_minutes: 1.655
compute_time_seconds: 99.291
fiber_angle_deg: -31
fiber_xoffset: 0
is_3d: false

0 comments on commit 4dbc18b

Please sign in to comment.