@@ -1696,7 +1696,6 @@ def recon(efields_ft,
1696
1696
dims = tuple (range (nextra_dims ))
1697
1697
nimgs , ny , nx = efields_ft .shape [- 3 :]
1698
1698
1699
- # nmax_multiplex = np.max([len(f) for f in beam_frqs])
1700
1699
nmax_multiplex = beam_frqs .shape [0 ]
1701
1700
1702
1701
if isinstance (efields_ft , dask .array .Array ):
@@ -3267,7 +3266,7 @@ def display_tomography_recon(location: Union[str, Path, zarr.hierarchy.Group],
3267
3266
# ######################
3268
3267
if show_scattered_fields and hasattr (img_z , "escatt" ):
3269
3268
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 ]
3271
3270
escatt_real = da .real (escatt )
3272
3271
escatt_imag = da .imag (escatt )
3273
3272
else :
@@ -3279,10 +3278,10 @@ def display_tomography_recon(location: Union[str, Path, zarr.hierarchy.Group],
3279
3278
escatt_real , escatt_imag = dask .compute ([escatt_real , escatt_imag ])[0 ]
3280
3279
3281
3280
# 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)
3286
3285
3287
3286
# ######################
3288
3287
# simulated forward fields
0 commit comments