Skip to content

Commit 6e07d79

Browse files
committed
fix(FXC-4341): Doping visualization fix
- Fixes scene::plot_structures_porperty with property=doping when the doping is defined with SpatialDataArrays that don't have overlapping coordinates
1 parent 5f5f31a commit 6e07d79

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

docs/faq

docs/notebooks

Submodule notebooks updated 126 files

tidy3d/components/scene.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2158,7 +2158,11 @@ def _pcolormesh_shape_doping_box(
21582158
if not data_is_2d:
21592159
selector = {"xyz"[normal_axis_ind]: normal_position}
21602160
data_2D = doping.sel(**selector)
2161-
contrib = data_2D.interp(**struct_coords, method="nearest")
2161+
contrib = data_2D.interp(
2162+
**struct_coords,
2163+
method="nearest",
2164+
kwargs={"bounds_error": False, "fill_value": 0},
2165+
)
21622166
struct_doping[n] = struct_doping[n] + contrib
21632167
# Handle doping boxes
21642168
if isinstance(doping, tuple):

0 commit comments

Comments
 (0)