Skip to content

Commit 00fc024

Browse files
committed
improve display of mutliplexed scattered fields
1 parent 427c111 commit 00fc024

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

mcsim/analysis/tomography.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1696,7 +1696,6 @@ def recon(efields_ft,
16961696
dims = tuple(range(nextra_dims))
16971697
nimgs, ny, nx = efields_ft.shape[-3:]
16981698

1699-
# nmax_multiplex = np.max([len(f) for f in beam_frqs])
17001699
nmax_multiplex = beam_frqs.shape[0]
17011700

17021701
if isinstance(efields_ft, dask.array.Array):
@@ -3267,7 +3266,7 @@ def display_tomography_recon(location: Union[str, Path, zarr.hierarchy.Group],
32673266
# ######################
32683267
if show_scattered_fields and hasattr(img_z, "escatt"):
32693268
print('loading escatt')
3270-
escatt = da.expand_dims(da.from_zarr(img_z.escatt)[slices], axis=-3)
3269+
escatt = da.from_zarr(img_z.escatt)[slices]
32713270
escatt_real = da.real(escatt)
32723271
escatt_imag = da.imag(escatt)
32733272
else:
@@ -3279,10 +3278,10 @@ def display_tomography_recon(location: Union[str, Path, zarr.hierarchy.Group],
32793278
escatt_real, escatt_imag = dask.compute([escatt_real, escatt_imag])[0]
32803279

32813280
# this can be a different size due to multiplexing
3282-
bcast_root_scatt = (1,) * n_extra_dims + (1, nz, 1, 1)
3283-
bcast_shape_scatt = np.broadcast_shapes(escatt_real.shape, bcast_root_scatt)
3284-
escatt_real = np.broadcast_to(escatt_real, bcast_shape_scatt)
3285-
escatt_imag = np.broadcast_to(escatt_imag, bcast_shape_scatt)
3281+
#bcast_root_scatt = (1,) * n_extra_dims + (1, 1, 1, 1)
3282+
#bcast_shape_scatt = np.broadcast_shapes(escatt_real.shape, bcast_root_scatt)
3283+
#escatt_real = np.broadcast_to(escatt_real, bcast_shape_scatt)
3284+
#escatt_imag = np.broadcast_to(escatt_imag, bcast_shape_scatt)
32863285

32873286
# ######################
32883287
# simulated forward fields

0 commit comments

Comments
 (0)