Skip to content

Commit

Permalink
remove redundant phase from shifted source in smatrix
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerflex committed Jul 27, 2023
1 parent 170cb35 commit 6b46e6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

### Fixed
- Redundant phase compensation for shifted source in smatrix plugin.

## [2.3.2] - 2023-7-21

Expand Down
9 changes: 2 additions & 7 deletions tidy3d/plugins/smatrix/smatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,14 +368,9 @@ def _normalization_factor(self, port_source: Port, sim_data: SimulationData) ->
f=self.freqs,
direction=port_source.direction,
mode_index=mode_index,
).values

normalize_n_eff = port_monitor_data.n_eff.sel(f=self.freqs, mode_index=mode_index).values
)

k0s = 2 * np.pi * C_0 / np.array(self.freqs)
k_effs = k0s * normalize_n_eff
shift_value = self._shift_value_signed(port=port_source)
return normalize_amps * np.exp(1j * k_effs * shift_value)
return normalize_amps.values

@cached_property
def max_mode_index(self) -> Tuple[int, int]:
Expand Down

0 comments on commit 6b46e6c

Please sign in to comment.