Skip to content
Snippets Groups Projects
Commit d33157ba authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

MNT: Fixes to a few feedsRun scripts

parent 6fca5689
No related branches found
No related tags found
1 merge request!51Mnt/fixes
#!/usr/bin/env python
#!/usr/bin/env fslpython
"""Test the standard recipe for fixing a broken orientation, from "The labels
in FSLView are wrong or missing and no conversion to NIfTI can fix this", on
this page:
......
#!/usr/bin/env python
#!/usr/bin/env fslpython
"""Test that fslcomplex produces correct outputs. Specifically tests that the
output files have orientation info that matches that of the input files.
"""
......
......@@ -132,7 +132,7 @@ def gen_data():
nib.Nifti1Image(S0, affine=affine).to_filename(f'{fdir}/ref_S0.nii.gz')
nib.Nifti1Image(data, affine=affine).to_filename(f'{fdir}/ref_data.nii.gz')
nib.Nifti1Image(np.ones(data.shape[:3], dtype=int), affine=affine).to_filename(f'{fdir}/nodif_brain_mask.nii.gz')
nib.Nifti1Image(np.ones(data.shape[:3], dtype=np.int32), affine=affine).to_filename(f'{fdir}/nodif_brain_mask.nii.gz')
tensor_components = diffusion_tensor[:, :, :, [0, 0, 0, 1, 1, 2], [0, 1, 2, 1, 2, 2]]
nib.Nifti1Image(tensor_components, affine=affine).to_filename(f'{fdir}/ref_tensor.nii.gz')
......@@ -260,9 +260,3 @@ for directory, multi_shell, kurt in gen_data():
ref = nib.load(f'{directory}/ref_L1.nii.gz').get_fdata()
fit = nib.load(f'{base_output}_L1.nii.gz').get_fdata()
assert not np.allclose(ref, fit, rtol=1e-3, atol=1e-6)
#!/usr/bin/env fslpython
import os
import os
import shlex
import sys
import sys
import subprocess as sp
import numpy as np
import nibabel as nib
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment