Skip to content

Commit f87b392

Browse files
Gregory Robertsgroberts-flex
authored andcommitted
fix[adjoint]: remove pulse amplitude and phase when using the simulation forward source time as broadband adjoint pulse
1 parent e1ad97e commit f87b392

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2626
### Fixed
2727
- Fixed issue with `CustomMedium` gradients where other frequencies would wrongly contribute to the gradient.
2828
- Fixed bug when computing `PolySlab` bounds in plotting functions.
29+
- Fixed bug in broadband adjoint source creation when forward simulation had a pulse amplitude greater than 1 or a nonzero pulse phase.
2930

3031
## [2.8.3] - 2025-04-24
3132

tidy3d/components/data/sim_data.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,9 @@ def _make_broadband_source(self, adj_srcs: list[SourceType]) -> SourceType:
11881188
"""Make a broadband source for a set of adjoint sources."""
11891189

11901190
source_index = self.simulation.normalize_index or 0
1191-
src_time_base = self.simulation.sources[source_index].source_time.copy()
1191+
src_time_base = self.simulation.sources[source_index].source_time.updated_copy(
1192+
amplitude=1.0, phase=0.0
1193+
)
11921194
src_broadband = adj_srcs[0].updated_copy(source_time=src_time_base)
11931195

11941196
return src_broadband

0 commit comments

Comments
 (0)