Skip to content

Commit 23f4f89

Browse files
committed
PEP8 compliance, removed unreferenced variables
1 parent d6c29a8 commit 23f4f89

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

nipype/interfaces/dipy/anisotropic_power.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
IFLOGGER = logging.getLogger('interface')
1818

19+
1920
class APMQballInputSpec(DipyBaseInterfaceInputSpec):
2021
mask_file = File(exists=True,
2122
desc='An optional brain mask')
@@ -24,6 +25,7 @@ class APMQballInputSpec(DipyBaseInterfaceInputSpec):
2425
class APMQballOutputSpec(TraitedSpec):
2526
out_file = File(exists=True)
2627

28+
2729
class APMQball(DipyDiffusionInterface):
2830
"""
2931
Calculates the anisotropic power map
@@ -43,9 +45,8 @@ class APMQball(DipyDiffusionInterface):
4345

4446
def _run_interface(self, runtime):
4547
from dipy.reconst import shm
46-
from dipy.io.utils import nifti1_symmat
47-
from dipy.data import get_sphere
48-
from dipy.reconst.peaks import peaks_from_model
48+
from dipy.data import get_sphere
49+
from dipy.reconst.peaks import peaks_from_model
4950

5051
gtab = self._get_gradient_table()
5152

@@ -58,15 +59,13 @@ def _run_interface(self, runtime):
5859

5960
# Fit it
6061
model = shm.QballModel(gtab,8)
61-
sphere = get_sphere('symmetric724')
62-
fit = model.fit(data, mask)
63-
peaks = peaks_from_model(model=model, data=data, relative_peak_threshold=.5, min_separation_angle=25, sphere=sphere, mask=mask)
62+
sphere = get_sphere('symmetric724')
63+
peaks = peaks_from_model(model=model, data=data, relative_peak_threshold=.5, min_separation_angle=25, sphere=sphere, mask=mask)
6464
apm = shm.anisotropic_power(peaks.shm_coeff)
65-
out_file = self._gen_filename('apm')
66-
nb.Nifti1Image(apm.astype("float32"), affine).to_filename(out_file)
65+
out_file = self._gen_filename('apm')
66+
nb.Nifti1Image(apm.astype("float32"), affine).to_filename(out_file)
6767
IFLOGGER.info('APM qball image saved as {i}'.format(i=out_file))
6868

69-
7069
return runtime
7170

7271
def _list_outputs(self):

0 commit comments

Comments
 (0)