Skip to content

Commit

Permalink
Fixed loss in ideal.waveguide
Browse files Browse the repository at this point in the history
  • Loading branch information
parkeraa committed Mar 21, 2024
1 parent e7409a0 commit 5710ac8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

---

## [0.7.1](https://github.com/BYUCamachoLab/simphony/tree/v0.7.0) - <small>2024-01-09</small>
## [0.7.2](https://github.com/BYUCamachoLab/simphony/tree/v0.7.2) - <small>2024-01-09</small>

Minor bug fixes.

### Fixed
- Bug in loss of waveguide in ideal library was fixed.

---

## [0.7.1](https://github.com/BYUCamachoLab/simphony/tree/v0.7.1) - <small>2024-01-09</small>

Minor bug fixes.

Expand Down
5 changes: 4 additions & 1 deletion simphony/libraries/ideal.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ def waveguide(
dneff_dwl = (ng - neff) / wl0
_neff = neff - dwl * dneff_dwl
phase = 2 * jnp.pi * _neff * length / wl
amplitude = jnp.asarray(10 ** (-loss * length / 20), dtype=complex)
# amplitude = jnp.asarray(10 ** (-loss * length / 20), dtype=complex)
loss_mag = loss / (10 * jnp.log10(jnp.exp(1)))
alpha = loss_mag * 1e-4
amplitude = jnp.asarray(jnp.exp(-alpha * length / 2), dtype=complex)
transmission = amplitude * jnp.exp(1j * phase)
sdict = sax.reciprocal(
{
Expand Down

0 comments on commit 5710ac8

Please sign in to comment.