Skip to content

Instantly share code, notes, and snippets.

@ilkayisik
Created February 1, 2020 19:12
Show Gist options
  • Save ilkayisik/4f105a4dca2f2bb68a59338663e6a04d to your computer and use it in GitHub Desktop.
Save ilkayisik/4f105a4dca2f2bb68a59338663e6a04d to your computer and use it in GitHub Desktop.
mask = np.zeros([18, 18, 1, 4])
for i in range(mask.shape[3]):
mask[:, :, 0, :] = ipl_mask
no_mask = np.zeros_like(mask)
k = 0
mask_all_sub = np.zeros_like(four_dim_array)
for s, sub in enumerate(sub_list):
if sub in missing_roi_sub:
mask_all_sub[:, :, :, k:k+4] = mask_for_missing_ipl
k+=4
else:
ipl_mask_all_sub[:, :, :, k:k+4] = no_mask
k+=4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment