You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
...
from numpy.lib.stride_tricks import sliding_window_view
Z, X, Y = img.shape
proj = np.zeros((X, Y))
z_step = int(window/2)
for x in tqdm(range(X)) if show_progress else range(X):
for y in range(Y):
slide_ = sliding_window_view(img[:, x, y], axis=0, window_shape = window) # sliding trick
slide_ = slide_[::z_step, :] # skip most steps
agg = agg_func(slide_, axis=1) # aggregate
proj[x, y] = window_agg(agg) # window aggregate
Current implementation of test:
proj_org = np.zeros(original_data.shape)
for x in range(original_data.shape[1]):
for y in range(original_data.shape[2]):
proj_org[:, x, y] = pd.Series(original_data[:, x, y]).rolling(window=window).apply(proj_func).values
This fails because the sliding trick windows differently than intuitively expected. Eg. initial values of sliding trick produces np.nan
The text was updated successfully, but these errors were encountered:
section of get_image_project()
Current implementation of test:
This fails because the sliding trick windows differently than intuitively expected. Eg. initial values of sliding trick produces np.nan
The text was updated successfully, but these errors were encountered: