Skip to content

Instantly share code, notes, and snippets.

View tetsuyacht's full-sized avatar

Tetsuya Yamamoto tetsuyacht

  • National Institute for Physiological Sciences
  • Okazaki, Japan
View GitHub Profile
@tetsuyacht
tetsuyacht / compute_spatial_btable.py
Created August 31, 2021 12:13 — forked from mpaquette/compute_spatial_btable.py
Computes the voxelwise btable from initial bvecs/bvals and calc_grad_perc_dev output (from fullwarp output of gradunwrap.py)
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# first draft of script to compute voxelwise bvec and bval after GNL
# work on the output of calc_grad_perc_dev
# calc_grad_perc_dev works on the fullwarp output of gradunwrap.py
import numpy as np
import nibabel as nib
import argparse